0% found this document useful (0 votes)
31 views

Unit 2

Uploaded by

gopalsharma99008
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

Unit 2

Uploaded by

gopalsharma99008
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 117

Noida Institute of Engineering and Technology, Greater

Noida

Partial order set and Lattice

Unit: 2

Discrete Mathematics
(BMCA 0105)
BHUSHAN
MCA Department
MCA 1st Semester

BHUSHAN BMCA 0105 and DM UNIT 2


1
11/20/24
Noida Institute of Engineering and Technology, Greater
Noida
Brief Profile of Mr. Bhushan
• Mr. BHUSHAN is an eminent personality in the field of computer science
education, serving NIET Greater Noida as Assistant Professor.
• He have 2+ years experience as I.T Professional
• He has guided around 30 PG thesis and projects of MCA Students
• Online certification course on C++ Programming a Practical Approach and
Design analysis and Algorithms by Electronics.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 2


Noida Institute of Engineering and Technology, Greater
Noida

Evaluation Scheme First Semester

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 3


Noida Institute of Engineering and Technology, Greater
Noida

Course Contents / Syllabus


UNIT-I Set Theory, Relations & Functions 8 hours

Set Theory: Introduction, Size of sets and cardinals, Venn diagrams,


Combination of sets, Multisets, Ordered pairs, Set identities and Proofs of
some general identities on sets.
Relations & Functions: Definition, Operations on relations, Composite
relations, Properties of relations, Equality of relations, Partial order relation
and Recursive definition of relation. Functions - Definition, Classification
of functions, Operations on functions, Recursively defined functions and
Growth of Functions.
Natural Numbers: Introduction, Piano’s axioms, Mathematical Induction,
Strong Induction and Induction with Nonzero Base cases.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 4


Noida Institute of Engineering and Technology, Greater
Noida

Course Contents / Syllabus


8 hours
UNIT-2 Posets, Hasse Diagram, Lattices and
Graph:

Posets, Hasse Diagram and Lattices: Introduction, Partial order sets,


Combination of partial order sets, Hasse diagram, Introduction of lattices,
Properties of lattices – Bounded, Complemented, Modular and Complete
lattice.
Graphs: Definition and terminology, Representation of graphs, Multi
graphs, Bipartite graphs, Planar graphs, Isomorphism and Homeomorphism
of graphs, Euler and Hamiltonian paths, Graph coloring
Trees: Definition, Binary tree, Binary tree traversal (BFS and DFS), Binary
search tree.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 5


Noida Institute of Engineering and Technology, Greater
Noida

Course Contents / Syllabus


UNIT-3 Algebraic Structures, Rings and Fields 8 hours
Algebraic Structures: Introduction to algebraic Structures and properties.
Types of algebraic structures: Semi group, Monoid, Group, Abelian group
and Properties of group. Subgroup, Cyclic group, Cosets, Permutation and
Symmetric groups, Homomorphism and Isomorphism of groups.

Numerical Differentiation and Integration: Introduction, Numerical


Differentiation, Numerical Integration, Trapezoidal rule, Simpson’s rules

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 6


Noida Institute of Engineering and Technology, Greater
Noida

Course Contents / Syllabus


UNIT-4 Propositional & Predicate Logic 8 hours

Propositional & Predicate Logic: Propositions well formed formula, Truth


tables, Tautology, Contradiction, Algebra of propositions, Theory of
Inference and Natural Deduction.

Frequency :Chart Different frequency chart like Histogram, Frequency


curve, Pi-chart.

Regression analysis: Linear and Non-linear regression, Multiple regressions.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 7


Noida Institute of Engineering and Technology, Greater
Noida

Course Contents / Syllabus


UNIT 5 Recurrence Relations & Combinatorics 8 hours
Recurrence Relations and Generating Function: Introduction and
properties of Generating Function, Growth of functions, Recurrences from
algorithms, Simple Recurrence relation with constant coefficients and Linear
recurrence relation without constant coefficients. Methods of solving
recurrences
Combinatorics: Introduction, Counting Techniques, Pigeonhole Principle,
Pólya’s Counting Theory.
Testing of Hypothesis: Test of significance, Chi-square test, t-test, F-Test
Application to medicine, agriculture etc.
Time series and forecasting: Moving averages, smoothening of curves,
forecasting models and methods

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 8


Noida Institute of Engineering and Technology, Greater
Noida

Text Books :
1. Discrete Mathematics and Its Applications, Kenneth H. Rosen,
McGraw-Hill, 2006.
2. Discrete Mathematical Structures, B. Kolman, R. C. Busby, and S. C.
Ross, Prentice Hall, 2004.
3. Koshy, Discrete Structures, Elsevier Pub. 2008 Kenneth H. Rosen,
Discrete Mathematics and Its Applications, 6/e, McGraw-Hill, 2006.
Reference :
1. Discrete and Combinatorial Mathematics, R.P. Grimaldi, Addison
Wesley, 2004.
2. Discrete Mathematical Structures, Y N Singh, Wiley-India, First Edition,
2010.
3. Grewal B. S., “Numerical methods in Engineering and Science”,
Khanna Publishers, Delhi, 43rd Edition 2015.
11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 9
Noida Institute of Engineering and Technology, Greater
Noida
Evaluation Scheme First Semester
Online Link :
https://www.youtube.com/watch?v=9AUCdsmBGmA&list=PL0862D1A947
252D20&index=10

