100% FREE Updated: Mar 2026 Discrete Mathematics Foundations of Discrete Math

Sets and Relations

Comprehensive study notes on Sets and Relations for CMI Data Science preparation. This chapter covers key concepts, formulas, and examples needed for your exam.

Sets and Relations

Overview

Welcome to the foundational chapter on Sets and Relations, the bedrock upon which much of Discrete Mathematics – and indeed, many advanced topics in Data Science – is built. This chapter is absolutely critical for your Masters in Data Science journey at CMI, as it equips you with the precise language and conceptual tools to formally define, manipulate, and reason about collections of objects (data points, entities) and the connections that exist between them. A strong grasp of these fundamentals is not merely academic; it's a prerequisite for understanding data structures, database theory, graph theory, and the theoretical underpinnings of algorithms and machine learning.

In the CMI context, proficiency in Sets and Relations will directly impact your ability to tackle problem-solving questions. You'll find these concepts permeating various exam topics, from defining sample spaces in probability and characterizing data structures to understanding graph connectivity and formalizing algorithmic logic. This chapter will enable you to describe complex systems with mathematical rigor, ensuring clarity and precision in your data science work.

By mastering the principles laid out here, you will develop the analytical rigor necessary to articulate problems, design solutions, and interpret results in a mathematically sound manner. This foundational knowledge will empower you to build robust models and algorithms, making it an indispensable part of your toolkit for success in both your coursework and future career.

---

Chapter Contents

| # | Topic | What You'll Learn |
|---|-------|-------------------|
| 1 | Set Theory | Define, operate, and represent collections of items. |
| 2 | Relations | Model connections between elements within sets. |

---

Learning Objectives

❗ By the End of This Chapter

After studying this chapter, you will be able to:

  • Define and perform fundamental operations on sets, including Cartesian products (AΓ—BA \times B).

  • Analyze and prove properties of sets using formal notation and Venn diagrams.

  • Classify and characterize different types of binary relations (e.g., reflexive, symmetric, transitive, equivalence, partial order).

  • Represent relations using matrices and digraphs, and determine their properties and closures.

---

Now let's begin with Set Theory...
## Part 1: Set Theory

Introduction

Set theory forms the bedrock of discrete mathematics, providing a fundamental language and framework for organizing, classifying, and reasoning about collections of objects. In the CMI Masters in Data Science curriculum, a solid grasp of set theory is indispensable. It underpins concepts in logic, relations, functions, graph theory, and probability, which are crucial for understanding algorithms, data structures, and statistical models. This unit covers the core definitions, operations, and principles of set theory, focusing on the cardinality of sets and the Principle of Inclusion-Exclusion, which are frequently tested in CMI examinations for their application in counting problems and data analysis scenarios.
πŸ“– Set

A set is a well-defined collection of distinct objects, called elements or members of the set. The order of elements in a set does not matter, and duplicate elements are not allowed.

If xx is an element of set AA, we write x∈Ax \in A.
If xx is not an element of set AA, we write xβˆ‰Ax \notin A.

---

---

Key Concepts

1. Basic Definitions and Notations

