Unit Iii
Unit Iii
PROGRAMME – BCA
SEMESTER- II
DISCRETE MATHEMATICS (BCA- 401 )
UNIT III
DISCRETE MATHEMATICS
Unit-III (10)
DISCRETE MATHEMATICS
Logic gates, Digital circuits and Boolean algebra.
DISCRETE MATHEMATICS
Partial orders, Lattices,
etc.
DISCRETE MATHEMATICS
In our context…
• We aim at computing properties on programs
• How can we represent these properties? Which kind of algebraic
features have to be satisfied on these representations?
• Which conditions guarantee that this computation terminates?
• Definition:
– The elements a and b of a poset (S, p) are called comparable if
either apb or bpa.
– When for a,bS, we have neither apb nor bpa, we say that a,b
are incomparable
• Consider again our renovation example
– Remove Asbestos p ai for all activities ai except assign offices
– Paint walls p Refinish floors
– Some tasks are incomparable: Replacing windows can be done
before, after, or during the assignment of offices
a4 a5 a4 a5
a2 a2
a3 a3
a1 a1
60
12 20 30
4 6 10 15
2 3 5
c d e f
a b
L= {a,b,c,d,e,f,g}
p ={(a,c), (a,e), (b,d), (b,f), (c,g), (d,g), (e,g), (f,g)}RT
6 L= N (natural numbers)
5 p ={(0,1), (1,2), (2,3), (3,4), (4,5),…}RT
4
3 (L, p) is a totally ordered set (infinite)
2
1
0
9
8
7
L= N (natural numbers)
6
p ={(n,m): k such that m=n*k}
5
4 (L, p) is a partially ordered set (infinite)
3
2
12 12
12
6 6
6
4 4 4
3
3 2 2
2 1 3
1 1
NxN
N´N
upper bounds of Y
Y lub(Y)
glb(Y)
lower bounds of Y
a b
• Minimal: {a,b}
• Maximal: {c,d}
• There are no unique minimal or maximal elements, thus no
minimum or maximum
{a,c}
g h i • Lower bounds: , thus no glb
• Upper bounds: {h}, lub: h
d e f
{b,d}
• Lower bounds: {b}, glb: b
a b c • Upper bounds: {d,g}, lub: d
because dpg
• Minimal/Maximal elements?
i j
• Minimal & Minimum element: a
• Maximal elements: b,d,i,j
f g h
• Bounds, glb, lub of {c,e}?
f g h
b c d
f g h
b c d
• Exercise:
Show that for any (possibly infinite) set E, (P(E),) is a complete
lattice
(P(E) denotes the powerset of E, i.e. the set of all subsets of E).
Y
c d e f
a b
L= {a,b,c,d,e,f,g}
={(a,c), (a,e), (b,d), (b,f), (c,g), (d,g), (e,g), (f,g)}T
{1,2,3}
lub(Y)
L= ({1,2,3})
p=
lub(Y) = Y glb(Y)
glb(Y) = Y
-4 -3 -2 -1 0 1 2 3 4
L= Z {T,}
nZ : p n pT
L= Z+
6
p total order on Z+
5
lub = max
4
glb = min
3
2
It is a lattice, but not complete: 1
For instance, the set of even numbers has no lub 0
37
DISCRETE MATHEMATICS BCA IV SEM
Example
L= Z+ {T}
6
p total order on Z+ {T}
5
lub = max
4
glb = min
3
2
This is a complete lattice 1
0
• Proof:
– 1 2 e 1 3 by definition
– In order to prove that 2 1, let us define for each Y L
glb(Y) = lub({l L | l’ Y : l l’})
{1,2,3}
glb(Y)= lub({l L | l’ Y : l l’})
Y
{1,2} {1,3} {2,3}
Z= {l L | l’ Y : l l’}
• embedding if
p1 P p2 p1 Q p2
• Isomorphism if it is a surjective embedding
e
d 2d2e 2 is monotone, but it is not
b c
b c 2 2 an embedding:2bQ2c
2a but it is not true that bPc
a
j j’
i g h g’
i’ h’
f
d’
d e’ f’
e
b b’
a
a’
c
c’
1
from((S), ) to 0 , defined by:
(U)=1 if U is nonempty, ()=0.
n0N : nN : n0 n ln 0 ln
• Infinite set
• Satisfies both ACC and
... DCC
(P,P) (Q,Q)
S
(S)
Fix(f) ={ l P | f(l)=l}
• Tarski Theorem:
Let L be a complete lattice. If f:LL is monotone then
lfp(f) = glb{ l L | f(l) l }
gfp(f) = lub{ l L | l f(l) }
{ l L | f(l) P l}
{ l L | l P f(l)}
– Kleene Theorem
If f is continuous then the least fixpoint of f esists , and it is equal
to