https://www.youtube.com/watch?v=oU60TuGHxe0&list=PL0862D1A94725
2D20&index=11

https://www.youtube.com/watch?v=_BIKq9Xo_5A&list=PL0862D1A94725
2D20&index=13

https://www.youtube.com/watch?v=gs0dQF3pGqM&list=PLmXKhU9FNes
TpQNP_OpXN7WaPwGx7NWsq

https://www.youtube.com/watch?v=Yk6-ZBb9vh4
11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 10
Noida Institute of Engineering and Technology, Greater
Noida

Course code BMCA0105 L T P Credits

Course title Discrete Mathematics 3 00 3

Course Objective
To develop mathematical ability in understanding mathematical
1 reasoning, ability to perform combinatorial analysis and
knowledge about discrete structures.
2 Perform operations on discrete mathematics such as sets,
functions and relations.
3 Verify the correctness of an argument using symbolic logic and
truth tables.
4 Solve problems using counting techniques and Combinatorics.
5 To improve formal reasoning skills acquisition and
mathematical knowledge.
11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 11
Noida Institute of Engineering and Technology, Greater
Noida

Course Outcome: At the end of course , the student will be able to:
CO1 Use mathematical and logical notation to define and formally reason about K1,K2
basic discrete structures such as Sets, Relations, Functions and Induction.

Apply mathematical arguments using logical connectives and quantifiers to


CO2 check the validity of an argument through truth tables and propositional and K1,K4
predicate logic.

CO3 Identify and prove properties of Algebraic Structures like Groups, Rings and K3
Fields

CO4 Apply the concept of Combinatorics to solve basic problems in discrete K2


mathematics

CO5 Formulate and solve recurrences and recursive functions K2,K4

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 12


Noida Institute of Engineering and Technology, Greater
Noida

Program Outcomes
Program outcomes examine what a • Computational Knowledge
program or process is to do, achieve, • Problem Analysis
or accomplish for its own • Design /Development of Solutions
improvement and/or in support of • Conduct investigations of complex
institutional or divisional goals: Computing problems
generally numbers, needs, or • Modern Tool Usage
satisfaction driven. They can address
• Professional Ethics
quality, quantity, fiscal sustainability,
• Life-long Learning
facilities and infrastructure, or
• Project management and finance
growth.
• Communication Efficacy
• Societal and Environmental
Concern
• Individual and Team Work
• Innovation and Entrepreneurship

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 13


Noida Institute of Engineering and Technology, Greater
Noida
PROGRAM EDUCATIONAL OBJECTIVES(PEO)

PEO 1: To produce successful post graduates for industry, government,


academia and PEO and research for lifelong learning to fulfill their goals .

PEO 2: To develop ethical leaders with strong communication ability


who will excel as individual and team in a society.

PEO 3: To produce successful innovative professional with computing


and analytical ability to design and develop system with entrepreneurial
aptitude.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 14


CO-PO Mapping
PO PO PO PO PO PO PO PO PO PO PO PO
1 2 3 4 5 6 7 8 9 10 11 12
3 3 2 3 2 2 2 2
CO 1

3 3 2 3 3 2 2 2
CO 2

3 3 3 3 2 3 2 2 2
CO 3

3 3 3 3 2 3 2 3 2
CO 4

3 3 3 2 2 2 3 2
CO 5

Scale H- High (3), M-Medium (2), L- Low (1)


11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 15
CO-PEO Mapping
PO PO PO PO PO PO PO PO PO PO PO PO
1 2 3 4 5 6 7 8 9 10 11 12

3 3 2 3 3 2 2 2 2 2
PEO 1

3 3 2 3 2 3 3 2 2 2
PEO 2

3 3 3 3 2 3 2 2 2 2
PEO 3

Scale H- High (3), M-Medium (2), L- Low (1)


11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 16
Result Analysis

Year Percentage
2020-21 97%
2019-20 100%
2018-19 100%

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 17


Prerequisite and Recap

Basic Understanding of
• Relation and function
• Partial order relation
• Ordered set
• Recursively defined functions.
• Mathematical Induction
• Venn Diagram

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 18


Objective of Partially Ordered Sets(CO2)

 partially ordered set ( POSET) formalizes and generalizes the


intuitive concept of an ordering, sequencing, or arrangement of the
elements of a set.

 A POSET consists of a set together with a binary relation indicating


that, for certain pairs of elements in the set, one of the elements
precedes the other in the ordering.

 POSET can be visualized through its Hasse diagram, which depicts


the ordering relation

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 19


Partially Ordered Sets(Posets)

• Partial ordering: reflexive, anti-symmetric and transitive binary


relation
• Example: For S = {a, b, c}, partial ordering satisfies
• Reflexive: a ≤ a
• Anti-Symmetric: a ≤ b and b ≤ a imply a=b
• Transitive: if a ≤ b and b ≤ c, then a ≤ c
• Partially Ordered Sets(Posets)

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 20


