Professional Documents
Culture Documents
Rwerset Partitions, Cartesian Product of Sets, Power Sets
Rwerset Partitions, Cartesian Product of Sets, Power Sets
1.)Set partitions
Two sets are disjoint if they have no elements in common, i.e. their intersection is the empty set.
Definition: Consider a set A, and sets A1, A2, … An, such that:
A1 È A2 È …È An = A
A1, A2, … An, are mutually disjoint, i.e. for all i and j, Ai Ç Aj = Æ
Example:
1.) A = {a, b, c, d, e, f, g}
A1 = {a, c, d}
A2 = {b, f}
A3 = {e, g}
2.) A = {a, b, c, d, e, f, g}
3.) A = {1, 2, 3, 4, 5}
4.) A = {1, 2, 3, 4, 5}
Important: Each element of A should appear in exactly one of the sets in the partition.
How do we make sure that each license plate would have a different identification number?
Definition: Let A and B be two sets. The Cartesian product of A and B is defined as the set
A x B = {(x,y) | x є A L y є B}
Example 1:
A = {0, 1, 2, 3}
B = {a, b}
……
Example 3:
A = {A, B, C, …. X, Y, Z}
….
….
Here the result is all possible sequences of 3 letters, e.g. used in license plates.
Let
D = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
A = {A, B, ….. Z}
D x D x D x A x A x A = D3 x A3
A x A = {(a,a),(a,b),(a,c),(b,a),(b,b),(b,c),(c,a),(c,b),(c,c)}
We can disregard the parentheses and the comma, and write the product thus:
…..
Strings are very important objects, studied in Linguistics, in Mathematics and in Computer Science. All
languages - natural and programming, are built out of strings.
3.)Power sets
Definition: The set of all subsets of a given set A is called power set of A.
Notation 2A , or P (A)
Example:
A - { a,b,c,d}
{a,b},{a,c},{a,d},{b,c},{b,d},{c,d}
{a,b,c},{a,b,d},{a,c,d}, {b, c, d}
{a,b,c,d}}
The number of elements in P (A) is 2 N, where N = number of elements in A
Why 2 N ? To answer this question, we examine the bit notation of sets, described below.
Bit notation: For a set A with n elements, each subset of A can be represented by
Example:
A = {a, b, c, d}
{a,b} = 1 1 0 0
{a,c} = 1 0 1 0
{b,c,d} = 0 1 1 1
The i-th element in the string is 1 if the element ai is in the subset, otherwise it is 0.
Thus the subset {a,b,d} of the set {a,b,c,d} can be represented by the string '1101'.
Application
A * = A0 È A1 È A2 È …È An È …
We may be interested to examine certain languages with length of strings not greater
is a subset of A1 È A2.
We have:
|P (A1 È A2)| = 2|(A1 È A2)|.
A1= {a, b, c}
|A1| = |A| = 3
The number of the elements in A1 È A2 is 12, hence the number of subsets is 212 = 4096.
E=1111
A=1100
B=0101
Ac = ~(1 1 0 0 ) = 0 0 1 1 = {c, d}
A È B = (1 1 0 0) V (0 1 0 1) = 1 1 0 1 = {a, b, d}
A Ç B = (1 1 0 0) L (0 1 0 1) = 0 1 0 0 = {b}
A - B = A Ç Bc = (1 1 0 0) L ~(0 1 0 1) = (1 1 0 0) L (1 0 1 0) = 1 0 0 0 = {a}