Sets can be described in two primary ways:

  • Roster Method: Listing all elements explicitly within curly braces.

  • Example: The set of even numbers less than 10 is E={2,4,6,8}E = \{2, 4, 6, 8\}.

  • Set-Builder Notation: Describing the properties that elements must satisfy.

  • Example: The set of all natural numbers less than 10 is N={x∣x∈NΒ andΒ x<10}N = \{x \mid x \in \mathbb{N} \text{ and } x < 10\}.

    πŸ“– Universal Set

    The universal set, denoted by UU, is the set of all possible elements under consideration in a particular context. All other sets in that context are subsets of the universal set.

    πŸ“– Empty Set

    The empty set, denoted by βˆ…\emptyset or {}\{\}, is the unique set containing no elements.

    πŸ“– Subset

    A set AA is a subset of a set BB, denoted by AβŠ†BA \subseteq B, if every element of AA is also an element of BB.

    AβŠ†Bβ€…β€ŠβŸΊβ€…β€Šβˆ€x(x∈Aβ€…β€ŠβŸΉβ€…β€Šx∈B)A \subseteq B \iff \forall x (x \in A \implies x \in B)

    If AβŠ†BA \subseteq B and Aβ‰ BA \neq B, then AA is a proper subset of BB, denoted by AβŠ‚BA \subset B.

    πŸ“– Equality of Sets

    Two sets AA and BB are equal, denoted by A=BA = B, if and only if they have exactly the same elements. This means AβŠ†BA \subseteq B and BβŠ†AB \subseteq A.

    πŸ“– Power Set

    The power set of a set AA, denoted by P(A)P(A) or 2A2^A, is the set of all possible subsets of AA.
    If a set AA has nn elements, then its power set P(A)P(A) has 2n2^n elements.

    Worked Example:

    Problem: Given the set S={a,b,c}S = \{a, b, c\}. Determine its power set.

    Solution:

    Step 1: Identify the elements of the set SS.

    S={a,b,c}S = \{a, b, c\}

    Step 2: List all subsets, starting with the empty set and single-element subsets.

    βˆ…,{a},{b},{c}\emptyset, \{a\}, \{b\}, \{c\}

    Step 3: List all two-element subsets.

    {a,b},{a,c},{b,c}\{a, b\}, \{a, c\}, \{b, c\}

    Step 4: List the set itself (the three-element subset).

    {a,b,c}\{a, b, c\}

    Step 5: Combine all identified subsets to form the power set.

    P(S)={βˆ…,{a},{b},{c},{a,b},{a,c},{b,c},{a,b,c}}P(S) = \{\emptyset, \{a\}, \{b\}, \{c\}, \{a, b\}, \{a, c\}, \{b, c\}, \{a, b, c\}\}

    Answer: The power set P(S)P(S) has 23=82^3 = \boxed{8} elements, as listed above.

    ---

    2. Set Operations

    πŸ“– Union

    The union of two sets AA and BB, denoted by AβˆͺBA \cup B, is the set containing all elements that are in AA, or in BB, or in both.

    AβˆͺB={x∣x∈AΒ orΒ x∈B}A \cup B = \{x \mid x \in A \text{ or } x \in B\}
    πŸ“– Intersection

    The intersection of two sets AA and BB, denoted by A∩BA \cap B, is the set containing all elements that are common to both AA and BB.

    A∩B={x∣x∈A and x∈B}A \cap B = \{x \mid x \in A \text{ and } x \in B\}
    πŸ“– Disjoint Sets

    Two sets AA and BB are disjoint if their intersection is the empty set, i.e., A∩B=βˆ…A \cap B = \emptyset.

    πŸ“– Difference

    The difference of two sets AA and BB, denoted by Aβˆ’BA - B or Aβˆ–BA \setminus B, is the set containing all elements that are in AA but not in BB.

    Aβˆ’B={x∣x∈AΒ andΒ xβˆ‰B}A - B = \{x \mid x \in A \text{ and } x \notin B\}
    πŸ“– Complement

    The complement of a set AA, denoted by AcA^c or Aβ€Ύ\overline{A}, is the set of all elements in the universal set UU that are not in AA.

    Ac=Uβˆ’A={x∣x∈UΒ andΒ xβˆ‰A}A^c = U - A = \{x \mid x \in U \text{ and } x \notin A\}
    πŸ“– Symmetric Difference

    The symmetric difference of two sets AA and BB, denoted by AΞ”BA \Delta B or AβŠ•BA \oplus B, is the set containing all elements that are in AA or in BB but not in their intersection (i.e., elements that are in exactly one of the sets).

    AΞ”B=(Aβˆ’B)βˆͺ(Bβˆ’A)A \Delta B = (A - B) \cup (B - A)

    Alternatively, it can be expressed as:

    AΞ”B=(AβˆͺB)βˆ’(A∩B)A \Delta B = (A \cup B) - (A \cap B)

    Properties of Set Operations:
    Set operations follow several algebraic laws, analogous to arithmetic operations. Key ones include:

    * Commutative Laws:

    AβˆͺB=BβˆͺAA \cup B = B \cup A

    A∩B=B∩AA \cap B = B \cap A

    * Associative Laws:

    (AβˆͺB)βˆͺC=Aβˆͺ(BβˆͺC)(A \cup B) \cup C = A \cup (B \cup C)

    (A∩B)∩C=A∩(B∩C)(A \cap B) \cap C = A \cap (B \cap C)

    * Distributive Laws:

    Aβˆͺ(B∩C)=(AβˆͺB)∩(AβˆͺC)A \cup (B \cap C) = (A \cup B) \cap (A \cup C)

    A∩(BβˆͺC)=(A∩B)βˆͺ(A∩C)A \cap (B \cup C) = (A \cap B) \cup (A \cap C)

    * De Morgan's Laws:

    (AβˆͺB)c=Ac∩Bc(A \cup B)^c = A^c \cap B^c

    (A∩B)c=AcβˆͺBc(A \cap B)^c = A^c \cup B^c

    These laws are fundamental for simplifying set expressions and proving identities.

    ---

    3. Cardinality of Sets and Inclusion-Exclusion Principle

    The cardinality of a set AA, denoted by ∣A∣|A|, is the number of distinct elements in the set.

    πŸ“ Cardinality of Union (Two Sets)

    For any finite sets AA and BB:

    ∣AβˆͺB∣=∣A∣+∣Bβˆ£βˆ’βˆ£A∩B∣|A \cup B| = |A| + |B| - |A \cap B|

    Variables:

      • ∣AβˆͺB∣|A \cup B| = Number of elements in the union of A and B

      • ∣A∣|A| = Number of elements in set A

      • ∣B∣|B| = Number of elements in set B

      • ∣A∩B∣|A \cap B| = Number of elements common to A and B


    When to use: When finding the total number of elements in the combined region of two sets, especially in survey or counting problems where elements might be counted twice.

    πŸ“ Cardinality of Union (Three Sets) - Inclusion-Exclusion Principle

    For any finite sets AA, BB, and CC:

    ∣AβˆͺBβˆͺC∣=∣A∣+∣B∣+∣Cβˆ£βˆ’βˆ£A∩Bβˆ£βˆ’βˆ£A∩Cβˆ£βˆ’βˆ£B∩C∣+∣A∩B∩C∣|A \cup B \cup C| = |A| + |B| + |C| - |A \cap B| - |A \cap C| - |B \cap C| + |A \cap B \cap C|

    Variables:

      • ∣AβˆͺBβˆͺC∣|A \cup B \cup C| = Number of elements in the union of A, B, and C

      • ∣A∣,∣B∣,∣C∣|A|, |B|, |C| = Cardinalities of individual sets

      • ∣A∩B∣,∣A∩C∣,∣B∩C∣|A \cap B|, |A \cap C|, |B \cap C| = Cardinalities of pairwise intersections

      • ∣A∩B∩C∣|A \cap B \cap C| = Cardinality of the intersection of all three sets


    When to use: For complex counting problems involving three overlapping categories, ensuring each element is counted exactly once.

    Other useful cardinality relations:

    *

    ∣Aβˆ’B∣=∣Aβˆ£βˆ’βˆ£A∩B∣|A - B| = |A| - |A \cap B|

    *
    ∣Ac∣=∣Uβˆ£βˆ’βˆ£A∣|A^c| = |U| - |A|
    (where UU is the universal set)
    *
    ∣AΞ”B∣=∣AβˆͺBβˆ£βˆ’βˆ£A∩B∣|A \Delta B| = |A \cup B| - |A \cap B|

    *
    ∣AΞ”B∣=∣Aβˆ’B∣+∣Bβˆ’A∣|A \Delta B| = |A - B| + |B - A|

    Worked Example:

    Problem: In a class of 50 students, 30 like Math, 25 like Physics, and 10 like both. How many students like neither Math nor Physics?

    Solution:

    Step 1: Define the sets and given cardinalities.
    Let MM be the set of students who like Math.
    Let PP be the set of students who like Physics.
    Universal set UU is the class of students.

    ∣U∣=50|U| = 50
    ∣M∣=30|M| = 30
    ∣P∣=25|P| = 25
    ∣M∩P∣=10|M \cap P| = 10

    Step 2: Use the Inclusion-Exclusion Principle to find the number of students who like Math or Physics (or both).

    ∣MβˆͺP∣=∣M∣+∣Pβˆ£βˆ’βˆ£M∩P∣|M \cup P| = |M| + |P| - |M \cap P|
    ∣MβˆͺP∣=30+25βˆ’10|M \cup P| = 30 + 25 - 10
    ∣MβˆͺP∣=55βˆ’10|M \cup P| = 55 - 10
    ∣MβˆͺP∣=45|M \cup P| = 45

    Step 3: Find the number of students who like neither Math nor Physics by taking the complement of (MβˆͺP)(M \cup P) with respect to the universal set.

    ∣(MβˆͺP)c∣=∣Uβˆ£βˆ’βˆ£MβˆͺP∣|(M \cup P)^c| = |U| - |M \cup P|
    ∣(MβˆͺP)c∣=50βˆ’45|(M \cup P)^c| = 50 - 45
    ∣(MβˆͺP)c∣=5|(M \cup P)^c| = 5

    Answer: 5\boxed{5} students like neither Math nor Physics.

    ---

    ---

    4. Venn Diagrams

    Venn diagrams are visual representations of sets and their relationships, typically using overlapping circles within a rectangle representing the universal set. They are incredibly useful for visualizing set operations and understanding the regions corresponding to different combinations of sets.




    U





    A
    B
    C

    The diagram above shows a universal set UU and three sets A,B,CA, B, C. Each distinct region in a Venn diagram corresponds to a unique combination of elements belonging or not belonging to the sets. For example:
    * The region where all three circles overlap represents A∩B∩CA \cap B \cap C.
    * The region inside circle AA but outside BB and CC represents Aβˆ’(BβˆͺC)A - (B \cup C).
    * The region outside all circles but inside the rectangle represents (AβˆͺBβˆͺC)c(A \cup B \cup C)^c.

    Understanding how to shade specific regions and translate them into set expressions (and vice versa) is crucial for solving problems involving multiple sets.

    ---

    5. Real Number Intervals

    While sets often deal with discrete elements, they can also represent continuous ranges of real numbers, known as intervals. This concept is particularly relevant for problems involving time, duration, or continuous measurements, as seen in some CMI questions.

    πŸ“– Intervals

    An interval is a set of real numbers that contains all real numbers lying between any two numbers of the set.
    Common types of intervals:
    Closed Interval: [a,b]={x∈R∣a≀x≀b}[a, b] = \{x \in \mathbb{R} \mid a \le x \le b\} (includes endpoints)
    Open Interval: (a,b)={x∈R∣a<x<b}(a, b) = \{x \in \mathbb{R} \mid a < x < b\} (excludes endpoints)
    Half-Open/Half-Closed Intervals:
    [a,b)={x∈R∣a≀x<b}[a, b) = \{x \in \mathbb{R} \mid a \le x < b\}
    * (a,b]={x∈R∣a<x≀b}(a, b] = \{x \in \mathbb{R} \mid a < x \le b\}

    Set operations like union and intersection apply to intervals as well.

    Worked Example:

    Problem: Find the intersection of the intervals I1=[2,7]I_1 = [2, 7] and I2=(5,10]I_2 = (5, 10].

    Solution:

    Step 1: Visualize the intervals on a number line.
    I1I_1 includes 2 and 7, and all numbers between.
    I2I_2 includes numbers strictly greater than 5 up to and including 10.

    Step 2: Identify the overlap.
    For xx to be in both intervals, it must satisfy 2≀x≀72 \le x \le 7 AND 5<x≀105 < x \le 10.
    Combining these conditions:
    The lower bound must be the maximum of the lower bounds: max⁑(2,5)=5\max(2, 5) = 5. Since I2I_2 is open at 5, the intersection will be open at 5.
    The upper bound must be the minimum of the upper bounds: min⁑(7,10)=7\min(7, 10) = 7. Since I1I_1 is closed at 7, the intersection will be closed at 7.

    Step 3: Write the resulting interval.

    I1∩I2=(5,7]I_1 \cap I_2 = (5, 7]

    Answer: The intersection is (5,7](5, 7].

    ---

    Problem-Solving Strategies

    πŸ’‘ CMI Strategy

    • Translate to Set Notation: For word problems, identify the universal set and define specific sets based on the categories given. Translate phrases like "A or B," "A and B," "A but not B," "neither A nor B," "exactly one of A or B" into their corresponding set operations (AβˆͺBA \cup B, A∩BA \cap B, Aβˆ’BA-B, (AβˆͺB)c(A \cup B)^c, AΞ”BA \Delta B).

    • Draw Venn Diagrams: For problems involving 2 or 3 sets, sketching a Venn diagram can clarify relationships and help visualize the regions you need to count. Label each distinct region with a variable if you're using equations, or directly with counts if known.

    • Apply Inclusion-Exclusion: Use the Principle of Inclusion-Exclusion formula for unions of sets to systematically count elements, especially when there are overlaps. Remember to subtract intersections to avoid double-counting and add back the triple intersection for three sets.

    • Break Down Complex Regions: If asked for the cardinality of a complex region (e.g., (B∩C)βˆ’A(B \cap C) - A), express it in terms of simpler intersections and differences for which you have formulas or can derive counts. For example, ∣(B∩C)βˆ’A∣=∣B∩Cβˆ£βˆ’βˆ£A∩B∩C∣|(B \cap C) - A| = |B \cap C| - |A \cap B \cap C|.

    • For Interval Problems: Represent intervals on a number line. This visual aid simplifies finding unions, intersections, and complements of intervals. Pay close attention to whether endpoints are included (closed brackets) or excluded (open parentheses).

    ---

    ---

    Common Mistakes

    ⚠️ Avoid These Errors
      • ❌ Confusing Union and Intersection: Students often mix up "or" (union, βˆͺ\cup) and "and" (intersection, ∩\cap).
    βœ… Correct: "A or B" means AβˆͺBA \cup B. "A and B" means A∩BA \cap B. "A or B but not both" means symmetric difference AΞ”BA \Delta B.
      • ❌ Incorrectly Applying Inclusion-Exclusion: Forgetting to subtract intersections or not adding back the triple intersection for three sets.
    βœ… Correct: Always use the full formula: ∣AβˆͺB∣=∣A∣+∣Bβˆ£βˆ’βˆ£A∩B∣|A \cup B| = |A| + |B| - |A \cap B| and ∣AβˆͺBβˆͺC∣=∣A∣+∣B∣+∣Cβˆ£βˆ’(∣A∩B∣+∣A∩C∣+∣B∩C∣)+∣A∩B∩C∣|A \cup B \cup C| = |A| + |B| + |C| - (|A \cap B| + |A \cap C| + |B \cap C|) + |A \cap B \cap C|.
      • ❌ Misinterpreting "Exactly One": Confusing "A or B" with "exactly one of A or B".
    βœ… Correct: "A or B" is AβˆͺBA \cup B. "Exactly one of A or B" is AΞ”B=(Aβˆ’B)βˆͺ(Bβˆ’A)A \Delta B = (A-B) \cup (B-A). Its cardinality is ∣AβˆͺBβˆ£βˆ’βˆ£A∩B∣|A \cup B| - |A \cap B|.
      • ❌ Errors with Complements: Incorrectly calculating the complement, especially with respect to the universal set.
    βœ… Correct: The complement of AA is Uβˆ’AU-A. If you're looking for "neither A nor B", it's (AβˆͺB)c=Uβˆ’(AβˆͺB)(A \cup B)^c = U - (A \cup B).
      • ❌ Endpoint Mistakes in Intervals: Incorrectly handling open vs. closed intervals during intersection or union.
    βœ… Correct: Pay careful attention to square brackets (inclusive) and parentheses (exclusive). For intersection, take max⁑(lowerΒ bounds)\max(\text{lower bounds}) and min⁑(upperΒ bounds)\min(\text{upper bounds}), ensuring the correct bracket type.
      • ❌ LCM Errors for Multiples: When dealing with multiples of numbers for set intersections, simply multiplying the numbers instead of finding their Least Common Multiple (LCM).
    βœ… Correct: Multiples of aa and bb are multiples of lcm⁑(a,b)\operatorname{lcm}(a,b). For example, multiples of 6 and 8 are multiples of lcm⁑(6,8)=24\operatorname{lcm}(6,8)=24, not 6Γ—8=486 \times 8 = 48.

    ---

    Practice Questions

    :::question type="MCQ" question="A survey of 100 students revealed that 60 students like Math, 50 students like Science, and 40 students like History. 30 students like Math and Science, 25 like Math and History, 20 like Science and History, and 10 students like all three subjects. How many students like none of the three subjects?" options=["10","15","20","25"] answer="15" hint="Use the Inclusion-Exclusion Principle for three sets to find the total number of students who like at least one subject, then subtract from the total number of students." solution="Let MM be the set of students who like Math, SS for Science, and HH for History.
    We are given:
    ∣U∣=100|U| = 100
    ∣M∣=60|M| = 60
    ∣S∣=50|S| = 50
    ∣H∣=40|H| = 40
    ∣M∩S∣=30|M \cap S| = 30
    ∣M∩H∣=25|M \cap H| = 25
    ∣S∩H∣=20|S \cap H| = 20
    ∣M∩S∩H∣=10|M \cap S \cap H| = 10

    First, find the number of students who like at least one subject using the Inclusion-Exclusion Principle for three sets:

    ∣MβˆͺSβˆͺH∣=∣M∣+∣S∣+∣Hβˆ£βˆ’(∣M∩S∣+∣M∩H∣+∣S∩H∣)+∣M∩S∩H∣|M \cup S \cup H| = |M| + |S| + |H| - (|M \cap S| + |M \cap H| + |S \cap H|) + |M \cap S \cap H|

    ∣MβˆͺSβˆͺH∣=60+50+40βˆ’(30+25+20)+10|M \cup S \cup H| = 60 + 50 + 40 - (30 + 25 + 20) + 10

    ∣MβˆͺSβˆͺH∣=150βˆ’75+10|M \cup S \cup H| = 150 - 75 + 10

    ∣MβˆͺSβˆͺH∣=75+10|M \cup S \cup H| = 75 + 10

    ∣MβˆͺSβˆͺH∣=85|M \cup S \cup H| = 85

    The number of students who like none of the three subjects is the total number of students minus those who like at least one:

    ∣(MβˆͺSβˆͺH)c∣=∣Uβˆ£βˆ’βˆ£MβˆͺSβˆͺH∣|(M \cup S \cup H)^c| = |U| - |M \cup S \cup H|

    ∣(MβˆͺSβˆͺH)c∣=100βˆ’85|(M \cup S \cup H)^c| = 100 - 85

    ∣(MβˆͺSβˆͺH)c∣=15|(M \cup S \cup H)^c| = 15

    Answer: 15\boxed{15}"
    :::

    ---

    πŸ’‘ Moving Forward

    Now that you understand Set Theory, let's explore Relations which builds on these concepts.

    ---

    Part 2: Relations

    Introduction

    Relations are fundamental mathematical structures that describe connections or associations between elements within sets. In the realm of Discrete Mathematics, particularly for a Masters in Data Science, understanding relations is crucial for modeling relationships in data, designing databases, analyzing network structures, and formalizing logical deductions. This topic lays the groundwork for advanced concepts in graph theory, order theory, and the construction of abstract data types.

    At its core, a relation formalizes the intuitive idea of "being related to." For instance, in a set of people, "is a sibling of" or "is taller than" are relations. In data science, "is connected to" in a social network, "is an instance of" in an object-oriented model, or "is a prerequisite for" in a course catalog are all examples of relations. This chapter will delve into the formal definitions, various properties, and classifications of relations, equipping you with the tools to analyze and apply them effectively in CMI examinations.

    πŸ“– Binary Relation

    A binary relation RR from a set AA to a set BB is a subset of the Cartesian product AΓ—BA \times B. If (a,b)∈R(a, b) \in R, we say that aa is related to bb, often denoted as aRbaRb.

    If RR is a relation from AA to AA (i.e., RβŠ†AΓ—AR \subseteq A \times A), it is called a relation on AA.

    ---

    Key Concepts

    1. Definition and Representation of Relations

    A relation can be represented in several ways, each offering a different perspective, which is useful for different types of problems.

    Ordered Pairs

    The most direct way to represent a relation is as a set of ordered pairs.

    Example:
    Let A={1,2,3}A = \{1, 2, 3\} and RR be the relation "xx divides yy" on AA.
    The relation RR can be written as:

    R={(1,1),(1,2),(1,3),(2,2),(3,3)}R = \{(1,1), (1,2), (1,3), (2,2), (3,3)\}

    Relation Matrix

    For relations on finite sets, a relation matrix (or adjacency matrix) provides a compact representation. If RR is a relation on A={a1,a2,…,an}A = \{a_1, a_2, \ldots, a_n\}, the relation matrix MRM_R is an nΓ—nn \times n binary matrix where the entry MR(i,j)M_R(i, j) is 11 if (ai,aj)∈R(a_i, a_j) \in R and 00 otherwise.
    πŸ“ Relation Matrix

    For a relation RR on a finite set A={a1,a2,…,an}A = \{a_1, a_2, \ldots, a_n\}, the relation matrix MR=[mij]M_R = [m_{ij}] is defined by:

    mij={1ifΒ (ai,aj)∈R0ifΒ (ai,aj)βˆ‰Rm_{ij} = \begin{cases} 1 & \text{if } (a_i, a_j) \in R \\ 0 & \text{if } (a_i, a_j) \notin R \end{cases}

    Variables:

      • mijm_{ij} = entry in the ii-th row and jj-th column of the matrix.

      • ai,aja_i, a_j = elements of the set AA.


    When to use: When the set is finite and its elements are ordered, useful for algorithmic processing of relations.

    Worked Example:

    Problem: Let A={a,b,c}A = \{a, b, c\} and R={(a,a),(a,c),(b,c),(c,b)}R = \{(a,a), (a,c), (b,c), (c,b)\}. Represent RR as a relation matrix.

    Solution:

    Step 1: Order the elements of AA. Let a1=a,a2=b,a3=ca_1=a, a_2=b, a_3=c.

    MR=(m11m12m13m21m22m23m31m32m33)M_R = \begin{pmatrix} m_{11} & m_{12} & m_{13} \\ m_{21} & m_{22} & m_{23} \\ m_{31} & m_{32} & m_{33} \end{pmatrix}

    Step 2: Fill in the matrix entries based on the definition of RR.
    For mij=1m_{ij}=1 if (ai,aj)∈R(a_i, a_j) \in R, and 00 otherwise.

    MR=(101001010)M_R = \begin{pmatrix} 1 & 0 & 1 \\ 0 & 0 & 1 \\ 0 & 1 & 0 \end{pmatrix}

    Answer:
    The relation matrix is (101001010)\begin{pmatrix} 1 & 0 & 1 \\ 0 & 0 & 1 \\ 0 & 1 & 0 \end{pmatrix}.

    Directed Graph (Digraph)

    A relation RR on a set AA can be visualized as a directed graph. The elements of AA are the vertices (nodes) of the graph, and an ordered pair (a,b)∈R(a, b) \in R corresponds to a directed edge (arc) from vertex aa to vertex bb.

    Worked Example:

    Problem: Let A={1,2,3,4}A = \{1, 2, 3, 4\} and R={(1,2),(2,2),(2,3),(3,4),(4,1)}R = \{(1,2), (2,2), (2,3), (3,4), (4,1)\}. Draw the digraph representing RR.

    Solution:

    Step 1: Represent each element of AA as a vertex.



    1


    2


    4


    3

    Step 2: Draw an arrow from xx to yy for each (x,y)∈R(x,y) \in R. A loop is drawn for (x,x)(x,x).




    1


    2


    3


    4

















    Answer: The diagram above visually represents the relation RR.

    ---

    2. Properties of Relations

    Understanding the properties of relations is crucial for classifying them and predicting their behavior. These properties are frequently tested in CMI.

    ❗ Must Remember

    A relation can possess multiple properties simultaneously. These properties are not mutually exclusive (except for a few specific pairs like symmetric and asymmetric).

    a. Reflexivity

    A relation RR on a set AA is reflexive if every element is related to itself.
    πŸ“– Reflexive Relation

    A relation RR on a set AA is reflexive if for every a∈Aa \in A, (a,a)∈R(a,a) \in R.

    Matrix Representation: All diagonal entries miim_{ii} are 11.
    Digraph Representation: Every vertex has a loop.

    b. Irreflexivity

    A relation RR on a set AA is irreflexive if no element is related to itself.
    πŸ“– Irreflexive Relation

    A relation RR on a set AA is irreflexive if for every a∈Aa \in A, (a,a)βˆ‰R(a,a) \notin R.

    Matrix Representation: All diagonal entries miim_{ii} are 00.
    Digraph Representation: No vertex has a loop.

    c. Symmetry

    A relation RR on a set AA is symmetric if whenever aa is related to bb, then bb is also related to aa.
    πŸ“– Symmetric Relation

    A relation RR on a set AA is symmetric if for all a,b∈Aa, b \in A, if (a,b)∈R(a,b) \in R, then (b,a)∈R(b,a) \in R.

    Matrix Representation: MRM_R is a symmetric matrix (i.e., MR=MRTM_R = M_R^T, or mij=mjim_{ij} = m_{ji}).
    Digraph Representation: If there is an edge from aa to bb, there is also an edge from bb to aa.

    d. Antisymmetry

    A relation RR on a set AA is antisymmetric if the only way for aa to be related to bb and bb to be related to aa is if aa and bb are the same element. This is a critical property, often confused with asymmetry.
    πŸ“– Antisymmetric Relation

    A relation RR on a set AA is antisymmetric if for all a,b∈Aa, b \in A, if (a,b)∈R(a,b) \in R and (b,a)∈R(b,a) \in R, then a=ba=b.

    Matrix Representation: For i≠ji \neq j, if mij=1m_{ij}=1, then mji=0m_{ji}=0. (Diagonal entries can be 00 or 11).
    Digraph Representation: For any two distinct vertices a,ba, b, if there is an edge from aa to bb, there cannot be an edge from bb to aa.

    ⚠️ Symmetric vs. Antisymmetric

    ❌ A common misconception is that symmetric and antisymmetric are opposite. They are not.
    βœ… A relation can be both symmetric and antisymmetric (e.g., the equality relation R={(a,a)∣a∈A}R = \{(a,a) \mid a \in A\}).
    A relation can be neither symmetric nor antisymmetric (e.g., R={(1,2),(2,1),(2,3)}R = \{(1,2), (2,1), (2,3)\} on {1,2,3}\{1,2,3\}).
    A relation is symmetric if (a,b)∈Rβ€…β€ŠβŸΉβ€…β€Š(b,a)∈R(a,b) \in R \implies (b,a) \in R.
    A relation is antisymmetric if (a,b)∈R∧(b,a)∈Rβ€…β€ŠβŸΉβ€…β€Ša=b(a,b) \in R \land (b,a) \in R \implies a=b.

    e. Asymmetry

    A relation RR on a set AA is asymmetric if it is both irreflexive and antisymmetric.
    πŸ“– Asymmetric Relation

    A relation RR on a set AA is asymmetric if for all a,b∈Aa, b \in A, if (a,b)∈R(a,b) \in R, then (b,a)βˆ‰R(b,a) \notin R.

    Matrix Representation: For all i,ji,j, if mij=1m_{ij}=1, then mji=0m_{ji}=0. (This implies mii=0m_{ii}=0 for all ii).
    Digraph Representation: No loops, and if there is an edge from aa to bb, there is no edge from bb to aa.

    f. Transitivity

    A relation RR on a set AA is transitive if whenever aa is related to bb and bb is related to cc, then aa is also related to cc.
    πŸ“– Transitive Relation

    A relation RR on a set AA is transitive if for all a,b,c∈Aa, b, c \in A, if (a,b)∈R(a,b) \in R and (b,c)∈R(b,c) \in R, then (a,c)∈R(a,c) \in R.

    Matrix Representation: If MR2M_R^2 is computed using Boolean matrix multiplication (where multiplication is replaced by logical AND, and addition by logical OR), then MR(i,j)=1M_R(i,j)=1 implies (MR2)(i,j)=1(M_R^2)(i,j)=1. More simply, if there is a path of length 2 from aia_i to aja_j, there must be a direct edge from aia_i to aja_j.
    Digraph Representation: If there's a path of length two from aa to cc (i.e., a→b→ca \to b \to c), then there must be a direct edge from aa to cc.

    Worked Example (Properties):

    Problem: Consider the relation R={(1,1),(1,2),(2,1),(2,2),(3,3)}R = \{(1,1), (1,2), (2,1), (2,2), (3,3)\} on the set A={1,2,3}A = \{1,2,3\}. Determine if RR is reflexive, symmetric, antisymmetric, and transitive.

    Solution:

    Step 1: Check for Reflexivity.
    For RR to be reflexive, all (a,a)(a,a) for a∈Aa \in A must be in RR.
    The pairs are (1,1),(2,2),(3,3)(1,1), (2,2), (3,3).
    All these pairs are in RR.
    So, RR is reflexive.

    Step 2: Check for Symmetry.
    For RR to be symmetric, if (a,b)∈R(a,b) \in R, then (b,a)∈R(b,a) \in R.
    Consider (1,2)∈R(1,2) \in R. Is (2,1)∈R(2,1) \in R? Yes.
    Consider (2,1)∈R(2,1) \in R. Is (1,2)∈R(1,2) \in R? Yes.
    All other pairs are (a,a)(a,a) type, which trivially satisfy symmetry.
    So, RR is symmetric.

    Step 3: Check for Antisymmetry.
    For RR to be antisymmetric, if (a,b)∈R(a,b) \in R and (b,a)∈R(b,a) \in R, then a=ba=b.
    Consider (1,2)∈R(1,2) \in R and (2,1)∈R(2,1) \in R. Here, a=1,b=2a=1, b=2. But 1β‰ 21 \neq 2.
    This violates the condition for antisymmetry.
    So, RR is not antisymmetric.

    Step 4: Check for Transitivity.
    For RR to be transitive, if (a,b)∈R(a,b) \in R and (b,c)∈R(b,c) \in R, then (a,c)∈R(a,c) \in R.
    Consider (1,2)∈R(1,2) \in R and (2,1)∈R(2,1) \in R. We must have (1,1)∈R(1,1) \in R. Yes, it is.
    Consider (2,1)∈R(2,1) \in R and (1,2)∈R(1,2) \in R. We must have (2,2)∈R(2,2) \in R. Yes, it is.
    Consider (1,1)∈R(1,1) \in R and (1,2)∈R(1,2) \in R. We must have (1,2)∈R(1,2) \in R. Yes, it is.
    Consider (2,2)∈R(2,2) \in R and (2,1)∈R(2,1) \in R. We must have (2,1)∈R(2,1) \in R. Yes, it is.
    Other combinations are similar or involve (3,3)(3,3) which only relates to itself.
    So, RR is transitive.

    Answer: RR is reflexive, symmetric, and transitive, but not antisymmetric.

    ---

    ---

    #
    ## 3. Special Types of Relations

    #
    ### a. Equivalence Relations
    An equivalence relation partitions a set into disjoint subsets called equivalence classes. This concept is fundamental in many areas of mathematics and computer science.

    πŸ“– Equivalence Relation

    A relation RR on a set AA is an equivalence relation if it is:

    • Reflexive: For all a∈Aa \in A, (a,a)∈R(a,a) \in R.

    • Symmetric: For all a,b∈Aa, b \in A, if (a,b)∈R(a,b) \in R, then (b,a)∈R(b,a) \in R.

    • Transitive: For all a,b,c∈Aa, b, c \in A, if (a,b)∈R(a,b) \in R and (b,c)∈R(b,c) \in R, then (a,c)∈R(a,c) \in R.

    πŸ“– Equivalence Class

    Let RR be an equivalence relation on a set AA. For any a∈Aa \in A, the equivalence class of aa, denoted by [a]R[a]_R (or simply [a][a] if RR is understood), is the set of all elements in AA that are related to aa.

    [a]R={x∈A∣(a,x)∈R}[a]_R = \{x \in A \mid (a,x) \in R\}

    ❗ Partition Property

    The set of all distinct equivalence classes of an equivalence relation on a set AA forms a partition of AA. This means:

    • Every element of AA belongs to exactly one equivalence class.

    • Any two distinct equivalence classes are disjoint.

    • The union of all equivalence classes is AA.

    Worked Example (Equivalence Relation):

    Problem: Let A={1,2,3,4,5,6}A = \{1, 2, 3, 4, 5, 6\} and let RR be the relation on AA defined by (a,b)∈R(a,b) \in R if a≑b(mod3)a \equiv b \pmod 3. Show that RR is an equivalence relation and find its equivalence classes.

    Solution:

    Step 1: Check Reflexivity.
    For any a∈Aa \in A, aβˆ’a=0a-a = 0, and 00 is divisible by 33.
    So, a≑a(mod3)a \equiv a \pmod 3, which means (a,a)∈R(a,a) \in R.
    RR is reflexive.

    Step 2: Check Symmetry.
    Assume (a,b)∈R(a,b) \in R. This means a≑b(mod3)a \equiv b \pmod 3, so aβˆ’b=3ka-b = 3k for some integer kk.
    Then bβˆ’a=βˆ’3k=3(βˆ’k)b-a = -3k = 3(-k). Since βˆ’k-k is an integer, b≑a(mod3)b \equiv a \pmod 3.
    So, (b,a)∈R(b,a) \in R.
    RR is symmetric.

    Step 3: Check Transitivity.
    Assume (a,b)∈R(a,b) \in R and (b,c)∈R(b,c) \in R.
    This means a≑b(mod3)a \equiv b \pmod 3 and b≑c(mod3)b \equiv c \pmod 3.
    So, aβˆ’b=3ka-b = 3k and bβˆ’c=3mb-c = 3m for some integers k,mk, m.
    Adding these equations:

    (aβˆ’b)+(bβˆ’c)=3k+3m(a-b) + (b-c) = 3k + 3m

    aβˆ’c=3(k+m)a-c = 3(k+m)

    Since k+mk+m is an integer, a≑c(mod3)a \equiv c \pmod 3.
    So, (a,c)∈R(a,c) \in R.
    RR is transitive.

    Since RR is reflexive, symmetric, and transitive, it is an equivalence relation.

    Step 4: Find Equivalence Classes.
    The equivalence classes are determined by the remainder when divided by 33.
    [1]R={x∈A∣x≑1(mod3)}={1,4}[1]_R = \{x \in A \mid x \equiv 1 \pmod 3\} = \{1, 4\}
    [2]R={x∈A∣x≑2(mod3)}={2,5}[2]_R = \{x \in A \mid x \equiv 2 \pmod 3\} = \{2, 5\}
    [3]R={x∈A∣x≑0(mod3)}={3,6}[3]_R = \{x \in A \mid x \equiv 0 \pmod 3\} = \{3, 6\}

    Answer: RR is an equivalence relation. The equivalence classes are {1,4}\{1, 4\}, {2,5}\{2, 5\}, and {3,6}\{3, 6\}.

    #
    ### b. Partial Order Relations
    Partial order relations establish a hierarchy or ordering among elements, not necessarily requiring every pair of elements to be comparable.

    πŸ“– Partial Order Relation

    A relation RR on a set AA is a partial order relation (or partial order) if it is:

    • Reflexive: For all a∈Aa \in A, (a,a)∈R(a,a) \in R.

    • Antisymmetric: For all a,b∈Aa, b \in A, if (a,b)∈R(a,b) \in R and (b,a)∈R(b,a) \in R, then a=ba=b.

    • Transitive: For all a,b,c∈Aa, b, c \in A, if (a,b)∈R(a,b) \in R and (b,c)∈R(b,c) \in R, then (a,c)∈R(a,c) \in R.

    A set AA with a partial order RR is called a partially ordered set or poset, denoted (A,R)(A, R).

    Example:

    • The "less than or equal to" relation (≀\le) on the set of real numbers.

    • The "subset of" relation (βŠ†\subseteq) on the power set of a set.

    • The "divides" relation (∣\mid) on the set of positive integers.




    πŸ“–
    Total Order Relation

    A partial order RR on a set AA is a total order relation (or linear order) if for every a,b∈Aa, b \in A, either (a,b)∈R(a,b) \in R or (b,a)∈R(b,a) \in R. That is, every pair of elements is comparable.


    Example: The "less than or equal to" relation (≀\le) on the set of real numbers is a total order. The "divides" relation on integers is not a total order because, e.g., 22 does not divide 33 and 33 does not divide 22.

    ---

    #
    ## 4. Operations on Relations

    Relations, being sets, can be combined using set operations.

    #
    ### a. Union of Relations
    The union of two relations R1R_1 and R2R_2 on a set AA is R1βˆͺR2R_1 \cup R_2. An ordered pair (a,b)(a,b) is in R1βˆͺR2R_1 \cup R_2 if it is in R1R_1 or in R2R_2.

    πŸ“– Union of Relations

    Let R1R_1 and R2R_2 be relations from AA to BB. The union of R1R_1 and R2R_2, denoted R1βˆͺR2R_1 \cup R_2, is defined as:

    R1βˆͺR2={(a,b)∣(a,b)∈R1Β orΒ (a,b)∈R2}R_1 \cup R_2 = \{(a,b) \mid (a,b) \in R_1 \text{ or } (a,b) \in R_2\}

    Property: The union of two equivalence relations is not always an equivalence relation. It might fail transitivity or reflexivity if the sets are different. For example, if R1R_1 and R2R_2 are equivalence relations on AA, R1βˆͺR2R_1 \cup R_2 is reflexive and symmetric, but not necessarily transitive.
    Consider A={1,2,3}A = \{1,2,3\}, R1={(1,1),(2,2),(3,3),(1,2),(2,1)}R_1 = \{(1,1), (2,2), (3,3), (1,2), (2,1)\}, R2={(1,1),(2,2),(3,3),(2,3),(3,2)}R_2 = \{(1,1), (2,2), (3,3), (2,3), (3,2)\}.
    R1βˆͺR2={(1,1),(2,2),(3,3),(1,2),(2,1),(2,3),(3,2)}R_1 \cup R_2 = \{(1,1), (2,2), (3,3), (1,2), (2,1), (2,3), (3,2)\}.
    Here, (1,2)∈R1βˆͺR2(1,2) \in R_1 \cup R_2 and (2,3)∈R1βˆͺR2(2,3) \in R_1 \cup R_2, but (1,3)βˆ‰R1βˆͺR2(1,3) \notin R_1 \cup R_2. Thus, R1βˆͺR2R_1 \cup R_2 is not transitive.

    #
    ### b. Intersection of Relations
    The intersection of two relations R1R_1 and R2R_2 on a set AA is R1∩R2R_1 \cap R_2. An ordered pair (a,b)(a,b) is in R1∩R2R_1 \cap R_2 if it is in both R1R_1 and R2R_2.

    πŸ“– Intersection of Relations

    Let R1R_1 and R2R_2 be relations from AA to BB. The intersection of R1R_1 and R2R_2, denoted R1∩R2R_1 \cap R_2, is defined as:

    R1∩R2={(a,b)∣(a,b)∈R1 and (a,b)∈R2}R_1 \cap R_2 = \{(a,b) \mid (a,b) \in R_1 \text{ and } (a,b) \in R_2\}

    Property: The intersection of two equivalence relations is always an equivalence relation.

    • Reflexivity: If R1,R2R_1, R_2 are reflexive, then (a,a)∈R1(a,a) \in R_1 and (a,a)∈R2(a,a) \in R_2 for all aa. So (a,a)∈R1∩R2(a,a) \in R_1 \cap R_2.

    • Symmetry: If (a,b)∈R1∩R2(a,b) \in R_1 \cap R_2, then (a,b)∈R1(a,b) \in R_1 and (a,b)∈R2(a,b) \in R_2. By symmetry of R1,R2R_1, R_2, (b,a)∈R1(b,a) \in R_1 and (b,a)∈R2(b,a) \in R_2. So (b,a)∈R1∩R2(b,a) \in R_1 \cap R_2.

    • Transitivity: If (a,b)∈R1∩R2(a,b) \in R_1 \cap R_2 and (b,c)∈R1∩R2(b,c) \in R_1 \cap R_2, then (a,b)∈R1(a,b) \in R_1, (b,c)∈R1(b,c) \in R_1 and (a,b)∈R2(a,b) \in R_2, (b,c)∈R2(b,c) \in R_2. By transitivity of R1,R2R_1, R_2, (a,c)∈R1(a,c) \in R_1 and (a,c)∈R2(a,c) \in R_2. So (a,c)∈R1∩R2(a,c) \in R_1 \cap R_2.


    #
    ### c. Composition of Relations
    The composition of relations is analogous to function composition.

    πŸ“– Composition of Relations

    Let R1R_1 be a relation from set AA to set BB, and R2R_2 be a relation from set BB to set CC. The composition of R1R_1 and R2R_2, denoted R2∘R1R_2 \circ R_1, is a relation from AA to CC defined as:

    (a,c)∈R2∘R1β€…β€ŠβŸΊβ€…β€Šβˆƒb∈BΒ suchΒ thatΒ (a,b)∈R1Β andΒ (b,c)∈R2(a,c) \in R_2 \circ R_1 \iff \exists b \in B \text{ such that } (a,b) \in R_1 \text{ and } (b,c) \in R_2

    Note: The order of composition is crucial. R2∘R1R_2 \circ R_1 means apply R1R_1 first, then R2R_2. This is consistent with function notation (f∘g)(x)=f(g(x))(f \circ g)(x) = f(g(x)).

    Matrix Multiplication for Composition: If MR1M_{R_1} is the matrix for R1R_1 from AA to BB, and MR2M_{R_2} is the matrix for R2R_2 from BB to CC, then the matrix for R2∘R1R_2 \circ R_1 is given by the Boolean product MR1β‹…MR2M_{R_1} \cdot M_{R_2}. Note that some texts define MR2∘R1=MR1β‹…MR2M_{R_2 \circ R_1} = M_{R_1} \cdot M_{R_2} and others MR2∘R1=MR2β‹…MR1M_{R_2 \circ R_1} = M_{R_2} \cdot M_{R_1}. It depends on whether matrix multiplication is Mij=βˆ‘kAikBkjM_{ij} = \sum_k A_{ik} B_{kj} (row-column) or Mij=βˆ‘kAkjBikM_{ij} = \sum_k A_{kj} B_{ik} (column-row). C.L. Liu uses MR2∘R1=MR1β‹…MR2M_{R_2 \circ R_1} = M_{R_1} \cdot M_{R_2} with standard row-column product.

    Worked Example (Composition):

    Problem: Let A={1,2,3}A = \{1,2,3\}, R1={(1,2),(2,3)}R_1 = \{(1,2), (2,3)\} on AA, and R2={(1,1),(2,1),(3,2)}R_2 = \{(1,1), (2,1), (3,2)\} on AA. Find R2∘R1R_2 \circ R_1.

    Solution:

    Step 1: Identify pairs (a,b)∈R1(a,b) \in R_1 and (b,c)∈R2(b,c) \in R_2.
    We need to find a∈A,b∈A,c∈Aa \in A, b \in A, c \in A such that (a,b)∈R1(a,b) \in R_1 and (b,c)∈R2(b,c) \in R_2.

    Step 2: List potential compositions.

    • From (1,2)∈R1(1,2) \in R_1:

    - Check for pairs in R2R_2 starting with 22: (2,1)∈R2(2,1) \in R_2.
    - This gives (1,1)∈R2∘R1(1,1) \in R_2 \circ R_1.
    • From (2,3)∈R1(2,3) \in R_1:

    - Check for pairs in R2R_2 starting with 33: (3,2)∈R2(3,2) \in R_2.
    - This gives (2,2)∈R2∘R1(2,2) \in R_2 \circ R_1.

    Step 3: Collect all resulting pairs.

    R2∘R1={(1,1),(2,2)}R_2 \circ R_1 = \{(1,1), (2,2)\}

    Answer: R2∘R1={(1,1),(2,2)}R_2 \circ R_1 = \{(1,1), (2,2)\}.

    ---

    #
    ## 5. Relation Closures

    Sometimes a relation may not possess a desired property (e.g., transitivity). We can add the minimum number of ordered pairs to make it possess that property, resulting in a "closure" of the original relation. This concept is crucial for problems involving "paths" or "reachability."

    πŸ“– Reflexive Closure

    The reflexive closure of a relation RR on a set AA, denoted RrR^r, is RβˆͺΞ”R \cup \Delta, where Ξ”={(a,a)∣a∈A}\Delta = \{(a,a) \mid a \in A\} is the diagonal relation (identity relation).

    Rr=Rβˆͺ{(a,a)∣a∈A}R^r = R \cup \{(a,a) \mid a \in A\}

    πŸ“– Symmetric Closure

    The symmetric closure of a relation RR on a set AA, denoted RsR^s, is RβˆͺRβˆ’1R \cup R^{-1}, where Rβˆ’1={(b,a)∣(a,b)∈R}R^{-1} = \{(b,a) \mid (a,b) \in R\} is the inverse of RR.

    Rs=Rβˆͺ{(b,a)∣(a,b)∈R}R^s = R \cup \{(b,a) \mid (a,b) \in R\}

    πŸ“– Transitive Closure

    The transitive closure of a relation RR on a set AA, denoted RtR^t, is the smallest transitive relation containing RR. It consists of all pairs (a,b)(a,b) such that there is a path of length one or more from aa to bb in the digraph of RR.

    Rt=RβˆͺR2βˆͺR3βˆͺ…=⋃k=1∞RkR^t = R \cup R^2 \cup R^3 \cup \ldots = \bigcup_{k=1}^{\infty} R^k

    where RkR^k is the kk-th power of RR (composition of RR with itself kk times). For finite sets, this union terminates.

    The concept of "path" and "finitely many applications" in PYQ 1/7 directly relates to the transitive closure of the relation defined by the transformation rules. If xx can be transformed into yy, (x,y)(x,y) is in the transitive closure of the base transformation relation.

    ---

    ---

    Problem-Solving Strategies

    πŸ’‘ CMI Strategy: Analyzing Relation Properties

    • Understand Definitions: Be precise with definitions. For example, "antisymmetric" is not the same as "not symmetric."

    • Use Counterexamples: To disprove a property (e.g., "not transitive"), find a specific instance that violates the definition.

    • General Proofs: To prove a property, use arbitrary elements and follow logical deductions from the definitions.

    • Matrix/Digraph Aids: For finite sets, visual representations can help identify properties quickly (e.g., loops for reflexivity, symmetry of matrix, paths for transitivity).

    • Boolean Matrix Multiplication for Transitivity: For a relation RR on a set with nn elements, Rt=RβˆͺR2βˆͺ…βˆͺRnR^t = R \cup R^2 \cup \ldots \cup R^n. The matrix for RtR^t can be found using Warshall's algorithm or by computing powers of MRM_R using Boolean matrix multiplication.

    πŸ’‘ CMI Strategy: Handshaking Lemma

    When a problem involves counts of connections (like handshakes, or degree of vertices in a graph), remember the Handshaking Lemma:
    The sum of the degrees of all vertices in a graph is equal to twice the number of edges.

    βˆ‘v∈Vdeg⁑(v)=2∣E∣\sum_{v \in V} \deg(v) = 2|E|

    This implies that the sum of degrees must always be an even number. This is directly applicable to PYQ 4.

    ---

    Common Mistakes

    ⚠️ Avoid These Errors
      • ❌ Confusing Symmetric and Antisymmetric: These properties are independent. A relation can be both (e.g., equality), neither (e.g., R={(1,2),(2,1),(2,3)}R = \{(1,2),(2,1),(2,3)\}), symmetric only (e.g., R={(1,2),(2,1)}R = \{(1,2),(2,1)\}), or antisymmetric only (e.g., R={(1,2)}R = \{(1,2)\}).
    βœ… Correct Approach: Apply definitions strictly. Symmetric: if (a,b)∈R(a,b) \in R, then (b,a)∈R(b,a) \in R. Antisymmetric: if (a,b)∈R(a,b) \in R AND (b,a)∈R(b,a) \in R, then a=ba=b.
      • ❌ Incorrectly Verifying Transitivity: For transitivity, you must check all pairs (a,b)(a,b) and (b,c)(b,c) in RR. It's not enough to find one instance where it holds; you must ensure no counterexample exists. For large relations, this is where matrix methods or Warshall's algorithm become useful.
    βœ… Correct Approach: Systematically list all (a,b)(a,b) and (b,c)(b,c) pairs. If (a,c)(a,c) is missing for any such chain, the relation is not transitive.
      • ❌ Assuming Union of Equivalence Relations is Equivalence: As shown in the notes, this is false.
    βœ… Correct Approach: Recall or derive the counterexample (e.g., using modular arithmetic or simple sets) to demonstrate non-transitivity.
      • ❌ Errors in Relation Composition Order: R2∘R1R_2 \circ R_1 means apply R1R_1 first, then R2R_2. The 'intermediate' element bb must be related to aa by R1R_1 and to cc by R2R_2.
    βœ… Correct Approach: Think of (a,b)∈R1(a,b) \in R_1 and (b,c)∈R2(b,c) \in R_2. The result is (a,c)(a,c).
      • ❌ Misinterpreting "Path" in Equivalence Relations: If a relation is defined by a set of transformation rules, "x and y are equivalent if there is a path from x to y" implies that the relation is the transitive closure (and usually also reflexive and symmetric closure) of the base transformations.
    βœ… Correct Approach: Recognize that "path" implies transitivity. If the transformations are reversible, it implies symmetry. If an element can be transformed to itself, it implies reflexivity.

    ---

    Practice Questions

    :::question type="MCQ" question="Let A={a,b,c,d}A = \{a, b, c, d\} and RR be a relation on AA represented by the matrix:

    MR=(1100110000110011)M_R = \begin{pmatrix} 1 & 1 & 0 & 0 \\ 1 & 1 & 0 & 0 \\ 0 & 0 & 1 & 1 \\ 0 & 0 & 1 & 1 \end{pmatrix}

    Which of the following statements about RR is true?" options=["A. RR is reflexive and antisymmetric.","B. RR is symmetric and transitive, but not reflexive.","C. RR is an equivalence relation.","D. RR is neither symmetric nor antisymmetric."] answer="C. RR is an equivalence relation." hint="Convert the matrix to ordered pairs if it helps, then check reflexivity, symmetry, and transitivity." solution="
    Step 1: Convert MRM_R to a set of ordered pairs.
    R={(a,a),(a,b),(b,a),(b,b),(c,c),(c,d),(d,c),(d,d)}R = \{(a,a), (a,b), (b,a), (b,b), (c,c), (c,d), (d,c), (d,d)\}

    Step 2: Check Reflexivity.
    All diagonal elements are 1 (m11,m22,m33,m44m_{11}, m_{22}, m_{33}, m_{44} are all 1).
    So, (a,a),(b,b),(c,c),(d,d)∈R(a,a), (b,b), (c,c), (d,d) \in R. RR is reflexive.

    Step 3: Check Symmetry.
    The matrix MRM_R is symmetric (MR=MRTM_R = M_R^T).
    For example, (a,b)∈Rβ€…β€ŠβŸΉβ€…β€Š(b,a)∈R(a,b) \in R \implies (b,a) \in R. (c,d)∈Rβ€…β€ŠβŸΉβ€…β€Š(d,c)∈R(c,d) \in R \implies (d,c) \in R.
    So, RR is symmetric.

    Step 4: Check Antisymmetry.
    For RR to be antisymmetric, if (x,y)∈R(x,y) \in R and (y,x)∈R(y,x) \in R, then x=yx=y.
    We have (a,b)∈R(a,b) \in R and (b,a)∈R(b,a) \in R, but aβ‰ ba \neq b.
    So, RR is NOT antisymmetric.

    Step 5: Check Transitivity.
    We need to check if (x,y)∈R(x,y) \in R and (y,z)∈Rβ€…β€ŠβŸΉβ€…β€Š(x,z)∈R(y,z) \in R \implies (x,z) \in R.
    Consider (a,b)∈R(a,b) \in R and (b,a)∈Rβ€…β€ŠβŸΉβ€…β€Š(a,a)∈R(b,a) \in R \implies (a,a) \in R. (Holds)
    Consider (a,b)∈R(a,b) \in R and (b,b)∈Rβ€…β€ŠβŸΉβ€…β€Š(a,b)∈R(b,b) \in R \implies (a,b) \in R. (Holds)
    Consider (b,a)∈R(b,a) \in R and (a,b)∈Rβ€…β€ŠβŸΉβ€…β€Š(b,b)∈R(a,b) \in R \implies (b,b) \in R. (Holds)
    Consider (c,d)∈R(c,d) \in R and (d,c)∈Rβ€…β€ŠβŸΉβ€…β€Š(c,c)∈R(d,c) \in R \implies (c,c) \in R. (Holds)
    All possible paths of length 2 lead to an existing edge. For example, MRβ‹…MR=MRM_R \cdot M_R = M_R (using Boolean multiplication).
    So, RR is transitive.

    Step 6: Evaluate the options.

    • A. RR is reflexive and antisymmetric. (False, not antisymmetric)

    • B. RR is symmetric and transitive, but not reflexive. (False, RR is reflexive)

    • C. RR is an equivalence relation. (True, RR is reflexive, symmetric, and transitive)

    • D. RR is neither symmetric nor antisymmetric. (False, RR is symmetric)


    Therefore, RR is an equivalence relation.
    Answer: \boxed{C. R \text{ is an equivalence relation.}}
    "
    :::

    :::question type="NAT" question="A conference has 150150 attendees. Some attendees exchange business cards. Each attendee recorded the number of cards they received. The sum of all recorded numbers is 320320. How many business card exchanges occurred in total?" answer="160" hint="Consider the problem as a graph where attendees are vertices and an exchange is an edge. Each exchange involves two cards." solution="
    Step 1: Understand the problem in terms of graph theory.
    Let the attendees be vertices VV of a graph.
    Let an exchange of business cards be an edge EE.
    If person A exchanges a card with person B, this implies two cards are exchanged: A gives one to B, and B gives one to A. This is a single edge between A and B in an undirected graph.

    Step 2: Relate recorded numbers to graph properties.
    Each attendee records the number of cards they received. If A exchanges with B, A receives a card from B, and B receives a card from A.
    The number of cards an attendee receives is equal to the number of people they exchanged cards with. This is precisely the degree of the vertex representing that attendee in the graph.

    Step 3: Apply the Handshaking Lemma.
    The sum of all recorded numbers is the sum of the degrees of all vertices in the graph.
    Let NN be the sum of all recorded numbers.
    N=βˆ‘v∈Vdeg⁑(v)=320N = \sum_{v \in V} \deg(v) = 320.
    According to the Handshaking Lemma, N=2∣E∣N = 2|E|, where ∣E∣|E| is the total number of edges (business card exchanges).

    Step 4: Calculate the total number of exchanges.

    2∣E∣=3202|E| = 320

    ∣E∣=3202|E| = \frac{320}{2}

    ∣E∣=160|E| = 160

    Thus, 160160 business card exchanges occurred in total.
    Answer: \boxed{160}
    "
    :::

    :::question type="MSQ" question="Let R1R_1 and R2R_2 be two equivalence relations on a non-empty set AA. Which of the following statements is/are true?" options=["A. R1βˆͺR2R_1 \cup R_2 is always an equivalence relation.","B. R1∩R2R_1 \cap R_2 is always an equivalence relation.","C. If A={1,2,3}A=\{1,2,3\}, R1={(1,1),(2,2),(3,3),(1,2),(2,1)}R_1=\{(1,1),(2,2),(3,3),(1,2),(2,1)\}, and R2={(1,1),(2,2),(3,3),(2,3),(3,2)}R_2=\{(1,1),(2,2),(3,3),(2,3),(3,2)\}, then R1βˆͺR2R_1 \cup R_2 is not transitive.","D. If R1R_1 and R2R_2 are partial orders on AA, then R1βˆͺR2R_1 \cup R_2 is always a partial order.""] answer="B,C" hint="Recall the properties of union and intersection of relations. For union, consider a counterexample for transitivity." solution="
    Step 1: Evaluate Option A: R1βˆͺR2R_1 \cup R_2 is always an equivalence relation.
    This statement is False. While R1βˆͺR2R_1 \cup R_2 will be reflexive and symmetric if R1R_1 and R2R_2 are, it is not necessarily transitive.
    Consider the counterexample provided in the notes:
    Let A={1,2,3}A = \{1,2,3\}.
    R1={(1,1),(2,2),(3,3),(1,2),(2,1)}R_1 = \{(1,1), (2,2), (3,3), (1,2), (2,1)\} (equivalence relation on AA).
    R2={(1,1),(2,2),(3,3),(2,3),(3,2)}R_2 = \{(1,1), (2,2), (3,3), (2,3), (3,2)\} (equivalence relation on AA).
    Then R1βˆͺR2={(1,1),(2,2),(3,3),(1,2),(2,1),(2,3),(3,2)}R_1 \cup R_2 = \{(1,1), (2,2), (3,3), (1,2), (2,1), (2,3), (3,2)\}.
    We have (1,2)∈R1βˆͺR2(1,2) \in R_1 \cup R_2 and (2,3)∈R1βˆͺR2(2,3) \in R_1 \cup R_2. For transitivity, (1,3)(1,3) must be in R1βˆͺR2R_1 \cup R_2, but it is not.
    So, R1βˆͺR2R_1 \cup R_2 is not transitive, and thus not an equivalence relation.

    Step 2: Evaluate Option B: R1∩R2R_1 \cap R_2 is always an equivalence relation.
    This statement is True. As discussed in the notes:

    • Reflexivity: If R1,R2R_1, R_2 are reflexive, then for all a∈Aa \in A, (a,a)∈R1(a,a) \in R_1 and (a,a)∈R2(a,a) \in R_2. Thus (a,a)∈R1∩R2(a,a) \in R_1 \cap R_2.

    • Symmetry: If (a,b)∈R1∩R2(a,b) \in R_1 \cap R_2, then (a,b)∈R1(a,b) \in R_1 and (a,b)∈R2(a,b) \in R_2. Since R1,R2R_1, R_2 are symmetric, (b,a)∈R1(b,a) \in R_1 and (b,a)∈R2(b,a) \in R_2. Thus (b,a)∈R1∩R2(b,a) \in R_1 \cap R_2.

    • Transitivity: If (a,b)∈R1∩R2(a,b) \in R_1 \cap R_2 and (b,c)∈R1∩R2(b,c) \in R_1 \cap R_2, then (a,b)∈R1(a,b) \in R_1, (b,c)∈R1(b,c) \in R_1 and (a,b)∈R2(a,b) \in R_2, (b,c)∈R2(b,c) \in R_2. Since R1,R2R_1, R_2 are transitive, (a,c)∈R1(a,c) \in R_1 and (a,c)∈R2(a,c) \in R_2. Thus (a,c)∈R1∩R2(a,c) \in R_1 \cap R_2.


    Step 3: Evaluate Option C: If A={1,2,3}A=\{1,2,3\}, R1={(1,1),(2,2),(3,3),(1,2),(2,1)}R_1=\{(1,1),(2,2),(3,3),(1,2),(2,1)\}, and R2={(1,1),(2,2),(3,3),(2,3),(3,2)}R_2=\{(1,1),(2,2),(3,3),(2,3),(3,2)\}, then R1βˆͺR2R_1 \cup R_2 is not transitive.
    This statement is True. This is the exact counterexample used for Option A. As shown in Step 1, R1βˆͺR2R_1 \cup R_2 for these specific relations is not transitive because (1,2)∈R1βˆͺR2(1,2) \in R_1 \cup R_2 and (2,3)∈R1βˆͺR2(2,3) \in R_1 \cup R_2, but (1,3)βˆ‰R1βˆͺR2(1,3) \notin R_1 \cup R_2.

    Step 4: Evaluate Option D: If R1R_1 and R2R_2 are partial orders on AA, then R1βˆͺR2R_1 \cup R_2 is always a partial order.
    This statement is False. A partial order must be reflexive, antisymmetric, and transitive.
    While R1βˆͺR2R_1 \cup R_2 will be reflexive (if AA is non-empty), it is not necessarily antisymmetric or transitive.
    Counterexample for antisymmetry: Let A={1,2,3}A=\{1,2,3\}.
    R1={(1,1),(2,2),(3,3),(1,2)}R_1 = \{(1,1), (2,2), (3,3), (1,2)\} (partial order).
    R2={(1,1),(2,2),(3,3),(2,1)}R_2 = \{(1,1), (2,2), (3,3), (2,1)\} (partial order).
    R1βˆͺR2={(1,1),(2,2),(3,3),(1,2),(2,1)}R_1 \cup R_2 = \{(1,1), (2,2), (3,3), (1,2), (2,1)\}.
    This union is not antisymmetric because (1,2)∈R1βˆͺR2(1,2) \in R_1 \cup R_2 and (2,1)∈R1βˆͺR2(2,1) \in R_1 \cup R_2, but 1β‰ 21 \neq 2.
    Counterexample for transitivity (similar to equivalence relations):
    Let A={1,2,3}A=\{1,2,3\}.
    R1={(1,1),(2,2),(3,3),(1,2)}R_1 = \{(1,1), (2,2), (3,3), (1,2)\}
    R2={(1,1),(2,2),(3,3),(2,3)}R_2 = \{(1,1), (2,2), (3,3), (2,3)\}
    R1βˆͺR2={(1,1),(2,2),(3,3),(1,2),(2,3)}R_1 \cup R_2 = \{(1,1), (2,2), (3,3), (1,2), (2,3)\}.
    Here, (1,2)∈R1βˆͺR2(1,2) \in R_1 \cup R_2 and (2,3)∈R1βˆͺR2(2,3) \in R_1 \cup R_2, but (1,3)βˆ‰R1βˆͺR2(1,3) \notin R_1 \cup R_2. So it's not transitive.

    Final Answer: Options B and C are true.
    Answer: \boxed{B,C}
    "
    :::

    :::question type="SUB" question="Let A={1,2,3}A = \{1, 2, 3\}. A relation RR on AA is defined as R={(1,2),(2,3)}R = \{(1,2), (2,3)\}. Find the smallest relation Rβ€²R' on AA that contains RR and is an equivalence relation. List all ordered pairs in Rβ€²R'." answer="R' = {(1,1), (2,2), (3,3), (1,2), (2,1), (2,3), (3,2), (1,3), (3,1)}" hint="To make RR an equivalence relation, you must ensure it is reflexive, symmetric, and transitive. Start by adding pairs for reflexivity, then symmetry, then transitivity. Repeat until all conditions are met." solution="
    Step 1: Start with the given relation RR.

    R={(1,2),(2,3)}R = \{(1,2), (2,3)\}

    Step 2: Make RR reflexive.
    To be reflexive, all (a,a)(a,a) for a∈Aa \in A must be in the relation. Add (1,1),(2,2),(3,3)(1,1), (2,2), (3,3).

    R1=Rβˆͺ{(1,1),(2,2),(3,3)}R_1 = R \cup \{(1,1), (2,2), (3,3)\}

    R1={(1,1),(2,2),(3,3),(1,2),(2,3)}R_1 = \{(1,1), (2,2), (3,3), (1,2), (2,3)\}

    Step 3: Make R1R_1 symmetric.
    For every (a,b)∈R1(a,b) \in R_1, (b,a)(b,a) must also be in R1R_1.
    From (1,2)∈R1(1,2) \in R_1, add (2,1)(2,1).
    From (2,3)∈R1(2,3) \in R_1, add (3,2)(3,2).

    R2=R1βˆͺ{(2,1),(3,2)}R_2 = R_1 \cup \{(2,1), (3,2)\}

    R2={(1,1),(2,2),(3,3),(1,2),(2,1),(2,3),(3,2)}R_2 = \{(1,1), (2,2), (3,3), (1,2), (2,1), (2,3), (3,2)\}

    At this point, R2R_2 is reflexive and symmetric.

    Step 4: Make R2R_2 transitive.
    We need to check all pairs (a,b)(a,b) and (b,c)(b,c) in R2R_2 and ensure (a,c)(a,c) is also in R2R_2.

    • (1,2)∈R2(1,2) \in R_2 and (2,1)∈R2β€…β€ŠβŸΉβ€…β€Š(1,1)∈R2(2,1) \in R_2 \implies (1,1) \in R_2 (already present).

    • (1,2)∈R2(1,2) \in R_2 and (2,3)∈R2β€…β€ŠβŸΉβ€…β€Š(1,3)(2,3) \in R_2 \implies (1,3) must be in R2R_2. Add (1,3)(1,3).

    • (2,1)∈R2(2,1) \in R_2 and (1,2)∈R2β€…β€ŠβŸΉβ€…β€Š(2,2)∈R2(1,2) \in R_2 \implies (2,2) \in R_2 (already present).

    • (2,3)∈R2(2,3) \in R_2 and (3,2)∈R2β€…β€ŠβŸΉβ€…β€Š(2,2)∈R2(3,2) \in R_2 \implies (2,2) \in R_2 (already present).

    • (3,2)∈R2(3,2) \in R_2 and (2,1)∈R2β€…β€ŠβŸΉβ€…β€Š(3,1)(2,1) \in R_2 \implies (3,1) must be in R2R_2. Add (3,1)(3,1).

    • (3,2)∈R2(3,2) \in R_2 and (2,3)∈R2β€…β€ŠβŸΉβ€…β€Š(3,3)∈R2(2,3) \in R_2 \implies (3,3) \in R_2 (already present).


    Let's update the relation after adding (1,3)(1,3) and (3,1)(3,1):
    R3=R2βˆͺ{(1,3),(3,1)}R_3 = R_2 \cup \{(1,3), (3,1)\}

    R3={(1,1),(2,2),(3,3),(1,2),(2,1),(2,3),(3,2),(1,3),(3,1)}R_3 = \{(1,1), (2,2), (3,3), (1,2), (2,1), (2,3), (3,2), (1,3), (3,1)\}

    Step 5: Re-check symmetry for R3R_3.
    We added (1,3)(1,3), so we need (3,1)(3,1). This was added.
    We added (3,1)(3,1), so we need (1,3)(1,3). This was added.
    R3R_3 is still symmetric.

    Step 6: Re-check transitivity for R3R_3 (newly formed chains).

    • (1,3)∈R3(1,3) \in R_3 and (3,1)∈R3β€…β€ŠβŸΉβ€…β€Š(1,1)∈R3(3,1) \in R_3 \implies (1,1) \in R_3 (present).

    • (3,1)∈R3(3,1) \in R_3 and (1,3)∈R3β€…β€ŠβŸΉβ€…β€Š(3,3)∈R3(1,3) \in R_3 \implies (3,3) \in R_3 (present).

    • (1,3)∈R3(1,3) \in R_3 and (3,2)∈R3β€…β€ŠβŸΉβ€…β€Š(1,2)∈R3(3,2) \in R_3 \implies (1,2) \in R_3 (present).

    • (2,1)∈R3(2,1) \in R_3 and (1,3)∈R3β€…β€ŠβŸΉβ€…β€Š(2,3)∈R3(1,3) \in R_3 \implies (2,3) \in R_3 (present).

    All other chains involve elements already checked or identity elements.
    The relation R3R_3 is now reflexive, symmetric, and transitive.

    The smallest equivalence relation Rβ€²R' containing RR is R3R_3.

    Rβ€²={(1,1),(2,2),(3,3),(1,2),(2,1),(2,3),(3,2),(1,3),(3,1)}R' = \{(1,1), (2,2), (3,3), (1,2), (2,1), (2,3), (3,2), (1,3), (3,1)\}

    Answer: \boxed{R' = \{(1,1), (2,2), (3,3), (1,2), (2,1), (2,3), (3,2), (1,3), (3,1)\}}
    "
    :::

    :::question type="NAT" question="Consider the set A={(x,y)∈ZΓ—Z∣∣x∣+∣y∣=5}A = \{(x,y) \in \mathbb{Z} \times \mathbb{Z} \mid |x| + |y| = 5\}. How many points in AA have coordinates where xβ‰₯0x \ge 0 and yβ‰₯0y \ge 0?" answer="6" hint="This is a counting problem based on absolute value equations. Break it down by quadrants or cases for x,yβ‰₯0x, y \ge 0." solution="
    Step 1: Understand the given set AA.
    The set AA consists of integer coordinate points (x,y)(x,y) such that ∣x∣+∣y∣=5|x| + |y| = 5.

    Step 2: Focus on the condition xβ‰₯0x \ge 0 and yβ‰₯0y \ge 0.
    If xβ‰₯0x \ge 0 and yβ‰₯0y \ge 0, then ∣x∣=x|x| = x and ∣y∣=y|y| = y.
    The equation becomes x+y=5x + y = 5.

    Step 3: List integer solutions for x+y=5x+y=5 where xβ‰₯0x \ge 0 and yβ‰₯0y \ge 0.
    Possible pairs (x,y)(x,y) are:

    • If x=0x=0, then y=5y=5. So (0,5)(0,5).

    • If x=1x=1, then y=4y=4. So (1,4)(1,4).

    • If x=2x=2, then y=3y=3. So (2,3)(2,3).

    • If x=3x=3, then y=2y=2. So (3,2)(3,2).

    • If x=4x=4, then y=1y=1. So (4,1)(4,1).

    • If x=5x=5, then y=0y=0. So (5,0)(5,0).


    Step 4: Count the number of such points.
    There are 66 distinct points that satisfy the conditions.
    Answer: \boxed{6}
    "
    :::

    :::question type="MCQ" question="Let PP be the power set of {a,b}\{a, b\}. A relation RR on PP is defined as XRYX R Y if and only if XβŠ†YX \subseteq Y. Which of the following properties does RR possess?" options=["A. Reflexive, Symmetric, Not Transitive","B. Reflexive, Antisymmetric, Transitive","C. Irreflexive, Symmetric, Transitive","D. Irreflexive, Antisymmetric, Not Transitive"] answer="B. Reflexive, Antisymmetric, Transitive" hint="Recall the properties of the subset relation (βŠ†\subseteq)." solution="
    Step 1: Determine the set PP.
    The power set of {a,b}\{a, b\} is P={βˆ…,{a},{b},{a,b}}P = \{\emptyset, \{a\}, \{b\}, \{a,b\}\}.

    Step 2: List the relation RR explicitly.
    XRYβ€…β€ŠβŸΊβ€…β€ŠXβŠ†YX R Y \iff X \subseteq Y.

    R={(βˆ…,βˆ…),(βˆ…,{a}),(βˆ…,{b}),(βˆ…,{a,b}),({a},{a}),({a},{a,b}),({b},{b}),({b},{a,b}),({a,b},{a,b})}R = \{ (\emptyset, \emptyset), (\emptyset, \{a\}), (\emptyset, \{b\}), (\emptyset, \{a,b\}), \\
    (\{a\}, \{a\}), (\{a\}, \{a,b\}), \\
    (\{b\}, \{b\}), (\{b\}, \{a,b\}), \\
    (\{a,b\}, \{a,b\}) \}

    Step 3: Check Reflexivity.
    For any X∈PX \in P, XβŠ†XX \subseteq X is always true.
    So, (βˆ…,βˆ…),({a},{a}),({b},{b}),({a,b},{a,b})(\emptyset, \emptyset), (\{a\}, \{a\}), (\{b\}, \{b\}), (\{a,b\}, \{a,b\}) are all in RR.
    RR is reflexive.

    Step 4: Check Symmetry.
    If XRYX R Y, does YRXY R X imply X=YX=Y? No, for symmetry, if XRYX R Y, then YRXY R X must hold without X=YX=Y.
    Consider (βˆ…,{a})∈R(\emptyset, \{a\}) \in R. For RR to be symmetric, ({a},βˆ…)(\{a\}, \emptyset) must be in RR. But {a}βŠ†ΜΈβˆ…\{a\} \not\subseteq \emptyset.
    So, RR is NOT symmetric.

    Step 5: Check Antisymmetry.
    If XRYX R Y and YRXY R X, then X=YX=Y.
    This means if XβŠ†YX \subseteq Y and YβŠ†XY \subseteq X, then X=YX=Y. This is a fundamental property of sets.
    So, RR IS antisymmetric.

    Step 6: Check Transitivity.
    If XRYX R Y and YRZY R Z, then XRZX R Z.
    This means if XβŠ†YX \subseteq Y and YβŠ†ZY \subseteq Z, then XβŠ†ZX \subseteq Z. This is also a fundamental property of sets.
    So, RR IS transitive.

    Step 7: Evaluate the options.

    • A. Reflexive, Symmetric, Not Transitive (False, not symmetric, is transitive)

    • B. Reflexive, Antisymmetric, Transitive (True)

    • C. Irreflexive, Symmetric, Transitive (False, is reflexive, not symmetric)

    • D. Irreflexive, Antisymmetric, Not Transitive (False, is reflexive, is transitive)


    Therefore, RR is reflexive, antisymmetric, and transitive. This means RR is a partial order.
    Answer: \boxed{B. Reflexive, Antisymmetric, Transitive}
    "
    :::

    ---

    ---

    Summary

    ❗ Key Takeaways for CMI

    • Definitions are King: Precisely understand reflexivity, symmetry, antisymmetry, and transitivity. Small nuances (like the "if and only if" vs. "if...then") make a big difference.

    • Equivalence vs. Partial Order: Equivalence relations (reflexive, symmetric, transitive) partition a set into disjoint equivalence classes. Partial orders (reflexive, antisymmetric, transitive) establish an ordering, where not all elements need to be comparable.

    • Relation Operations: Know how to perform union, intersection, and especially composition. Understand their impact on properties (e.g., intersection of equivalence relations is always an equivalence relation, but union is not).

    • Closures: The concept of transitive closure is vital for problems involving "paths" or "reachability."

    • Graph Connections: Relations can be represented as digraphs. Concepts like the Handshaking Lemma (sum of degrees is 2∣E∣2|E|) are direct applications of relation/graph theory.

    ---

    What's Next?

    πŸ’‘ Continue Learning

    This topic connects to:

      • Graph Theory: Relations are directly represented as graphs. Understanding graph properties, connectivity, and algorithms (e.g., Warshall's algorithm for transitive closure) builds upon relation concepts.

      • Abstract Algebra: Equivalence relations are fundamental to constructing quotient sets and defining algebraic structures like groups, rings, and fields modulo an equivalence relation.

      • Formal Languages and Automata: Equivalence relations are used to define states in finite automata and minimize them. The concept of "equivalence classes of words" as seen in PYQs often arises here.

      • Set Theory: Relations are defined as subsets of Cartesian products, so a strong grasp of set operations and properties is essential.


    Master these connections for comprehensive CMI preparation!

    Chapter Summary

    πŸ“– Sets and Relations - Key Takeaways

    To excel in CMI, ensure you have a firm grasp of the following essential concepts from Sets and Relations:

    • Fundamental Set Operations and Properties: Master the definitions and properties of union (βˆͺ\cup), intersection (∩\cap), complement (AcA^c or Aβˆ–BA \setminus B), Cartesian product (Γ—\times), and power set (P(A)P(A)). Understand how to apply the Principle of Inclusion-Exclusion for calculating cardinalities of unions of finite sets.

    • Precise Definitions of Relations: Understand what constitutes a binary relation on a set AA, and be able to identify its domain, codomain, and range. Practice listing ordered pairs for relations defined by specific rules.

    • Properties of Relations: Know the definitions and how to verify if a given relation is reflexive, symmetric, antisymmetric, and transitive. Be prepared to provide counterexamples if a property does not hold.

    • Equivalence Relations and Partitions: Recognize that an equivalence relation is one that is reflexive, symmetric, and transitive. Crucially, understand the one-to-one correspondence between equivalence relations on a set and partitions of that set. Be able to find equivalence classes.

    • Partial Orders: Understand that a partial order is a relation that is reflexive, antisymmetric, and transitive. Be familiar with concepts like minimal/maximal elements, greatest lower bound (GLB), and least upper bound (LUB), and how to represent partial orders using Hasse diagrams.

    • Functions as Special Relations: A function f:Aβ†’Bf: A \to B is a relation where every element in AA is mapped to exactly one element in BB. Differentiate between injective (one-to-one), surjective (onto), and bijective (one-to-one correspondence) functions.

    • Counting Principles for Sets and Relations: Be able to count the number of possible relations, reflexive relations, symmetric relations, and functions (injective, surjective, bijective) between finite sets. This often involves applying combinatorial techniques.

    ---

    Chapter Review Questions

    :::question type="MCQ" question="Let A={1,2,3,4}A = \{1, 2, 3, 4\}. Consider two relations R1R_1 and R2R_2 on AA.
    R1={(x,y)∈AΓ—A∣x+yΒ isΒ even}R_1 = \{(x, y) \in A \times A \mid x+y \text{ is even}\}
    R2={(x,y)∈AΓ—A∣xΒ dividesΒ y}R_2 = \{(x, y) \in A \times A \mid x \text{ divides } y\}

    Which of the following statements about R1∩R2R_1 \cap R_2 is true?" options=["(A) R1∩R2R_1 \cap R_2 is reflexive but not symmetric." "(B) R1∩R2R_1 \cap R_2 is symmetric but not reflexive." "(C) R1∩R2R_1 \cap R_2 is an equivalence relation." "(D) R1∩R2R_1 \cap R_2 is neither reflexive nor symmetric."] answer="(A)" hint="First, list the elements of R1R_1 and R2R_2. Then find R1∩R2R_1 \cap R_2. Finally, check its properties: reflexivity, symmetry, and transitivity." solution="Let's first list the elements of R1R_1 and R2R_2:

    R1={(x,y)∈AΓ—A∣x+yΒ isΒ even}R_1 = \{(x, y) \in A \times A \mid x+y \text{ is even}\}. This means xx and yy must have the same parity (both even or both odd).

    R1={(1,1),(1,3),(2,2),(2,4),(3,1),(3,3),(4,2),(4,4)}R_1 = \{(1,1), (1,3), (2,2), (2,4), (3,1), (3,3), (4,2), (4,4)\}

    R2={(x,y)∈AΓ—A∣xΒ dividesΒ y}R_2 = \{(x, y) \in A \times A \mid x \text{ divides } y\}.

    R2={(1,1),(1,2),(1,3),(1,4),(2,2),(2,4),(3,3),(4,4)}R_2 = \{(1,1), (1,2), (1,3), (1,4), (2,2), (2,4), (3,3), (4,4)\}

    Now, let's find R1∩R2R_1 \cap R_2:

    R1∩R2={(1,1),(1,3),(2,2),(2,4),(3,3),(4,4)}R_1 \cap R_2 = \{(1,1), (1,3), (2,2), (2,4), (3,3), (4,4)\}

    Let's check the properties of R1∩R2R_1 \cap R_2:

  • Reflexivity: A relation RR on AA is reflexive if (x,x)∈R(x,x) \in R for all x∈Ax \in A.

  • For A={1,2,3,4}A = \{1, 2, 3, 4\}, we need (1,1),(2,2),(3,3),(4,4)(1,1), (2,2), (3,3), (4,4) to be in R1∩R2R_1 \cap R_2.
    All these pairs are present in R1∩R2R_1 \cap R_2.
    Therefore, R1∩R2R_1 \cap R_2 is reflexive.

  • Symmetry: A relation RR is symmetric if whenever (x,y)∈R(x,y) \in R, then (y,x)∈R(y,x) \in R.

  • Consider (1,3)∈R1∩R2(1,3) \in R_1 \cap R_2. For R1∩R2R_1 \cap R_2 to be symmetric, (3,1)(3,1) must also be in R1∩R2R_1 \cap R_2.
    However, (3,1)βˆ‰R1∩R2(3,1) \notin R_1 \cap R_2 (it is in R1R_1 but not in R2R_2 because 33 does not divide 11).
    Therefore, R1∩R2R_1 \cap R_2 is not symmetric.

    Since R1∩R2R_1 \cap R_2 is reflexive but not symmetric, it cannot be an equivalence relation (which requires symmetry).
    The correct statement is (A).

    Let's quickly check transitivity for completeness, though not required by options:
    Consider (1,3)∈R1∩R2(1,3) \in R_1 \cap R_2 and there is no (3,z)∈R1∩R2(3,z) \in R_1 \cap R_2 where zβ‰ 1z \ne 1.
    Consider (2,4)∈R1∩R2(2,4) \in R_1 \cap R_2. There is no (4,z)∈R1∩R2(4,z) \in R_1 \cap R_2 where zβ‰ 4z \ne 4.
    It might seem transitive, but let's be careful. If (x,y)∈R1∩R2(x,y) \in R_1 \cap R_2 and (y,z)∈R1∩R2(y,z) \in R_1 \cap R_2, then (x,z)(x,z) must be in R1∩R2R_1 \cap R_2.
    For example, (1,1)∈R1∩R2(1,1) \in R_1 \cap R_2 and (1,3)∈R1∩R2(1,3) \in R_1 \cap R_2. Then (1,3)(1,3) must be in R1∩R2R_1 \cap R_2, which it is.
    If we had (1,2)(1,2) in R1∩R2R_1 \cap R_2 and (2,4)(2,4) in R1∩R2R_1 \cap R_2, then (1,4)(1,4) would need to be in R1∩R2R_1 \cap R_2. But (1,2)βˆ‰R1∩R2(1,2) \notin R_1 \cap R_2.
    The relation R1∩R2R_1 \cap R_2 is indeed transitive, but since it is not symmetric, it is not an equivalence relation.

    The final answer is (A)\boxed{\text{(A)}}"
    :::

    :::question type="NAT" question="Let SS be a finite set with ∣S∣=n|S|=n. What is the number of relations on SS that are both reflexive and symmetric?" answer="2^{n(n-1)/2}" hint="A relation RR on SS is a subset of SΓ—SS \times S. Consider the conditions for reflexivity and symmetry on the elements (x,y)∈SΓ—S(x,y) \in S \times S." solution="Let SS be a set with ∣S∣=n|S|=n. A relation RR on SS is a subset of SΓ—SS \times S. The total number of possible ordered pairs in SΓ—SS \times S is n2n^2.

  • Reflexivity condition: For RR to be reflexive, all pairs (x,x)(x,x) for x∈Sx \in S must be in RR. There are nn such diagonal pairs: (1,1),(2,2),…,(n,n)(1,1), (2,2), \dots, (n,n). The inclusion of these nn pairs is mandatory.
  • Symmetry condition: For RR to be symmetric, if (x,y)∈R(x,y) \in R, then (y,x)(y,x) must also be in RR.

  • Consider the off-diagonal pairs, where xβ‰ yx \ne y. There are n2βˆ’n=n(nβˆ’1)n^2 - n = n(n-1) such pairs.
    These off-diagonal pairs can be grouped into n(nβˆ’1)2\frac{n(n-1)}{2} distinct pairs of the form {(x,y),(y,x)}\{(x,y), (y,x)\} where xβ‰ yx \ne y. For example, if n=3n=3, SΓ—SS \times S has 9 pairs.
    Diagonal pairs: (1,1),(2,2),(3,3)(1,1), (2,2), (3,3). (3 pairs)
    Off-diagonal pairs: (1,2),(2,1),(1,3),(3,1),(2,3),(3,2)(1,2), (2,1), (1,3), (3,1), (2,3), (3,2). (6 pairs)
    These form 3 sets: {(1,2),(2,1)}\{(1,2), (2,1)\}, {(1,3),(3,1)}\{(1,3), (3,1)\}, {(2,3),(3,2)}\{(2,3), (3,2)\}.

    For each of these n(nβˆ’1)2\frac{n(n-1)}{2} groups of two distinct off-diagonal pairs {(x,y),(y,x)}\{(x,y), (y,x)\}, we have two choices for RR:
    * Include both (x,y)(x,y) and (y,x)(y,x) in RR.
    * Include neither (x,y)(x,y) nor (y,x)(y,x) in RR.
    We cannot include one without the other, as that would violate symmetry.

    So, for the nn diagonal pairs, there is only 1 choice (they must all be in RR).
    For the n(nβˆ’1)2\frac{n(n-1)}{2} groups of off-diagonal pairs, there are 2 choices for each group.

    Therefore, the total number of relations that are both reflexive and symmetric is 1Γ—2n(nβˆ’1)21 \times 2^{\frac{n(n-1)}{2}}.

    The final answer is 2n(nβˆ’1)/2\boxed{2^{n(n-1)/2}}"
    :::

    :::question type="NAT" question="Let A={1,2,3,4,5,6}A = \{1, 2, 3, 4, 5, 6\}. How many functions f:Aβ†’Af: A \to A are there such that ff is injective and f(x)β‰ xf(x) \ne x for all x∈Ax \in A?" answer="265" hint="An injective function from AA to AA is a permutation. The condition f(x)β‰ xf(x) \ne x means it's a derangement. Recall the formula for derangements." solution="The set AA has ∣A∣=6|A|=6 elements.
    A function f:A→Af: A \to A that is injective (one-to-one) is also surjective (onto) when the domain and codomain are the same finite set. Such a function is called a permutation of AA.
    The condition f(x)β‰ xf(x) \ne x for all x∈Ax \in A means that ff is a derangement. A derangement is a permutation where no element is mapped to itself.

    The number of derangements of a set of nn elements, denoted by DnD_n or !n!n, is given by the formula:

    Dn=n!βˆ‘k=0n(βˆ’1)kk!=n!(10!βˆ’11!+12!βˆ’β‹―+(βˆ’1)nn!)D_n = n! \sum_{k=0}^{n} \frac{(-1)^k}{k!} = n! \left( \frac{1}{0!} - \frac{1}{1!} + \frac{1}{2!} - \dots + \frac{(-1)^n}{n!} \right)

    For n=6n=6, we need to calculate D6D_6:
    D6=6!(10!βˆ’11!+12!βˆ’13!+14!βˆ’15!+16!)D_6 = 6! \left( \frac{1}{0!} - \frac{1}{1!} + \frac{1}{2!} - \frac{1}{3!} + \frac{1}{4!} - \frac{1}{5!} + \frac{1}{6!} \right)

    D6=720(1βˆ’1+12βˆ’16+124βˆ’1120+1720)D_6 = 720 \left( 1 - 1 + \frac{1}{2} - \frac{1}{6} + \frac{1}{24} - \frac{1}{120} + \frac{1}{720} \right)

    D6=720(12βˆ’16+124βˆ’1120+1720)D_6 = 720 \left( \frac{1}{2} - \frac{1}{6} + \frac{1}{24} - \frac{1}{120} + \frac{1}{720} \right)

    D6=7202βˆ’7206+72024βˆ’720120+720720D_6 = \frac{720}{2} - \frac{720}{6} + \frac{720}{24} - \frac{720}{120} + \frac{720}{720}

    D6=360βˆ’120+30βˆ’6+1D_6 = 360 - 120 + 30 - 6 + 1

    D6=240+30βˆ’6+1D_6 = 240 + 30 - 6 + 1

    D6=270βˆ’6+1D_6 = 270 - 6 + 1

    D6=264+1D_6 = 264 + 1

    D6=265D_6 = 265

    The final answer is 265\boxed{265}"
    :::

    :::question type="NAT" question="Let S={1,2,3,…,10}S = \{1, 2, 3, \ldots, 10\}. How many non-empty proper subsets of SS contain exactly 3 even numbers?" answer="320" hint="Break the problem into choosing even numbers and choosing odd numbers. Remember the conditions: non-empty and proper." solution="Let S={1,2,3,…,10}S = \{1, 2, 3, \ldots, 10\}.
    The even numbers in SS are E={2,4,6,8,10}E = \{2, 4, 6, 8, 10\}, so ∣E∣=5|E|=5.
    The odd numbers in SS are O={1,3,5,7,9}O = \{1, 3, 5, 7, 9\}, so ∣O∣=5|O|=5.

    We are looking for the number of subsets AβŠ†SA \subseteq S such that:

  • AA is non-empty.

  • AA is a proper subset of SS (i.e., Aβ‰ SA \ne S).

  • AA contains exactly 3 even numbers.
  • Let's construct such a subset AA.
    Step 1: Choose the even numbers for AA.
    Since AA must contain exactly 3 even numbers, we choose 3 elements from the set EE.
    The number of ways to do this is (∣E∣3)=(53)\binom{|E|}{3} = \binom{5}{3}.

    (53)=5!3!2!=5Γ—42Γ—1=10\binom{5}{3} = \frac{5!}{3!2!} = \frac{5 \times 4}{2 \times 1} = 10

    Step 2: Choose the odd numbers for AA.
    The remaining elements of AA (if any) must be chosen from the set OO. We can choose any number of odd elements (from 0 to all ∣O∣|O|).
    For each of the 5 odd numbers in OO, we have two choices: either include it in AA or not.
    The number of ways to choose odd numbers for AA is 2∣O∣=25=322^{|O|} = 2^5 = 32.

    Step 3: Combine the choices.
    The total number of subsets that contain exactly 3 even numbers is the product of the choices from Step 1 and Step 2:

    NumberΒ ofΒ subsets=(53)Γ—25=10Γ—32=320\text{Number of subsets} = \binom{5}{3} \times 2^5 = 10 \times 32 = 320

    Step 4: Check the conditions (non-empty and proper subset).
    * Non-empty: Any subset constructed this way will always contain 3 even numbers, so it will have at least 3 elements. Thus, all 320 subsets are non-empty.
    * Proper subset: A subset AA is proper if A≠SA \ne S. The set SS contains 5 even numbers. Since all our constructed subsets AA contain exactly 3 even numbers (which is not 5), none of these subsets can be equal to SS. Thus, all 320 subsets are proper subsets.

    Therefore, the number of non-empty proper subsets of SS that contain exactly 3 even numbers is 320.

    The final answer is 320\boxed{320}"
    :::

    ---

    What's Next?

    πŸ’‘ Continue Your CMI Journey

    You've mastered Sets and Relations! This foundational chapter is critical for many advanced topics in mathematics, especially those emphasized in the CMI entrance exam.

    Key connections and next steps:

    Building on Functions: The concept of functions as special relations is fundamental. Your next steps will involve a deeper dive into properties of functions (e.g., composition, inverse, specific types like permutations and derangements), and advanced counting techniques for functions.
    Combinatorics: Sets and Relations are the bedrock of Combinatorics. The counting principles you've learned here (like inclusion-exclusion, counting subsets, relations, and functions) directly apply to permutations, combinations, partitions, and other advanced combinatorial problems. Prepare to tackle problems involving binomial coefficients, generating functions, and recurrence relations.
    Discrete Structures: This chapter provides essential building blocks for other discrete mathematical structures. For instance, relations are generalized to graphs (where vertices are related by edges), and partially ordered sets (posets) lead to the study of lattices, which are important in various areas of theoretical computer science and logic.
    Mathematical Proofs: The rigorous definitions and property checks in Sets and Relations offer excellent practice in constructing formal mathematical proofs and understanding logical arguments, skills that are indispensable for CMI.

    🎯 Key Points to Remember

    • βœ“ Master the core concepts in Sets and Relations before moving to advanced topics
    • βœ“ Practice with previous year questions to understand exam patterns
    • βœ“ Review short notes regularly for quick revision before exams

    Related Topics in Discrete Mathematics

    More Resources

    Why Choose MastersUp?

    🎯

    AI-Powered Plans

    Personalized study schedules based on your exam date and learning pace

    πŸ“š

    15,000+ Questions

    Verified questions with detailed solutions from past papers

    πŸ“Š

    Smart Analytics

    Track your progress with subject-wise performance insights

    πŸ”–

    Bookmark & Revise

    Save important questions for quick revision before exams

    Start Your Free Preparation β†’

    No credit card required β€’ Free forever for basic features