Professional Documents
Culture Documents
Disjoint sets
Formal definition for disjoint sets: two sets are disjoint if their intersection is the empty set Further examples
o {1, 2, 3} and {3, 4, 5} are
not disjoint
o {1, 2} and
are disjoint Their intersection is the empty set
o and are
disjoint! Their intersection is the empty set
Further examples
o {1, 2, 3} - {3, 4, 5} =
{1, 2}
o {a, b} - {3, 4} =
{a, b}
o {1, 2} - =
{1, 2} The difference of any set S with the empty set will be the set S
Complement sets
Formal definition for the complement of a set: A = { x | x A } = Ac
o Or U A, where U is the universal set
{ , -2, -1, 0, 4, 5, 6, }
Set identities
A = A AU = A AA = A AA = A AB = BA AB = BA A(BC) = (AB)C A(BC) = (AB)C A(AB) = A A(AB) = A Identity Law Idempotent Law Commutative Law Associative Law Absorption Law AU = U A = (Ac)c = A (AB)c = AcBc (AB)c = AcBc A(BC) = (AB)(AC) A(BC) = (AB)(AC) A Ac = U A Ac = Domination law Complement Law De Morgans Law
Distributive Law
Complement Law
8
Example
Let A, B, and C be sets. Show that
Solution: We have
Membership Tables
Set identities can also be proved using membership tables. Consider each combination of sets that an element can belong to To indicate that an element is in a set, a 1 is used; To indicate that an element is not in a set, a 0 is used. Notice the similarity between membership tables and truth tables.
10
11
12
Example 1
U is the set of all students in the class. U = {a,b,c,d,e,f,g,h,i,j,k,l,m} We need to represent
o The students who are in the basketball team {c,d,f,k,m}. Basketball team B = {0011010000101} o Honor students who have high CGPA {a,d,j,k,m}. Honor list H = {1001000001101}
Basketball team won the tournament and department is doing a party for which both the basketball players and honor students will be invited o BUH
13
Example 1- contd
{c,d,f,k,m} {a,d,j,k,m} 0011010000101 1001000001101 ------------------1011010001101
What if we only invite those members in the team who are also in the honor list o BH 0011010000101 1001000001101 ------------------0001000000101
14
Example 2
15
16