Partially Ordered Set

• Example: Let A={1,2,3,12} consider the partial order of divisibility


on A. Draw the corresponding Hasse Daigram

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 21


Comparable

• If (A, ≤) is a poset, elements a and b of A are comparable if


a ≤ b or b ≤ a
• In some poset, e.g. the relation of divisibility (a R b iff a | b), some
pairs of elements are not comparable
2 | 7 and 7 | 2
Note: if every pair of elements in a poset A is comparable, we say that
A is linear ordered set, and the partial order is called a linear order.
We also say that A is a chain or totally ordered set.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 22


Totally Ordered Sets

• Total ordering: if for every pair a,b in S, either a≤ b or b ≤ a ,


then S is totally ordered by binary relation
• Example: Set of all prime numbers is totally ordered by ≤

Displaying the ordering relation with a Hasse diagram


Example: Partial ordering displaying divisibility relation among all
positive divisors of 45, such that the quotient is an integer

45

15
9
5
3

1
Hasse diagram
11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 23
Partially Ordered Sets

Consider a poset (A, ≤ )


 Maximal Element An element a in A is called a maximal element of
A if there is no element c in A such that a ≤ c.
 Minimal Element An element b in A is called a minimal element of
A if there is no element c in A such that c ≤ b.
 An element a in A is a maximal (minimal) element of (A, ≥ ) if and
only if a is a minimal (maximal) element of (A, ≤ )

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 24


Partially Ordered Sets

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 25


Partially Ordered Sets

Example Let A be the poset of nonnegative real number with the usual
partial order ≤ . Then 0 is a minimal element of A. There are no
maximal elements of A

Example The poset Z with the usual partial order ≤ has no maximal
elements and has no minimal elements

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 26


Greatest element and Least element

 Greatest element or Maximum element:


An element a in A is called a greatest element of A if x ≤ a for all x
in A.
 Least element or Minimum element:
An element a in A is called a least element of A if a ≤ x for all x in
A. i.e. means that element which relate to all remain elements

Note: an element a of (A, ≤ ) is a greatest (or least) element if and only


if it is a least (or greatest) element of (A, ≥ )

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 27


Partially Ordered Sets

Unit element
The greatest element of a poset, if it exists, is denoted by 1 and is
often called the unit element.

Zero element
The least element of a poset, if it exists, is denoted by 0 and is often
called the zero element.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 28


Theorem 1

If (A, ≤ ) be a poset, then


1. If greatest element exists, then it is unique.
2. If least element exists, then it is unique.
Proof: Assume that there are two greatest elements of poset (A, ≤ ), say
a and b.

∴a ≤ b (b is greatest element)
Therefore, x ≤ a and x ≤ b, ∀ x ∈ A.

∴by antisymmetric property, a = b.


and b ≤ a (a is greatest element)

Similarly, for least element.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 29


Theorem 2

Let (L,∨, ∧) be a lattice.


1. commutative law for join and meet: For a, b ∈ L,
a ∨ b = b ∨ a; a ∧ b = b ∧ a
2. Associative law for join and meet: For a, b, c ∈ L,
(a ∨ b) ∨ c = a ∨ (b ∨ c ); (a ∧ b) ∧ c = a ∧ (b ∧ c )
3. Absorption law for join and meet: For a, b ∈ L,
a ∨ (a ∧ b) = a ; a ∧ (a ∨ b) = a

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 30


Proof of Theorem 2

Proof of 1:
Let a, b ∈ L,
a ∨ b = l.u.b.{a,b} = l.u.b.{b,a} = b ∨ a
a ∧ b = g.l.b.{a,b} = g.l.b.{b,a} = b ∧ a
Proof of 2:
Let a, b ∈ L,
b ≤ (a ∨ b) ≤ (a ∨ b) ∨ c and
c ≤ (a ∨ b) ∨ c
By def. of l.u.b., b ∨ c ≤ (a ∨ b) ∨ c

∴ a ∨ (b ∨ c ) ≤ (a ∨ b) ∨ c …(1)
Also, a ≤ (a ∨ b) ≤ (a ∨ b) ∨ c

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 31


Proof of Theorem 2

Similarly, we have a ≤ a ∨ (b ∨ c ) and b ≤ b ∨ c ≤ a ∨ (b ∨ c )


By definition. of l.u.b., we get a ∨ b ≤ a ∨ (b ∨ c )
Also, c ≤ b ∨ c ≤ a ∨ (b ∨ c )

Since, ‘≤’ is anti-symmetric, ∴from (1) and (2),


Hence, (a ∨ b) ∨ c ≤ a ∨ (b ∨ c ) …(2)

(a ∨ b) ∨ c = a ∨ (b ∨ c )
Similarly, we prove for meet: (a ∧ b) ∧ c = a ∧ (b ∧ c )

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 32


Proof of (3): Absorption law:

Let a, b ∈ L,

∴ a ∨ (a ∧ b) = a
Since, a ≤ a ∨ b

∴ a ∧ (a ∨ b) = a
Similarly, a ∧ b ≤ and

