الاولdiscrete math lecture 01
الاولdiscrete math lecture 01
ITCS1313
Lecture 01: Set Theory
Set Theory
15
5
6
10 1
9
3 4 12 8
7 11
A B
}A U B = {10, 3, 7, 5, 4, 9, 6, 12, 8
15
5
6
10 1
9
3 4 12 8
7 11
A B
} A ∩ B = { 4, 9
¯
–A¯ =A Complementation law
– A U A¯ = U Complement law
–A∩A ¯ = Complement law
15
5
6
10 1
9
3 4 12 8
7 11
A B
_
} A= { 6, 12, 8, 15, 1, 11
_
} B = { 5, 3, 7, 10, 15, 1, 11
كلية الحاسبات وتكنولوجيا المعلومات 43
-جامعة االقصى
The difference A-B
• Formal definition for the difference of two
sets:
A - B = { x | x_ A and x B }
A - B = A ∩ B Important!
• Further examples
– {1, 2, 3} - {3, 4, 5} = {1, 2}
– {New York, Washington} - {3, 4} = {New York,
Washington}
– {1, 2} - = {1, 2}
• The difference of any set S with the empty set will
be the set Sكلية الحاسبات وتكنولوجيا المعلومات 44
جامعة االقصى-
The difference A-B
Monitor gamut • A difference of two sets is
(M) the elements in one set
that are NOT in the other
Printer
gamut
(P)
• Difference symbol is
a minus sign
• Example:
C=M-P
• Also visa-versa:
15
5
6
10 1
9
3 4 12 8
7 11
A B
} A – B = { 10, 3, 7, 5
15
5
6
10 1
9
3 4 12 8
7 11
A B
• Symetric diff.
symbol is a
• Example:
C=MP