# Relations, Equivalence Classes, POSETs, Lattices & Group Theory
Exam: GATE Computer Science & Information Technology (GATE CS)
Subject: Engineering Mathematics & Discrete Math
Canonical URL: https://gateandnet.com/exams/gate-cs/engineering-mathematics/relations-posets-lattices-and-groups

> Counting reflexive, symmetric, antisymmetric, and equivalence relations; Hasse diagrams, distributive/complemented lattices, cyclic groups, and Lagrange’s theorem.

## 1. Exact Relation Counting Formulas on $|A| = n$

Represent any relation $R \subseteq A \times A$ as an $n \times n$ Boolean matrix $M_R$ with $n$ diagonal entries and $\frac{n(n-1)}{2}$ off-diagonal pairs $(i,j),(j,i)$:

| Relation Property | Diagonal Choices ($n$) | Off-Diagonal Pair Choices ($\frac{n(n-1)}{2}$) | Total Count |
| :--- | :--- | :--- | :--- |
| **Reflexive** | All $1$ ($1$ way) | Free ($4$ ways per pair) | $2^{n(n-1)}$ |
| **Irreflexive** | All $0$ ($1$ way) | Free ($4$ ways per pair) | $2^{n(n-1)}$ |
| **Symmetric** | Free ($2^n$) | $(0,0)$ or $(1,1)$ ($2$ ways) | $2^{n(n+1)/2}$ |
| **Antisymmetric** | Free ($2^n$) | $(0,0), (1,0), (0,1)$ ($3$ ways) | $2^n \cdot 3^{n(n-1)/2}$ |
| **Asymmetric** | All $0$ ($1$ way) | $(0,0), (1,0), (0,1)$ ($3$ ways) | $3^{n(n-1)/2}$ |

**Equivalence Relations** (Reflexive + Symmetric + Transitive) equal the $n$-th **Bell Number** $B_n$: $B_1 = 1, B_2 = 2, B_3 = 5, B_4 = 15, B_5 = 52$.

## 2. POSETs, Hasse Diagrams & Lattices

A relation $\preceq$ is a **Partial Order** if it is **Reflexive, Antisymmetric, and Transitive**.
- **Lattice:** A POSET in which every pair of elements $(a, b)$ has both a unique **Least Upper Bound (Join $a \lor b$)** and **Greatest Lower Bound (Meet $a \land b$)**.
- **Boolean Algebra:** A **Bounded, Distributive, and Complemented** lattice. Every finite Boolean algebra has cardinality $2^k$ (isomorphic to the divisor lattice $D_N$ iff $N$ is a product of $k$ **distinct primes**, e.g. $D_{30} = D_{2 \cdot 3 \cdot 5}$ is a Boolean algebra, whereas $D_{12} = D_{2^2 \cdot 3}$ is NOT complemented!).

## 3. Algebraic Structures & Group Theory

- **Monoid:** Associative + Identity element.
- **Group $(G, *)$:** Monoid + Every element has an inverse in $G$.
- **Cyclic Group:** Generated by a single element $g$; number of generators of cyclic group of order $n$ is Euler’s totient $\phi(n)$.

> [!TIP]
> **Instant Group Hierarchy:** Every Cyclic Group $\implies$ Abelian Group, and every group of **prime order $p$** (or order $\le 5$ except wait: order 4 has Klein-4 $V_4$ which is non-cyclic but STILL Abelian! Smallest non-Abelian group has order **6**, namely $S_3$).

## Solved Practice Questions & PYQs

### [GATE CS Discrete Math | MCQ]
On a set $A$ with $|A| = 4$ elements, how many distinct **Equivalence Relations** can be defined on $A$?
**Correct Answer:** A
**Solution:** The number of equivalence relations on an $n$-element set equals the $n$-th **Bell Number** $B_n$ (number of set partitions): $B_1 = 1,\; B_2 = 2,\; B_3 = 5,\; B_4 = \mathbf{15}$.

### [GATE CS Discrete Math | MCQ]
Let $(G, *)$ be a **cyclic group** of order $12$. How many **generators** does $G$ possess?
**Correct Answer:** B
**Solution:** A cyclic group of order $n$ has exactly $\phi(n)$ generators (integers $1 \le k \le n$ with $\gcd(k, n) = 1$). For $n = 12 = 2^2 \cdot 3$: $\phi(12) = 12\left(1 - \frac{1}{2}\right)\left(1 - \frac{1}{3}\right) = \mathbf{4}$ (namely $g^1, g^5, g^7, g^{11}$).
