Chapter 5 Lattice 57
Chapter 5 Lattice 57
Chapter 5 Lattice 57
co
1
www.gradeup.co
DISCRETE MATH
5 LATTICE
Example: Show that the inclusion relation ⊆ is a partial ordering on the power set of a set A.
Solution : Since every set S ⊆ S, ⊆ is reflexive. If S ⊆ R and R ⊆ S then
R = S, which means ⊆ is anti-symmetric. It is transitive as R ⊆ S and
S ⊆ T implies R ⊆ T.
Hence, ⊆ is a partial ordering on P(S), and (P(S), ⊆) is a poset.
Important Note: The symbol ≼ is used to denote the relation in any poset. The notation a ≺ b is
used to denote a ≼ b but a ≠ b.
Comparability:
Let a and b be the elements of a poset (S, ≼) then a. and b are said to comparable if either a ≼ b
or b ≼ a. Otherwise, a and b are said to be incomparable.
Example : In the poset (Z+ , | ) (where Z+ is the set of all positive integers and | is the divides
relation) are the integers 3 and 9 comparable? Are 7 and 10 comparable?
Solution : 3 and 9 are comparable since 3|9 i.e. 3 divides 9. But 7 and 10 are not comparable since
7 ∤ 10 and 10 ∤ 7.
Total Order:
It is possible in a poset that for two elements (a and b neither a ≼ b nor b ≼ a i.e. the elements (a
and b are incomparable. But in some cases, such as the poset (Z+, ≤), every element is comparable
to every other element.
A poset (S, ≼) is called totally ordered if every two elements of S are comparable.
≼ is called a total order. A totally ordered set is also called a chain.
2
www.gradeup.co
Hasse Diagrams:
A partial order, being a relation, can be represented by a di-graph. But most of the edges do not
need to be shown since it would be redundant.
For instance, we know that every partial order is reflexive, so it is redundant to show the self-loops
on every element of the set on which the partial order is defined.
Every partial order is transitive, so all edges denoting transitivity can be removed.
The directions on the edges can be ignored if all edges are presumed to have only one possible
direction, conventionally upwards.
In general, a partial order on a finite set can be represented using the following procedure –
1. Remove all self-loops from all the vertices. This removes all edges showing reflexivity.
2. Remove all edges which are present due to transitivity i.e. if (a,b) and (b,c)
3. are in the partial order, then remove the edge (a,c). Furthermore if (c,d) is in the partial order,
then remove the edge (a,d).
4. Arrange all edges such that the initial vertex is below the terminal vertex.
5. Remove all arrows on the directed edges, since all edges point upwards
For example, the poset ({1, 2, 3, 4}, ≤) would be converted to a Hasse diagram like
The last figure in the above diagram contains sufficient information to find the partial ordering. This
diagram is called a Hasse Diagram.
Extremums in Posets : Elements of posets that have certain extremal properties are important for
many applications.
• Maximal Elements- An element a in the poset is said to be maximal if there is no element b in
the poset such that a ≺ b.
• Minimal Elements- An element a in the poset is said to be minimal if there is no element b in
the poset such that b ≺ a.
Maximal and Minimal elements are easy to find in Hasse diagrams. They are the topmost and
bottommost elements respectively.
3
www.gradeup.co
For example, in the hasse diagram described above, “1” is the minimal element and “4” is the
maximal element. Since maximal and minimal are unique, they are also the greatest and least
element of the poset.
Bounds in Posets :
It is somtimes possible to find an element that is greater than or equal to all the elements in a
subset A of poset (S, ≼). Such an element is called the upper bound of A. Similarly, we can also
find the lower bound of A.
These bounds can be further constrained to get the least upper bound and the greatest lower
bound. These bounds are elements which are less than or greater than all the other upper bounds
or lower bounds respectively.
Example – Find the least upper bound and greatest lower bound of the following subsets {b, c},
{g, e, a}, {e, f}.
Lattices – A Poset in which every pair of elements has both, a least upper bound and a greatest
lower bound is called a lattice.
There are two binary operations defined for lattices –
4
www.gradeup.co
1. Join – The join of two elements is their least upper bound. It is denoted by ∨, not to be confused
with disjunction.
2. Meet – The meet of two elements is their greatest lower bound. It is denoted by ∧, not to be
confused with conjunction.
EXAMPLES
abcd , r2 = ab, cd , r3 = abc, d , r4 = a,b, c, d . Let p be the partial order on the set of
5
www.gradeup.co
Ans. C
Explanation: A partition is said to refine another partition if it splits the sets in the second
partition to a larger number of sets.
Therefore, the partial order contains the following ordered pairs-
( , ) , ( , ) , ( , ) , ( , ) , ( , )
4 1 4 2 4 3 3 1 2 1
2. A relation R is defined on ordered pairs of integers as follows: (x,y) R(u,v) if x < u and y > v.
Then R is: GATE-CS-2006
A. Neither a Partial Order nor an Equivalence Relation
B. A Partial Order but not a Total Order
C. A Total Order
D. An Equivalence Relation
Ans. A
Explanation: An equivalence relation on a set x is a subset of x*x, i.e., a collection R of
ordered pairs of elements of x, satisfying certain properties. Write “x R y” to mean (x,y) is an
element of R, and we say “x is related to y,” then the properties are:
1. Reflexive: a R a for all a Є R,
2. Symmetric: a R b implies that b R a for all a,b Є R
6
www.gradeup.co
The poset is
A. not a lattice
B. a lattice but not a distributive lattice
C. a distributive lattice but not a Boolean algebra
D. a Boolean algebra
Ans. B
Explanation:
7
www.gradeup.co
^ |a b c d e
_______________
a |a b c d e
b |b b e e e
c |c e c e e
d |d e e d e
e |e e e e e
8
www.gradeup.co
For any x, y ∈ L, not necessarily distinct, x ∨ y and x ∧ y are join and meet of x, y respectively.
Let L3 = {(x,y,z): x, y, z ∈ L} be the set of all ordered triplets of the elements of L. Let pr be the
probability that an element (x,y,z) ∈ L3 chosen equiprobably satisfies x ∨ (y ∧ z) = (x ∨ y) ∧ (x
∨ 2). Then
A. Pr = 0
B. Pr = 1
C. 0 < Pr ≤ 1/5
D. 1/5 < Pr < 1
Ans. D
9
www.gradeup.co
Explanation:
Number of triplets in L3 = Number of ways in which we can choose 3 elements from 5 with
repetition
=5*5*5
= 125.
Now, when we take x = t, then the given condition for L is satisfied for any y and z. Here, y and
z can be taken in 5 * 5 = 25 ways.
Take x = r, y = p, z = p. Here also, the given condition is satisfied. So, pr > 25 / 125 > 1/5.
For x = q, y = r, z = s, the given condition is not satisfied
as q ⋁ (r ⋀ s) = q ⋁ p = q, while (q ⋁ r) ⋀ (q ⋁ s) = t ⋀ t = t.
So, pr ≠ 1.
Hence D choice.
Bounded Lattice:
A lattice L is said to be bounded if it has the greatest element I and a least element 0.
E.g. – D18= {1, 2, 3, 6, 9, 18} is a bounded lattice.
10
www.gradeup.co
Complemented Lattice:
A lattice L is said to be complemented if it is bounded and if every element in L has a complement.
Here, each element should have atleast one complement.
E.g. – D6 {1, 2, 3, 6} is a complemented lattice.
Distributive Lattice:
It is a lattice in which meet (∧) and join (∨) operations distribute over each other.
• x ∧ (y ∨ z) = (x ∧ y) ∨ (x ∧ z)
• x ∨ (y ∧ z) = (x ∨ y) ∧ (x ∨ z)
Note:
• A complemented distributive lattice is a boolean algebra or boolean lattice.
• A lattice is distributive if and only if none of its sublattices is isomorphic to N5 or M3.
• For distributive lattice each element has unique complement. This can be used as a theorm
to prove that a lattice is not distributive.
11
www.gradeup.co
EXAMPLES
7. If every two elements of a poset are comparable then the poset is called ________
C. sub lattice
D. semigroup
Ans. B
Explanation: A poset (P, <=) is known as totally ordered if every two elements of the poset
are comparable. “<=” is called a total order and a totally ordered set is also termed as a chain.
8. ______ and _______ are the two binary operations defined for lattices.
A. Join, meet
B. Addition, subtraction
C. Union, intersection
D. Multiplication, modulo division
Ans. A
Explanation: Join and meet are the binary operations reserved for lattices. The join of two
elements is their least upper bound. It is denoted by V, not to be confused with disjunction. The
meet of two elements is their greatest lower bound. It is denoted by ∧ and not to be confused
with a conjunction.
9. A ________ has a greatest element and a least element which satisfy 0<=a<=1 for every a in
A. semilattice
B. join semilattice
C. meet semilattice
D. bounded lattice
Ans. D
Explanation: A lattice that has additionally a supremum element and an infimum element which
satisfy 0<=a<=1, for every an in the lattice is called a bounded lattice. A partially ordered set
is a bounded lattice if and only if every finite set (including the empty set) of elements has a
join and a meet.
12
www.gradeup.co
A. non-lattice poset
B. semilattice
C. partial lattice
D. bounded lattice
Ans. A
Explanation: The graph is an example of non-lattice poset where b and c have common upper
bounds d, e and f but none of them is the least upper bound.
****
13
www.gradeup.co
14