Unit 2
Unit 2
Noida
Unit: 2
Discrete Mathematics
(BMCA 0105)
BHUSHAN
MCA Department
MCA 1st Semester
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 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.
CO3 Identify and prove properties of Algebraic Structures like Groups, Rings and K3
Fields
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
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
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
Year Percentage
2020-21 97%
2019-20 100%
2018-19 100%
Basic Understanding of
• Relation and function
• Partial order relation
• Ordered set
• Recursively defined functions.
• Mathematical Induction
• Venn Diagram
45
15
9
5
3
1
Hasse diagram
11/20/24 BHUSHAN BMCA 0105 and DM UNIT 2 23
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
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.
∴a ≤ b (b is greatest element)
Therefore, x ≤ a and x ≤ b, ∀ x ∈ A.
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
(a ∨ b) ∨ c = a ∨ (b ∨ c )
Similarly, we prove for meet: (a ∧ b) ∧ c = a ∧ (b ∧ c )
Let a, b ∈ L,
∴ a ∨ (a ∧ b) = a
Since, a ≤ a ∨ b
∴ a ∧ (a ∨ b) = a
Similarly, a ∧ b ≤ and
∴x = x ∧ x ≤ x ∧ 1
x ∧ 1 ≤ x and x ≤ x ; x ≤ 1
∴x∧1=x
Similarly, we prove other properties.
Example
Find all upper and lower bounds of the following subset of A: (a)
B1={a, b}; B2={c, d, e}
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.
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).
Example: 15
d
9
5
3
e f Minimal members
1
Lattice Not a lattice
{a,b} {a,c}
{b,c}
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.
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.
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
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.
In an undirected graph,
The out-degree and the in-degree are not
defined.
1. Adjacency-list representation
2. Adjacency-matrix representation
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 .
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.
1. It is one of the simplest for searching a graph and the archetype for
many important graph.
4. It also produces a "breadth-first tree" with root s that contains all such
reachable vertices.
3. When all of v's edges have been explored, the search "backtracks" to
explore edges leaving the vertex from which v was discovered.
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.
Leaf − The node which does not have any child node is called
the leaf node.
•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 .
A graph in which every pair of vertices is joined by exactly one edge is called
complete graph. It contains all possible edges.
Number of vertices of graph (a) must be equal to graph (b), i.e., one
to one correspondence some goes for edges.
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
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
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
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
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.