E.g. In D20, 2 ∨ (2 ∧ 4) = 2 ∨ (2) = 2


and 2 ∧ (2 ∨ 4) = 2 ∧ (4) = 2

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 33


Theorem 3: Let (L,∨, ∧) be a lattice

Idempotent laws for join and meet: For a∈ L,


a ∨ a = a; a ∧ a = a; ∀ a∈ L
Proof: Let a∈ L,
a ∨ a = l.u.b.{a, a} = l.u.b.{a} = a
a ∧ a = g.l.b.{a, a} = g.l.b.{a} = a

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 34


Theorem 4:

Let (L,∨, ∧) be a lattice.


Suppose the greatest element 1 and the least element 0 exist, then for x
∈ L, x ∨ 1 = 1; x ∧ 1 = x; x ∨ 0 = x; x ∧ 0 = 0
Proof: Let x∈ L, since 1 is the greatest element and 0 is the least
element,

∴x = x ∧ x ≤ x ∧ 1
x ∧ 1 ≤ x and x ≤ x ; x ≤ 1

∴x∧1=x
Similarly, we prove other properties.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 35


Lower/Upper Bound of a Subset of Set S

Consider a poset (A, ≤)


Upper bound of a and b:
An element c in A is called an upper bound of a and b if a ≤ c and b
≤ c for all a, b in A.
Least upper bound (lub): smallest of all upper bounds
Lower bound of a and b:
An element d in A is called a lower bound of a and b if d ≤ a and d ≤
b for all a, b in A
Greatest lower bound (glb): largest of all lower bounds
Example: S = {1,3,5,9,15,45} and P = {3,5}
• Upper bounds: 15, 45 lub: 15 glb = 1

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 36


Lower/Upper Bound

Example
Find all upper and lower bounds of the following subset of A: (a)
B1={a, b}; B2={c, d, e}

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 37


Greatest Lower/Least Upper Bound

Consider a poset (A, ≤), and a, b in A,


Least upper bound
An element c in A is called a least upper bound of a and b, if (i) c is
an upper bound of a and b; i.e. a ≤ c & b ≤ c (ii) if c’ is another
upper bound then c ≤ c’.
Greatest lower bound
An element g in A is called a greatest lower bound of a and b, if (i) g
is a lower bound of a and b; i.e. g ≤ a & g ≤ b (ii) if g’ is another
lower bound then g’ ≤ g.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 38


Greatest Lower/Least Upper Bound

Example : Find all least upper bounds and all greatest lower
bounds of (a) B1={a, b} (b) B2={c, d, e}
(a) Since B1 has no lower bounds, it has no greatest lower bounds;
However, LUB(B1)=c
(b)Since the lower bounds of B2 are c, a and b,
we find that GLB(B2)=c The upper bounds
of B2 are f, g and h. Since f and g are not
comparable, we conclude that B2 has no
least upper bound.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 39


Prerequisite and Recap of Lattice(CO2)

 Student is understand the concept of POSET and then it should be


design to Hasse diagram

 Student is understand the concept of relation and function also


understand their similarity and differences.

 Student is understand the concept of Absorption law also prove it rules


by truth table.

Define a POSET and find the maximum and minimum elements of


subsets of POSET when they exist.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 40


Objective of Lattice

Lattice design is a highly constrained multi objective optimization


problem

Lattice integrates Goals into everything your teams do and the results
are tangible more aligned and productive.

It consists of a partially ordered set in which every two elements have a
unique supremum (also called a least upper bound or join) and a unique
infimum (also called a greatest lower bound or meet).

Define a lattice and identify lattices among POSET.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 41


Lattice

Lattice: partially ordered set in which every pair of elements has a


unique glb and a unique lub
LUB({a, b}) by a ∨ b (the join of a and b)
GLB({a, b}) by a  b (the meet of a and b)
– Least element: denoted as 0
– Greatestelement: denoted as 1 a b
Maximal members

– For each element a of lattice: a≤ 1 and 0≤a and


45 c

Example: 15
d
9
5
3
e f Minimal members
1
Lattice Not a lattice

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 42


Lattice

Example: Lattice of all subsets of set S = {a,b,c}, under the ordering


relation of set inclusion, where {a,b,c} = 1 and ɸ = 0.
{a,b,c}

{a,b} {a,c}
{b,c}

{b} {a} {c}

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 43


Lattice

Example: consider the poset (Z+ , ≤), where for a and b in Z+ , a ≤ b if


and only if a | b , then
a ∨ b = LCM(a, b)
a b = GCD(a, b)

LCM: least common multiple


GCD: greatest common divisor

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 44


Lattice

Example: Let n be a positive integer and Dn be the set of all positive


divisors of n. Then Dn is a lattice under the relation of divisibility. For
instance,
D20= {1,2,4,5,10,20} D30= {1,2,3,5,6,10,15,20}

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 45


Lattice

Example: Example 4 Which of the Hasse diagrams represent lattices?

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 46


