BCS303 · Discrete Structures & Theory of Logic · Unit 1
Set Theory& Relations
Unit Scope & Exam Weightage: This unit moves from sets to relations and then to ordered structures: Introduction, Combination of sets, Relations: Definition, Operations on relations, Properties of relations, Composite Relations, Equality of relations, Recursive definition of relation, Order of relations, POSET & Lattices: Hasse Diagram, POSET, Definition & Properties of lattices – Bounded, Complemented, Distributed, and Modular and Complete lattice. The corpus records 14 PYQ clusters worth about 68 marks; lattice questions dominate (23 marks), closely followed by relation properties (16 marks).
Front Page: Importance-Wise Topic Roadmap (2023–26 PYQs)
| Priority | Topic (Exact Syllabus) | PYQs Asked | Marks Weightage | Tag |
|---|---|---|---|---|
| 1 | Definition & Properties of lattices – Bounded | 4 (2023-24 ×2, 2024-25, 2025-26) |
7m × 3 + 2m | Survival Mode |
| 2 | Properties of relations | 3 (2023-24, 2024-25, 2025-26) |
7m + 7m + 2m | Survival Mode Proof |
| 3 | POSET & Lattices: Hasse Diagram | 2 (2023-24, 2025-26) |
7m × 2 | Diagram |
| 4 | Combination of sets | 2 (2023-24, 2024-25) |
2m × 2 | Core Concept |
| 5 | Composite Relations | 1 (2024-25) |
7m | Algorithm |
| 6 | Relations: Definition | 1 (2024-25) |
2m | Counting |
| 7 | POSET | 1 (2023-24) |
2m | Core Concept |
| 8 | Introduction | 0 direct | — | Predicted |
| 9 | Operations on relations | 0 direct | — | Supporting Concept |
| 10 | Equality of relations | 0 direct | — | Supporting Concept |
| 11 | Recursive definition of relation | 0 direct | — | Predicted |
| 12 | Order of relations | 0 direct | — | Supporting Concept |
| 13 | Complemented | integrated in #1 / #7 | — | Supporting Concept |
| 14 | Distributed | integrated in #1 | — | Supporting Concept |
| 15 | Modular and Complete lattice | 0 direct | — | Predicted |
2-Hour Last-Night Survival Checklist:
- Lattices (#1): A lattice is a poset where every pair has a join (LUB) and a meet (GLB). For : join = lcm, meet = gcd. For every pair's lcm/gcd stays in , so it is a lattice.
- Relation properties (#2): reflexive = diagonal 1s; symmetric = matrix equals its transpose; transitive = . The "same number of 0s" relation is an equivalence relation, not a partial order (antisymmetry fails: 01 and 10).
- Inverse equivalence proof: for write three labelled lines — reflexive from , symmetric using 's symmetry, transitive using and then inverting.
- Hasse diagrams (#3): vertices are elements; draw an edge only when covers ; omit reflexive loops and transitive edges. For use levels 1–3–3–1.
- Warshall (#5): for iterate using ; the final matrix is all 1s, so the closure is .
1. Introduction and Combination of Sets
Set: an unordered collection of distinct objects, called elements. A set is written with braces, e.g. , and means " is an element of ".
1.1 Set Operations
| Operation | Notation | Meaning |
|---|---|---|
| Union | elements in or | |
| Intersection | elements in and | |
| Difference | elements in but not | |
| Complement | elements of the universal set not in | |
| Power set | set of all subsets of | |
| Cartesian product | all ordered pairs , |
If has elements, each element is either chosen or not chosen for a subset, hence subsets.
Examiner Tip: In a 2-mark set question, first list both sets explicitly, then write the union/intersection as a brace list. For a power set, use the count as a self-check — forgetting one subset is the common error.
After-Topic PYQ (
2024-25 Sec A Q1a— 2 Marks): Let and Compute and .
After-Topic PYQ (
2023-24 Sec A Q1b— 2 Marks): Express power set of each of these sets. 1) 2)
2. Relations: Definition and Operations
Binary relation (2 Marks): a subset . If we write . When we say is a relation on .
2.1 Counting and Order of a Relation
contains ordered pairs; each pair is independently included or excluded from .
For , there are pairs and possible relations. The "order" of a finite relation on is (its Boolean matrix is ); for the matrix is .
2.2 Operations on Relations
Since a relation is a set of ordered pairs, all set operations apply: , , , . Two further operations are specific to relations:
| Operation | Definition | Matrix view |
|---|---|---|
| Inverse | transpose of the Boolean matrix | |
| Composition | Boolean matrix product | |
| Equality | iff they contain exactly the same ordered pairs | entrywise |
Recursive definition of a relation: give a base set of pairs and rules that generate more pairs. Example: on integers, let contain for all , and if then ; the recursively generated relation is .
Examiner Tip: For the 2-mark counting question, do not enumerate relations. Write and name the underlying Cartesian product — that is the full-credit derivation.
After-Topic PYQ (
2024-25 Sec A Q1b— 2 Marks): Let and Compute the total number of possible relations from A to B.
3. Properties of Relations
Property tests for on :
• Reflexive: for every (diagonal of matrix is all 1s; every digraph vertex has a loop).
• Symmetric: (matrix equals its transpose).
• Antisymmetric: (no two-way arrow between distinct vertices).
• Transitive: .
3.1 Equivalence and Partial Order
| Structure | Required properties |
|---|---|
| Equivalence relation | reflexive + symmetric + transitive |
| Partial order (POSET) | reflexive + antisymmetric + transitive |
3.2 Worked Pattern — Inverse of an Equivalence Relation
Let be an equivalence relation on and define .
- Reflexive: for all ; inverting gives .
- Symmetric: (as symmetric) .
- Transitive: . Transitivity of gives , hence . Therefore is an equivalence relation. (Equivalently, a symmetric relation equals its inverse, and taking an inverse preserves equivalence.)
3.3 Worked Pattern — Strings With the Same Number of 0s
Define .
- Reflexive: has the same number of 0s as itself ✓
- Symmetric: if have equal 0-counts, so do ✓
- Transitive: equal counts to force equal counts between and ✓
- Not antisymmetric: , both have one 0, so but . Conclusion: is an equivalence relation, not a partial order.
Examiner Tip: For "show whether" questions, never stop after finding three properties. Explicitly test antisymmetry with a concrete counterexample (01 and 10), then state "equivalence but not partial order".
After-Topic PYQ (
2024-25, 2025-26 Sec B Q2a— 7 Marks): If is an equivalence relation on , then prove that is also an equivalence relation on .
After-Topic PYQ (
2023-24 Sec C Q3a— 7 Marks): Let be a binary relation on the set of all strings of 0 and 1 such that . Show whether is reflexive, symmetric, transitive or a partial order relation.
After-Topic PYQ (
2025-26 Sec A Q1b— 2 Marks): What is meant by a reflexive relation? State its basic property.
4. Composite Relations and Transitive Closure
Composition: links to when some satisfies and . The transitive closure is the smallest transitive relation containing ; it repeatedly adds pairs implied by transitivity.
4.1 Warshall's Algorithm
For vertices , start with . For :
After stage , the matrix includes all paths whose intermediate vertices lie in .
For on :
| Stage | Row 1 | Row 2 | Row 3 | New information |
|---|---|---|---|---|
| 0 1 0 | 0 0 1 | 1 0 0 | original edges | |
| (via 1) | 0 1 0 | 0 0 1 | 1 1 0 | |
| (via 2) | 0 1 1 | 0 0 1 | 1 1 1 | , |
| (via 3) | 1 1 1 | 1 1 1 | 1 1 1 | cycle makes every vertex reachable |
Thus — all nine ordered pairs including the reflexive ones.
Examiner Tip: Print all four matrices . The exam awards one mark per correctly updated stage; writing only the final matrix loses the algorithm marks.
After-Topic PYQ (
2024-25 Sec C Q3a— 7 Marks): Let defined on . Calculate the transitive closure of R using Warshall's algorithm.
5. POSET and Hasse Diagram
POSET: a set with a partial order — a relation that is reflexive, antisymmetric and transitive. Hasse diagram: a drawing of a finite poset where is placed above and joined by an edge iff covers (i.e., with no element strictly between).
5.1 Hasse Diagram Rules
- Write larger elements higher; omit arrows because upward direction means "greater".
- Omit self-loops (reflexivity) and omit edges implied by transitivity.
- Draw an edge only for a cover relation.
- If an element has a unique smallest/largest, it is the bottom/top of the diagram.
5.2 Worked —
%%{init: {'theme': 'base', 'look': 'handDrawn', 'themeVariables': {'fontFamily': "'Nunito', sans-serif", 'fontSize': '17px', 'primaryColor': '#EFEAD6', 'primaryBorderColor': '#0F766E', 'lineColor': '#23211C'}}}%%
flowchart BT
E["∅"]
A["{a}"]
B["{b}"]
C["{c}"]
AB["{a,b}"]
AC["{a,c}"]
BC["{b,c}"]
T["{a,b,c}"]
E --> A
E --> B
E --> C
A --> AB
A --> AC
B --> AB
B --> BC
C --> AC
C --> BC
AB --> T
AC --> T
BC --> T
There are 8 subsets in four levels (1, 3, 3, 1). For any two subsets , their LUB is and their GLB is ; both are subsets of , so is a lattice (indeed a bounded, complemented, distributive Boolean lattice).
5.3 GLB/LUB in Under Divisibility
. For :
- upper bounds = common multiples within = → LUB (it divides 12 and 24);
- lower bounds = common divisors = → GLB .
Examiner Tip: In a divisibility poset , compute LUB as lcm and GLB as gcd, then check that the result still divides . That one sentence converts a diagram question into a quick numerical answer.
After-Topic PYQ (
2025-26 Sec C Q3b— 7 Marks): Explain the following terms: (i) POSET (ii) Hasse diagram.
After-Topic PYQ (
2023-24 Sec B Q2a— 7 Marks): Construct the Hasse Diagram for where is a power set defined on set . Determine whether it is a Lattice or not.
After-Topic PYQ (
2023-24 Sec A Q1a— 2 Marks): Determine the greatest lower bound and least upper bound of the set , if they exist, in the Poset .
6. Lattices: Definition, Boundedness and Properties
Lattice (2/7 Marks): a partially ordered set in which every pair of elements has a least upper bound (join) and a greatest lower bound (meet).
6.1 Algebraic Properties
| Property | Equations |
|---|---|
| Idempotent | |
| Commutative | |
| Associative | , similarly for |
| Absorption | |
| Bounded | has least element and greatest element : |
Upper bound of is with for all ; lower bound is with for all . The least of the upper bounds is the join; the greatest of the lower bounds is the meet.
6.2 Divisor Lattice
under divisibility has join and meet . Since 42 is square-free (), every lcm/gcd of two divisors is again a divisor of 42 — so is a lattice. Example: , .
%%{init: {'theme': 'base', 'look': 'handDrawn', 'themeVariables': {'fontFamily': "'Nunito', sans-serif", 'fontSize': '17px', 'primaryColor': '#EFEAD6', 'primaryBorderColor': '#0F766E', 'lineColor': '#23211C'}}}%%
flowchart BT
ONE["1"]
TWO["2"]
THREE["3"]
SEVEN["7"]
SIX["6"]
FOURTEEN["14"]
TWENTYONE["21"]
FORTYTWO["42"]
ONE --> TWO
ONE --> THREE
ONE --> SEVEN
TWO --> SIX
THREE --> SIX
TWO --> FOURTEEN
SEVEN --> FOURTEEN
THREE --> TWENTYONE
SEVEN --> TWENTYONE
SIX --> FORTYTWO
FOURTEEN --> FORTYTWO
TWENTYONE --> FORTYTWO
6.3 Isomorphism
with meet , join ; with meet , join . The bijection , , , preserves meet and join (e.g., ; ). Hence the two lattices are isomorphic.
Examiner Tip: To "justify a lattice", write three things: the definition, the formula for join/meet in that poset, and proof that join/meet stay in the set. To prove isomorphism, give the explicit element mapping and verify one meet and one join.
After-Topic PYQ (
2025-26 Sec C Q3a— 7 Marks): Define lattice and the properties of lattice.
After-Topic PYQ (
2024-25 Sec C Q3b— 7 Marks): i) Justify that is lattice. ii) Let be the lattice defined as and be the lattice , where be the power set defined on set . Justify that the two lattices are isomorphic.
After-Topic PYQ (
2023-24 Sec C Q3b— 7 Marks): Show that is a lattice. Compare the distributive and complemented lattice with examples.
After-Topic PYQ (
2025-26 Sec A Q1a— 2 Marks): Define a lattice and state the meaning of upper bound and lower bound in a lattice.
7. Complemented, Distributed, Modular and Complete Lattices
Complement: in a bounded lattice, is a complement of if and . A lattice is complemented if every element has at least one complement.
7.1 Comparison Table
| Type | Defining condition | Example | Non-example |
|---|---|---|---|
| Distributive | , (square-free) | diamond, pentagon | |
| Complemented | every has with meet , join | : complement ; : complement | chain with no complements |
| Modular | every distributive lattice; subspace lattice | pentagon | |
| Complete | every subset has a join and meet | any finite lattice; | infinite open-interval posets |
For , the complement of 6 is 7 because and . Since it is distributive and complemented — a Boolean lattice. Note: distributive ⇒ modular, but not conversely; every finite lattice is complete.
Examiner Tip: The "compare distributive and complemented" answer needs one defining equation each, one example each, and the sentence "D42 is both because it is the Boolean lattice of the three prime factors 2, 3 and 7".
Solved Exam-Ready Questions
Solved Q1 (2024-25, 2025-26 Sec B Q2a — 7 Marks | Survival Mode)
Q: If is an equivalence relation on , then prove that is also an equivalence relation on .
Solution:
- Definition of inverse: . Since is an equivalence relation it is reflexive, symmetric and transitive.
- Reflexive: for every , ; swapping the equal entries gives .
- Symmetric: suppose ; then . Since is symmetric, , hence .
- Transitive: suppose ; then . Since is transitive, . Inverting gives .
- Conclusion: satisfies reflexive, symmetric and transitive, hence it is an equivalence relation on . (Indeed a symmetric relation satisfies .)
Solved Q2 (2025-26 Sec C Q3a — 7 Marks)
Q: Define lattice and the properties of lattice.
Solution:
- Definition: a poset is a lattice if every pair has a least upper bound and greatest lower bound .
- Idempotent: , .
- Commutative: , .
- Associative: , similarly for meet.
- Absorption: , .
- Bounded case: if has and , then for all ; further properties are distributivity, complementation and modularity.
- Example: in , and , so it satisfies all the above.
Solved Q3 (2024-25 Sec C Q3b — 7 Marks)
Q: i) Justify that is lattice. ii) Let be the lattice defined as and be the lattice , where be the power set defined on set . Justify that the two lattices are isomorphic.
Solution:
- Part (i): and the operation is divisibility (written
/in the question). - Join and meet: for , and .
- Closure: since is square-free, the lcm and gcd of any two divisors of 42 are again divisors of 42. Hence every pair has a join and meet in , so it is a lattice; e.g. , .
- Part (ii) mapping: define by , , , .
- Bijection: both sets have four elements and every element of maps to a distinct subset.
- Operation preservation: ; .
- Conclusion: preserves order, meet and join, so .
Solved Q4 (2023-24 Sec C Q3a — 7 Marks)
Q: Let be a binary relation on the set of all strings of 0 and 1 such that . Show whether is reflexive, symmetric, transitive or a partial order relation.
Solution:
- Reflexive: any string has the same number of zeros as itself, so for every . ✓
- Symmetric: if and have equal zero counts, then and have equal zero counts, so . ✓
- Transitive: if have equal counts and have equal counts, then have equal counts, so . ✓
- Equivalence: the three properties make an equivalence relation; its classes group strings by their number of 0s.
- Antisymmetry test: take , . Each contains one zero, so and , but .
- Failure: antisymmetry is required for a partial order and fails here.
- Conclusion: is reflexive, symmetric and transitive — an equivalence relation — but not a partial order.
Solved Q5 (2023-24 Sec C Q3b — 7 Marks)
Q: Show that is a lattice. Compare the distributive and complemented lattice with examples.
Solution:
- Lattice proof: ; join , meet , and both stay inside because 42 is square-free.
- Distributive lattice: satisfies . Example: with union/intersection; because it is a Boolean lattice. Non-examples: and .
- Complemented lattice: bounded and every has with , . Example: in , complements ; in , complements (e.g., 7 complements 6).
- Comparison: distributivity is an equation on meet/join; complementation is an existence condition on a bounded lattice. They are independent in general ( is complemented but not distributive).
- Modular note: distributive ⇒ modular; fails modularity.
- Complete note: any finite lattice, including , is complete because every subset has a join and meet.
- Conclusion: is a finite distributive, complemented (hence Boolean and modular) lattice.
Solved Q6 (2025-26 Sec A Q1a — 2 Marks)
Q: Define a lattice and state the meaning of upper bound and lower bound in a lattice.
Solution: A lattice is a poset in which every pair has a least upper bound (join ) and a greatest lower bound (meet ). An upper bound of is with for all ; a lower bound is with for all . The least upper bound and greatest lower bound are the join and meet respectively.
Solved Q7 (2025-26 Sec A Q1b — 2 Marks)
Q: What is meant by a reflexive relation? State its basic property.
Solution: A relation on is reflexive when for every . Its basic property is that every element is related to itself: the Boolean matrix has all diagonal entries equal to 1 and every vertex of the digraph carries a loop.
Solved Q8 (2025-26 Sec C Q3b — 7 Marks)
Q: Explain the following terms: (i) POSET (ii) Hasse diagram.
Solution:
- POSET: a partially ordered set where is reflexive (), antisymmetric ( and ) and transitive (). Example: .
- Not every pair comparable: in , 2 and 3 are incomparable, hence the order is "partial", not total.
- Hasse diagram: representation of a finite poset by placing greater elements above smaller ones and drawing an edge only for a cover relation.
- Cover: covers when and no satisfies .
- Omitted information: reflexive loops and transitive edges are omitted; their presence is implied by the diagram.
- Reading the diagram: if a path climbs from to , then .
- Example: the four-level diagram of in Section 5.2 shows at the bottom and at the top.
Solved Q9 (2023-24 Sec B Q2a — 7 Marks)
Q: Construct the Hasse Diagram for where is a power set defined on set . Determine whether it is a Lattice or not.
Solution:
- Elements: has elements: ; ; ; .
- Levels: bottom ; first level the three singletons; second level the three 2-element subsets; top .
- Covers: is covered by each singleton; each singleton is covered by the two pairs containing it; each pair is covered by .
- Diagram: the flowchart in Section 5.2 draws exactly these 12 cover edges with no redundant transitive edges.
- Join: for , .
- Meet: .
- Conclusion: every pair has a join and meet inside , so is a lattice — specifically a bounded, complemented and distributive Boolean lattice.
Solved Q10 (2024-25 Sec A Q1a — 2 Marks)
Q: Let and Compute and .
Solution: and . Hence and . The prime 2 is absent from the intersection because it is even.
Solved Q11 (2023-24 Sec A Q1b — 2 Marks)
Q: Express power set of each of these sets. 1) 2)
Solution:
- For (two elements), — four subsets as .
- For (also two elements, since ), .
Solved Q12 (2024-25 Sec C Q3a — 7 Marks | Algorithm)
Q: Let defined on . Calculate the transitive closure of R using Warshall's algorithm.
Solution:
- Initial matrix: from the three given pairs.
- Rule: .
- Via vertex 1 (): only row 3 has a 1 in column 1, so row 3 OR row 1 → .
- Via vertex 2 (): rows 1 and 3 have 1 in column 2; OR row 2 into them → .
- Via vertex 3 (): every row now has a 1 in column 3; OR row 3 into all rows → .
- Interpretation: every ordered pair of is reachable; the cycle makes the relation strongly connected, and reflexivity is added by the closure.
- Conclusion: .
Solved Q13 (2024-25 Sec A Q1b — 2 Marks)
Q: Let and Compute the total number of possible relations from A to B.
Solution: ordered pairs. Each pair may be either included or excluded from a relation, so the number of relations is .
Solved Q14 (2023-24 Sec A Q1a — 2 Marks)
Q: Determine the greatest lower bound and least upper bound of the set , if they exist, in the Poset .
Solution: under divisibility. Upper bounds of are common multiples in : ; the least is 6, so LUB . Lower bounds are common divisors: ; the greatest is 1, so GLB . Equivalently, LUB and GLB .
Practice Questions (Self-Test)
- (2 Marks) Define a reflexive relation and give its matrix signature.
- (2 Marks) State the condition for a relation to be antisymmetric.
- (7 Marks) Prove that the inverse of a transitive relation need not be transitive unless the original is symmetric; give an example.
- (7 Marks) For , write the Boolean matrix of and find its transitive closure by Warshall's algorithm.
- (7 Marks) Show that is a lattice and find the complement of 6.
- (7 Marks) Draw the Hasse diagram of and identify join and meet of 4 and 6.
- (7 Marks) Explain why is distributive and complemented but the pentagon lattice is not.
- (7 Marks) Distinguish modular and distributive lattices with one example each.
- (2 Marks) How many relations are possible from a 4-element set to a 3-element set?
- (7 Marks) Give a recursive definition of the "ancestor of" relation and show how it generates new pairs.