Bifalgorithm post · Brisk · Chapter 1
How many different relations can exist between two sets?
How many different relations can exist between two sets? (Brisk · Chapter 1) — "Now if I define a relation between X and Y, I’m simply specifying that certain…
Ideas in this flowchart
- Relations between two sets X and Y
- A relation specifies which ordered pairs are included and which are excluded.
- The possible ordered pairs come from the Cartesian product X × Y.
- Examples of relations between X and Y
- R = {(Harry, Mt. Dew), (Ron, Mt. Dew)}
- S = {(Hermione, Mt. Dew), (Hermione, Dr. Pepper), (Harry, Dr. Pepper)}
- T = ∅, containing no ordered pairs
- Each ordered pair in X × Y is either present or absent from a relation.
- There are |X| · |Y| possible ordered pairs.
- Each possible pair has two choices: present or absent.
- The total number of relations is 2^(|X|·|Y|).
- The set of all relations between X and Y is the power set of X × Y.
- When |X × Y| = 6, there are 2^6 = 64 relations.
- Among these relations are the empty relation and the relation containing all six ordered pairs.
- The paragraph raises questions about relations containing exactly one or exactly five ordered pairs.