Lattices
Important Result:
Let L be a lattice. Then, for every a, b and c in L
1. If a ≤ b, then
(a) a ∨ c ≤ b ∨ c
(b) a ∧ c ≤ b ∧ c
2. a ≤ c and b ≤ c if and only if a ∨ b ≤ c
3. c ≤ a and c ≤ b if and only if c ≤ a b ∧
4. If a ≤b and c ≤d, then
(a) a ∨ c ≤ b ∨ d (b) a ∧ c ≤ b ∧ d

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 47


Lattices
Proof
1. (a) If a ≤ b, then a ∨ c ≤ b ∨ c
c ≤ b ∨ c ; b≤ b ∨ c (definition of LUB)
a ≤ b ; b≤ b ∨ c a≤ b ∨ c (transitivity)
therefore, b ∨ c is a lower bound of a and c , which means a ∨ c ≤ b ∨
c (why? )
The proofs for others left as exercises.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 48


Dual of a Lattice
Proof
1. (a) If a ≤ b, then a ∨ c ≤ b ∨ c
c ≤ b ∨ c ; b≤ b ∨ c (definition of LUB)
a ≤ b ; b≤ b ∨ c a≤ b ∨ c (transitivity)
therefore, b ∨ c is a lower bound of a and c , which means a ∨ c ≤ b ∨
c (why? )
The proofs for others left as exercises.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 49


Bounded Lattices

Bounded
A lattice L is said to be bounded if it has a greatest element 1 and a
least element 0
For instance:
Example: The lattice P(S) of all subsets of a set S, with the relation
containment is bounded. The greatest element is S and the least
element is empty set.
Example : The lattice Z+ under the partial order of divisibility is not
bounded, since it has a least element 1, but no greatest element.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 50


Distributive Lattices

Distributive
A lattice (L, ≤) is called distributive if for any elements a, b and c in
L we have the following distributive properties:
1. a ∧ (b ∨ c) = (a ∧ b) ∨ (a ∧ c)
2. a ∨ (b ∧ c) = (a ∨ b) ∧ (a ∨ c)
If L is not distributive, we say that L is non distributive.
Note: the distributive property holds when
a. any two of the elements a, b and c are equal or
b. when any one of the elements is 0 or I.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 51


Distributive Lattices

Example For a set S, the lattice P(S) is


distributive, since join and meet each
satisfy the distributive property.

Example The lattice whose Hasse


diagram shown in adjacent diagram
is distributive

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 52


Distributive Lattices

Example :Show that the lattices as follows are non-distributive.

a ∧ ( b ∨ c) = a ∧ I = a a ∧ ( b ∨ c) = a ∧ I = a
(a∧ b) ∨(a ∧ c) = b ∨ 0 = b (a∧ b) ∨ (a ∧ c) = 0 ∨ 0 = 0

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 53


Modular Lattices

• A lattice (L, ≤) is called Modular if for any elements a, b and c in L


if b ≤ a then b (a c) = a (b  c)

• Example For a set S, the lattice P(S) is modular,


(if B ⊆ A) B ∪ (A ∩ C) = A ∩ (B ∪ C)

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 54


Example

• Every chain is a modular lattice


• Example: Given Hasse diagram of a lattice which is
modular
0 ≤ a i.e. taking b=0;
b ∨ (a ∧ c) = 0 ∨ 0 = 0
a ∧ (b ∨ c) = a ∧ c = 0

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 55


Complemented Lattice

Complement of an element:
Let L be bounded lattice with greatest element 1 and least element 0,
and let a in L.
An element b in L is called a complement of a if
a ∨ b = 1 and a ∧ b =0
Note: 0’ = 1 and 1’ = 0

Complemented Lattice:
A lattice L is said to be complemented if it is bounded and every
element in it has a complement.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 56


Complemented Lattice

Example : The lattice L=P(S) is such that every element has a


complement, since if A in L, then its set complement A has the
properties A ∨ A = S and A ∧ A=ф. That is, the set complement is
also the complement in L.

Example : complemented lattices where complement of element is not


unique

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 57


Theorem

Let L be a bounded distributive lattice. If a complement exists, it is


unique.
Proof: Let a’ and a’’ be complements of the element a in L, then
a a’ ∨ = 1, a ∨ a’’= 1 ; a ∧ a’ = 0, a ∧ a’’ =0
using the distributive laws, we obtain
a’= a’ ∨ 0 = a’ ∨ (a ∧ a’’ ) = (a’ ∨ a) ∧ (a’ ∨ a’’)
= 1 ∧ (a’ ∨ a’’) = a’ ∨ a’’
Also
a’’= a’’ ∨ 0 = a’’ ∨(a ∧ a’ ) = (a’’ ∨ a) ∧ (a’’ ∨ a’)
= 1 ∧ (a’ ∨ a’’) = a’ ∨ a’’
Hence a’=a’’

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 58


Graph

 Graph A graph G = (V, E) as a collection of adjacency lists or as an


adjacency matrix. Where V is set of vertex (node) and E is a set of
edges (link). There are two types of graph: directed and undirected
graphs.

 Directed graph (or digraph) It is a graph with directed edges. Edges


have directions so they are represented by arrows. Each edge leaves a
vertex and enters a vertex.

 Undirected graph It is a graph with undirected edges. Edges have no


