Chap01 Sets
Chap01 Sets
1.I am a dolphin.
2.Supercalifragilisticexpialidocious.
5.56*3=40
Propositional Logic (Exercise)
Connectives
Negation
Conjunction
Disjunction
Disjunction
Disjunction (Exercise)
• What is the truth value of these compound propositions?
1.“The earth is round and the sky is blue.”
2.“Dogs or cats make great pets.”
3.“It is 20∘ Celsius outside and it is snowing.”
4.“Lemons are purple or grass is green”
Implication
Implication
Implication
Implication
C
Implication
Biconditional
Biconditional
• Biconditional
• Let p be “2 is an even number”. Let q be “4 is an even number”. p↔q is a
biconditional and its truth value is true, since both p and q are true.
Biconditional (Exercise)
• What is the truth value of these compound propositions?
1.“The Earth is flat” → “Pigeons are robots” (T)
2.“Bats have wings” → “Bats are birds” (f)
3.“A square is a rectangle” ↔ “A square had four 90∘ interior angles” (T)
4.“Spinach is green” ↔ “Penguins can fly” (f)
Propositional Formulas
Discrete Structure Fundamentals [ Set ]
3. In a set the same member does not appear more than once.
F = {a, e, i, o, a, u} is incorrect since the element ‘a’ repeats.
We Some common
denote following sets by sets
the following symbols:
N = The set of positive integers/ The set of natural numbers = {1, 2, 3, ……………}
W = The set of whole numbers = {0, 1, 2, 3, ……………}
• The set that has no elements is called “Empty set” and is denoted by or
{}.
• E.g. {x | x2 = 4 and x is an odd integer} =
Equality
• A set oftotwo
‘A’ is equal a setsets
‘B’ if and only if both sets have the same
elements. If sets ‘A’ and ‘B’ are equal we write: A = B. If sets ‘A’ and ‘B’ are
not equal we write A B.
A
B
5 C
1 3 4
2 6
Proper subset
• Notice that when we say A B then it is even possible to be A = B.
• We say that set ‘A’ is a proper subset of set ‘B’ if and only if A B and A
B. it is denoted by
The (absolute) complement of a set ‘A’ is the set of elements which belongs
to the universal set but does not belong to A. This is denoted by Ac or Ā or
Á.
• Ac = {x : xU xA}
Set operations Union
Union of two sets ‘A’ and ‘B’ is the set of all elements which belong to either
‘A’ or ‘B’ or both. This is denoted by A B.
• Distributive laws
• A (B C) = (A B) (A C)
• A (B C) = (A B) (A C)
• Identity laws Algebra of sets
•A =A
•A U=A
•A U=U
•A =
• Involution laws
• (Ac)c = A
Algebra of sets
• Complement laws
• A Ac = U
• A Ac =
• Uc =
• c = U
Algebra of sets
De Morgan’s laws
• (A B) c = Ac Bc
• (A B) c = Ac Bc
Proofs Using Algebraic Method
x(AB)c xAB
xA xB
xAc xBc
xAcBc
(AB)c AcBc (i)
De Morgan’s Law
xAcBc xAc xBc
xA xB
xAB
x(AB)c
AcBc (AB)c
(ii)
From (i) and (ii)
(AB)c = AcBc
Venn Diagram
A’
Computer representation of sets
• Let a universal set U has finite number of elements “n” and all the
elements are in some proper order a 1,a2,a3…an and AU. then A is
represented in computer in bit string of n elements such that i th bit
in set A will be “1” if ai A and is 0 if ai A
Example:
U = {1, 2, 3, 4, 5, 6,7 , 8, 9, 10}
A = {1, 3, 5, 7}
Then computer representation/bit representation A
={1010101000}
Example
U= {
1 2 3 4 5 6 7 8 9 10 }
A= { 1 3 5 7 }
{1
Bit Pattern for A=
0 1 0 1 0 1 0 0 0 }
Function
A rule which assigns a unique element from range
(Y) to each element of domain (X).
Example
•Let A ={a, b, c, d} B={1, 2, 3, 4, 5}