Beruflich Dokumente
Kultur Dokumente
{5,6,7,8,9,10,11,12,13}
{x | 5 x 13 and is integral}
DeMorgan’s Laws: (A B) = A B,
(A B) = A B
Venn’s Diagram
A B
C
U
Difference Operation
A B
A = {1,3,5,6,7,8} B = {1,2,3,4,5}
A – B = {6,7,8}
B – A = {2,4}
A B = {1,3,5}
Cartesian Product
• 2 elements in a fixed order is a “pair” or “ordered pair”
(a,b)
• n elements in a fixed order is an “n-tuple”
(a1, a2, …. , an)
(a1, a2, …. , an) = (b1, b2, …. , bn) iff ai=bi i where 1 i n
• The “cartesian product” or “direct product” of 2 sets A and B
the set of all ordered pairs of A and B
AB
EXAMPLE:
A={0, 1} B ={0, 1, 2}
A B = {(0,0),(0,1),(1,0),(0,2),(1,1),(1,2)}
EXAMPLE: RAB ai A bi B
if (ai,bi) R then ai R bi and “relation R holds”
if (ai,bi) R then ai R bi “relation R does not hold”
EXAMPLE
• Consider A={1,2,3,…,9,10}, B1={1,3}, B2={7,8,10},
B3={2,5,6} and B4={4,9}
1) A = B1 B2 B3 B4
2) Bi Bj = i j
• R = (A, A, F(x,y))
• A ={0,1,2,3,4,5,6,7,8,9,10}
• A / R ={{0,3,6,9},{1,4,7,10},{2,5,8}}
• Rank of R is 3
Logic Notation
• “proposition” is a sentence with a clear meaning allowing
its’ evaluation of true or false
• Fire is cold - FALSE
• Let P and Q be propositions
P Q means that if P holds then Q holds
P Q means that P is true iff Q is true, or,
P is a “necessary” and “sufficient” condition for Q
• If P Q :
P is a “sufficient condition” of Q
Q is a “necessary condition” of P
• P Q does not necessarily mean that Q P
• Q P is the “converse” of P Q
• If P Q then Q P
Q P is the “contraposition” of P Q
Refinement
• R1 and R2 are Equivalence Relations over A
• if xR1y xR2y for x, y A then
R1 is a “refinement” of R2
R1 R2
EXAMPLE:
A={011, 100, 110, 111}
R0=(A,A, F0) R1=(A, A,F1)
R0 and R1 are Equivalence Relations
F0 proposition that all corresponding bits are same
F1 is proposition that right two bits are same
R0={(011,011),(100,100),(110,110),(111,111)}
R1={(011,011),(011,111),(100,100),(110,110),(111,011),(111,111)}
R0 is a refinement of R1 R0 R1
Definition of a Function
• A and B are sets, f is a function that maps ai A to bj B
f: A B
f(ai)=bj
ai f bj
• A is the “domain” of f
• bj is the “value” of function f
• bj = f(ai)B is an “image” of ai A
• A Relation Rf may be Defined from f
f : A B, f(ai)= bj iff (ai, bj) Rf
• f -1 is the “inverse relation” of function f: A B
• f -1 is NOT, in general, a function
• f -1(bj) IS an “inverse image” of bj
f -1(bj) A
Operation
• “unary” operation is a function, f : A A
EXAMPLE
B = {0,1} a,b B
a=1-a (unary-complement)
ab=a•b (binary-conjunction)
a b = a + b - (a • b) (binary-disjunction)
a b = a + b - (2 • a • b) (binary-exclusive OR)
Ordered Relations
• R is a Binary Relation on A
• For a,b,c A if the following hold:
1) aRa (Reflexive Law)
2) If aRb and bRa then a=b (Anti-Symmetric Law)
3) If aRb and bRc then aRc (Transitive Law)
• R is said to be a “Partially Ordered Relation”
• Also, if a,b A , aRb or bRa then
R is said to be a “Total Order Relation”
• Such ordered relations are denoted as
a R b rather than aRb
Ordered Sets
• R is a binary Relation on A
• For a,b,c A if the following hold:
1) aRa (Reflexive Law)
2) If aRb and bRa then a=b (Anti-Symmetric Law)
3) If aRb and bRc then aRc (Transitive Law)
• R is said to be a “Partially Ordered Relation”
• Also, if a,b A , aRb or bRa then
• R is said to be a “Total Order Relation”
• Such ordered relations are denoted as
a R b rather than aRb
• An ordered set consists of an order relation and the set over
which it is defined
A, R
Hasse Diagrams
• R is a binary Relation on A
• For a,b,c A such that a R b and a b
if there is no element c such that a R c, c R b
where a b c then b “covers” a
1 (1,1)
a b
(0,1) (1,0)
c
0
(0,0)
d
(1,1) is the maximal element
1 is the maximal element
(0,0) is the minimal element
0 is the minimal element
e f
a and b are the maximal elements
c is the greatest lower bound of {a, b}
e and f are the minimal elements
d is the least upper bound of {e, f}
Least Upper Bound,
Greatest Lower Bound
Let A, R be an ordered set and let B A
• a A is Upper Bound of B if b R a, b B
• a A is Lower Bound of B if a R b, b B