directions so they are represented by lines.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 59


Graph

Degree (Directed Graph)

The out-degree of a vertex is the number of


edges leaving it. The out-degree of vertex 2
is 3.

The in-degree of a vertex is the number of


edges entering it. The in-degree of vertex 2
is 2.
degree=out-degree+ in-d

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 60


Graph

Degree (Undirected Graph)

In an undirected graph,
The out-degree and the in-degree are not
defined.

Only the degree of a vertex is defined.


The degree of vertex 2 is 3.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 61


Graph

Representation of Graph Given graph G = (V, E). May be either


directed or undirected. Two common ways to represent for algorithms.

1. Adjacency-list representation

2. Adjacency-matrix representation

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 62


Graph

Adjacency-list representation

An array of |V| lists, one for each vertex. For vertex u, its adjacency list
contains all vertices adjacent to u. The adjacency-list representation is
usually preferred, because it provides a compact way to represent sparse
graph- those for which |E| is much less than
|V|2 .

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 63


Graph

Adjacency-matrix representation
An Adjacency-matrix representation may be preferred, when the graph is
dense -|E| is close to |V|2 or when we need to be able to tell quickly if
there is an edge connecting two given vertices.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 64


Graph

Adjacency-matrix representation of Directed Graph

Graph Adjacency list Adjacency matrix

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 65


Graph

Adjacency-matrix representation of Undirected Graph

Graph Adjacency list Adjacency matrix

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 66


Graph-searching

Graph-searching It is Searching a graph, Systematically follow the


edges of a graph to visit the vertices of the graph. Used to discover the
structure of a graph. Standard graph-searching are following

1.Breadth-first Search (BFS)

2.Depth-first Search (DFS)

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 67


Graph-searching

Breadth-first Search (BFS)

1. It is one of the simplest for searching a graph and the archetype for
many important graph.

2. Given a graph G = (V, E) and a distinguished source vertex s,


breadth-first search systematically explores the edges of G to
"discover" every vertex that is reachable from s.

3. It computes the distance (fewest number of edges) from s to all such


reachable vertices.

4. It also produces a "breadth-first tree" with root s that contains all such
reachable vertices.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 68


Graph-searching

Depth-first Search (DFS)

1. The strategy followed by depth-first search is, as its name implies, to


search "deeper" in the graph whenever possible.

2. In depth-first search, edges are explored out of the most recently


discovered vertex v that still has unexplored edges leaving it.

3. When all of v's edges have been explored, the search "backtracks" to
explore edges leaving the vertex from which v was discovered.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 69


Binary Tree

A binary tree is a tree data structure in which each node has at


most two children, which are referred to as the left child and the
right child.

Root − The node at the top of the tree is called root. There is
only one root per tree and one path from the root node to any
node.

Parent − Any node except the root node has one edge upward to
a node called parent.

Child − The node below a given node connected by its edge


downward is called its child node.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 70


Binary Tree

Path − Path refers to the sequence of nodes along the edges of a


tree.

Levels − Level of a node represents the generation of a node. If


the root node is at level 0, then its next child node is at level 1, its
grandchild is at level 2, and so on.

keys − Key represents a value of a node based on which a search


operation is to be carried out for a node.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 71


Binary Tree

 Leaf − The node which does not have any child node is called
the leaf node.

 Subtree − Subtree represents the descendants of a node.

 Visiting − Visiting refers to checking the value of a node when


control is on the node.

 Traversing − Traversing means passing through nodes in a


specific order.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 72


Example of Binary Tree

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 73


Binary Search Tree

Binary Search Tree is a node-based binary tree data structure


which has the following properties:

•The left subtree of a node contains only nodes with keys lesser
than the node’s key.

•The right subtree of a node contains only nodes with keys greater
than or equal the node’s key.

•The left and right subtree each must also be a binary search tree .

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 74


Example of Binary Search Tree

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 75


Simple graph
A graph in which each edge connects two different vertices and
where no two edges connect the same pair of vertices is called a
simple graph.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 76


Multigraph
A graph in which multiple edges may connect the same pair of
vertices is called a multigraph.

Since there can be multiple edges between the same pair of


vertices, the multiplicity of edges tells the number of edges
between two vertices.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 77


Regular graph

A Regular graph is a graph in which degree of all the vertices is same.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 78


Complete Graph

A graph in which every pair of vertices is joined by exactly one edge is called
complete graph. It contains all possible edges.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 79


Planar Graph

A planar graph is a graph that we can draw in a plane in such a


way that no two edges of it cross each other except at a vertex to
which they are incident.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 80


Bipartite Graph

A bipartite graph is a graph in which the vertex set can be


partitioned into two sets such that edges only go between sets,
not within them.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 81


Homomorphic Graph
 A graph Homomorphism is a mapping between two graphs that
respects their structure.

 Maps adjacent vertices of one graph to the adjacent vertices in the


other.

 A homomorphism from graph G to graph H is a map


from VG to VH which takes edges to edges.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 82


Homomorphic Graph

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 83


Isomorphic Graph
 Consider a graph G(V, E) and G* (V*,E*) are said to be isomorphic
