Let set A: A={ 1, 2 }
Powerset of A: P(A)={ ∅, {1}, {2}, {1,2} }
Cartesian product of the set A: A×A={ (1,1), (1,2), (2,1), (2,2) }
Enumerated powerset of the Cartesian product of the set A i.e. P(A×A)=P(A2) is given below. There are 16 elements in this powerset i.e. there are 16 possible relations:
1 possible way to choose no pairs (0-place): (04)
4 possible ways to choose 1 pair (1-place): (14)
6 possible ways to choose 2 pairs (2-place): (24)
4 possible ways to choose 3 pairs (3-place): (34)
1 possible way to choose all pairs (n-place): (44)
The formula to choose k-places out of n elements:
(kn)=k!(n−k)!n! Enumerated powerset of the Cartesian product of the set A:
P( { (1,1), (1,2), (2,1), (2,2) } )={R1:∅,R2:{(1,1)},R3:{(1,2)},R4:{(2,1)},R5:{(2,2)},R6:{(1,1),(1,2)},R7:{(1,1),(2,1)},R8:{(1,1),(2,2)},R9:{(1,2),(2,1)},R10:{(1,2),(2,2)},R11:{(2,1),(2,2)},R12:{(1,1),(1,2),(2,1)},R13:{(1,1),(1,2),(2,2)},R14:{(1,1),(2,1),(2,2)},R15:{(1,2),(2,1),(2,2)},R16:{(1,1),(1,2),(2,1),(2,2)}} Relations:
universal (1): R16
reflaxive (4): R1,R8,R13,R16
irreflexive (4): R1,R3,R4,R9
symmetric (8): R1,R2,R5,R8,R9,R12,R15,R16
anti-symmetric (12): R1−R8,R10,R11,R13,R14
asymmetric (5): R1−R5
transitive (13): only R9 and R15 are not transitive
Summary:
The number of distinct binary relations on an n-element set is 2(n2)
The number of reflexive and irreflexive relations is the same.
The number of strict partial orders (irreflexive transitive relations) is the same as that of partial orders.
the number of equivalence relations is the number of partitions, which is the Bell number.
Ordered pair (1,2)={{1},{1,2}}
Powerset of A: P(A)
={∅,{1},{2},{1,2}}
={∅,{1},{2},{1,2},{2,1}}
={∅,{1},{1,2},{2},{2,1}}
={∅,(1,2),(2,1)}
Ordered pair (x,y)={{x},{x,y}}
if x=y then (a,a)
={{a},{a,a}}
={{a},{a}}
={{a}}
Sets
A set is an unordered collection of distinct objects (that share some common property) considered as an object in its own right.
defined intensionaly (semantically): "A set of odd positive ints"
defined extensionaly (enumeration): {a,b,c}
denoted with a capital letter: A={a,b,c}, elements with lowercase
If a is an element of set B then: a∈B, if not a∈/B
Order or repetition unimportant: {{a},b,∅}={b,{a},{},b,∅,{}}
A set can contain other sets, x∈A,A∈M, so x∈A but x∈/M.
Two sets are equal if they contain the same elements.
Types
An empty set contains no elements: ∅={}
A set, {a,b}, is distinguished from the ordered pair, (a,b)
n-element set is different from ordered n-tuple: {x1,x2,…,xn}=(x1,…,xn)
Two ordered pairs are equal iff: (a,b)=(x,y)⟺a=x∧b=y
The order of the elements or their repetition is of no consequence to sets, {a,b,{}}={b,{},b,∅,a}.
{∅}={{}}
Subset and powerset
if all elements of a set A are also elements of a set B, then A is a subset of B: A⊆B and B is a superset of A: B⊇A.
a set B is equal to A if the two sets consist of exactly the same elements: A=B⟺A⊆B∧B⊆A.
if A⊆B but B=A then A is a proper subset of B: A⊂B.
if a set P contains all possible subsets of a set A, then P is a powerset of A, denoted as P(A).
e.g. if A={a,b}, then P={{a},{b},{ab},{∅}}
here, the cardinality (number of elements) of P is 4, denoted as ∣P∣=4
Properties of sets: ∀A,B,C
A⊆A (reflexivity)
A⊆B∧B⊆C→A⊆C (transitivity)
A⊆B∧B⊆A→A=B (anti-symmetry, axiom of extensionality)
∅⊆A
A⊆∅→A=∅