if there exists one to one correspondence

 i.e. f:V→V* such that {u, v} is an edge of G if and only if {f(u),


f(v)} is an edge of G*.

 Number of vertices of graph (a) must be equal to graph (b), i.e., one
to one correspondence some goes for edges.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 84


Isomorphic Graph

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 85


Euler Graph
A connected graph G is called an Euler graph, if there is a closed trail which
includes every edge of the graph G.

An Euler path is a path that uses every edge of a graph exactly once. An Euler
path starts and ends at different vertices.

An Euler circuit is a circuit that uses every edge of a graph exactly once.

An Euler circuit always starts and ends at the same vertex

A connected graph G is an Euler graph if and only if all vertices of G are of


even degree, and a connected graph G is Eulerian if and only if its edge set can
be decomposed into cycles.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 86


Hamiltonian Graph
A connected graph G is called Hamiltonian graph if there is a cycle
which includes every vertex of G and the cycle is called Hamiltonian
cycle. Hamiltonian walk in graph G is a walk that passes through each
vertex exactly once.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 87


Faculty Video Links, Youtube & NPTEL
Video Links and Online Courses Details
• Youtube/other Video Links
• https://www.youtube.com/watch?v=qPtGlrb_sXg&list=PL0862D1A
947252D20&index=40
• https://www.youtube.com/watch?v=y0HcmNI5K4E&list=PLbMVo
gVj5nJQ-tIzyygzzLLxomzlbIiE4&index=32

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 88


Daily Quiz
Q1 A Poset in which every pair of elements has both a least upper bound
and a greatest lower bound is termed as _______
(a) sublattice (b) lattice
(c) trail (d) walk
Q2 In the poset (Z+, |) (where Z+ is the set of all positive integers and | is
the divides relation) are the integers 9 and 351 comparable?
(a) comparable
(b) not comparable
(c) comparable but not determined
(d) determined but not comparable
Q3 If every two elements of a poset are comparable then the poset is
called ________
(a) sub ordered poset (b) totally ordered poset
(c) sub lattice (d) semigroup

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 89


Daily Quiz

Q4 ______ and _______ are the two binary operations defined for
lattices.
(a) Join, meet
(b) Addition, subtraction
(c) Union, intersection
(d) Multiplication, modulo division
Q5 A ________ has a greatest element and a least element which
satisfy 0<=a<=1 for every a in the lattice(say, L).
(a) semilattice
(b) join semilattice
(c) meet semilattice
(d) bounded lattice

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 90


Weekly Assignment

Q1 Define Isomorphism. Let A = {1, 2, 3, 6} and let ‘≤’ be the


divisibility relation on A. Let B = {ϕ, {a}, {b}, {a,b}} and let ‘≤’ be
the relation ⊆. Then (A, ≤ ) and (B, ≤) are isomorphic.

Q2 Consider the subset {2,3} {4,6} and {3,6}, and ({1,2,3,4,5,6}, / ) is


the poset.
i) Draw the Hasse Diagram.
ii) Find the Lower bound and Upper bound of each subset if it exists.
iii) Find GLB and LUB of each subset if it exists.

Q3 Draw the hasse diagram for (D24, /).

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 91


Weekly Assignment

Q 4 In a lattice if a ≤b≤c then prove that


a) avb=b∧c
b) (a v b) v (b ∧ c) =(a v b) ∧ (a v c) = b

Q5 Draw the Hasse diagram of Poset ({{1},{2},{4},{1,2}{1,4},{2,4},


{3,4},{1,3,4},{2,3,4}}, ) where composition is usual subset.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 92


MCQs
Q1 A sublattice(say, S) of a lattice(say, L) is a convex sublattice of L if
_________
(a) x>=z, where x in S implies z in S, for every element x, y in L
(b) x=y and y<=z, where x, y in S implies z in S, for every element x,
y, z in L
(c) x<=y<=z, where x, y in S implies z in S, for every element x, y, z in
L
(d) x=y and y>=z, where x, y in S implies z in S, for every element x,
y, z in L
Q2 Every poset that is a complete semilattice must always be a _______
(a) sublattice
(b) complete lattice
(c) free lattice
(d) partial lattice

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 93


MCQs

Q3 The graph is the smallest non-modular lattice N 5. A lattice is


_______ if and only if it does not have a _______ isomorphic to
N5.
(a) non-modular, complete lattice
(b) moduler, semilattice
(c) non-modular, sublattice
(d) modular, sublattice
Q4 A free semilattice has the _______ property.
(a) intersection
(b) commutative and associative
(c) identity
(d) universal

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 94


MCQs

Q5. Let D30 = {1, 2, 3, 4, 5, 6, 10, 15, 30} and relation I be partial
ordering on D30. The all lower bounds of 10 and 15 respectively are
(a) 1,3 (b)1,5 (c) 1,3,5 (d)None of these

Q6 Hasse diagrams are drawn for


(a)partially ordered sets (b)lattices
(c) boolean Algebra (d)none of these

Q7 A self-complemented, distributive lattice is called


(a)Boolean algebra (b)Modular lattice
(c) Complete lattice (d)Self dual lattice

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 95


Glossary Questions

QAttempt all parts Fill in The Blanks,


Hints(walk, spanning tree, binary tree, Tree.)
a. A ……………. is a hierarchical data structure defined as a
collection of nodes.
b. A tree whose elements have at most 2 children is called a ..............

c. A ……………………..is a tree that connects all the vertices of a


graph with the minimum possible number of edges.

d A …………….. is a sequence of vertices and edges of a graph.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 96


Glossary Questions

QAttempt all parts Fill in The Blanks,


Hints(Hasse Diagram , Bipartite Graph , Planar Graph ,
Hamilton Path )
a A……….. is a graph path between two vertices of a graph that visits
each vertex exactly once.
b A …………is a graph that can be embedded in the plane.
c. .............bipartite graph is a graph whose vertices can be divided into
two disjoint and independent sets and such that every edge connects
a vertex in to one in .
d A ……………. is a graphical rendering of a partially ordered set
displayed via the cover relation of the partially ordered set with an
implied upward orientation.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 97


Old Question Papers

Q1 Draw the hasse diagram for (D24, /).


Q2 Draw the Hasse diagram of Poset ({{1},{2},{4},{1,2}{1,4},{2,4},
{3,4},{1,3,4},{2,3,4}}, )
Q3 In a lattice if a ≤b≤c then prove that
a) avb=b∧c
b) (a v b) v (b ∧ c) =(a v b) ∧ (a v c) = b
Q4 What is Hasse diagram. Give example.
Q5 Let (A, ≤) and (B, ≤) be two posets. Prove that (A × B, ≤) is a poset,

where (a, b) ≤ (c, d) if and only if a ≤ c, b ≤ d.


Q6 Draw Karnaugh map and simplify the Boolean expression: -
A’B’C’D’+ A’B C’ D + A’ B’ C D + A’B’C D’ + A’B C D

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 98


Old Question Papers

Q7 Prove that a lattice with 5 elements is not a Boolean algebra.


Q8 Show that the following are equivalent in a Boolean algebra
a ≤ b⇔ a*b' = 0⇔b' ≤ a ⇔ a’⊕ b' = 1
Q9 Let (L,∨,∧,≤) be a distributive lattice and a,b ∈ L . if a ∧ b = a ∧ c
and
a ∨ b = a ∨ c then show that b = c
Q10 For any positive integer D36, then find whether (D36,’|’) is lattice or
not?
Q11 Simplify the following Boolean function using K-map:
F(x,y,z)=Σ(0,2,3,7)
Q12 Explain Modular lattice, distribute lattice and bounded lattice with
example and diagram

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 99


Old Question Papers

Q13 Draw the Hasse diagram of (A, ≤), where A= {3, 4, 12, 24, 48, 72}
and relation ≤ be such that a ≤ b if a divides b
Q14 Find the values of the Boolean function represented by F (x, y, z)
= xy + z’.
Q15 Answer these questions for the poset({3, 5, 9, 15,24, 45}, |).
i. Find the maximal elements.
ii. Find the minimal elements.
iii. Is there a greatest element?
iv. Is there a least element?
v. Find all upper bounds of {3, 5}.
vi. Find the least upper bound of {3, 5}.
vii. Find all lower bounds of {15, 45}.
viii. Find the greatest lower bound of {15, 45},if it exists.
11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 100
Old Question Papers

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 101


Old Question Papers

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 102


Old Question Papers

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 103


Old Question Papers

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 104


Old Question Papers

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 105


Old Question Papers

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 106


Old Question Papers

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 107


Old Question Papers

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 108


Old Question Papers

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 109


Old Question Papers

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 110


Old Question Papers

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 111


Old Question Papers

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 112


Old Question Papers

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 113


Expected Questions for University Exam

Q1. In a lattice if a ≤b≤c then prove that


a) avb=b∧c
b) (a v b) v (b ∧ c) =(a v b) ∧ (a v c) = b
Q2. Let (A, ≤) and (B, ≤) be two posets. Prove that (A × B, ≤) is a
poset,
where (a, b) ≤ (c, d) if and only if a ≤ c, b ≤ d.
Q3 Let (L,∨,∧,≤) be a distributive lattice and a,b ∈ L . if a ∧ b = a ∧ c
and
a ∨ b = a ∨ c then show that b = c

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 114


Summary

 After learning the lattices students will able to use lattice in Page
Rank of Google and measure the similarity of two orderings (ranking) on
a set, i.e. Pearson correlation.

 solve problems using the algebraic properties of the elements of a


Boolean algebra

 Define and verify distributive property for lattices

 Define a POSET and find the maximum and minimum elements of


subsets of POSET when they exist

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 115


References

1. Discrete Mathematics and Its Applications, Kenneth H. Rosen,


McGraw-Hill, 2006.

2. Discrete Mathematical Structures, B. Kolman, R. C. Busby, and S. C.


Ross, Prentice Hall, 2004.

3. Discrete and Combinatorial Mathematics, R.P. Grimaldi, Addison


Wesley, 2004.

4. Discrete Mathematical Structures, Y N Singh, Wiley-India, First


Edition, 2010.

11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 116


11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 117

You might also like