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

Module 5

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Module 5

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Boolean Algebra

◦ A lattice which is complemented and distributive is called a Boolean Algebra in other


words
◦ If 𝐵 is a non-empty set with two binary operations + and ∗, two distinct elements 0 and
1 and a unary operation ′, then 𝐵 is called a Boolean Algebra if the following basic
properties hold for all 𝑎, 𝑏, 𝑐 ∈ 𝐵
◦ Identity laws: 𝑎 + 0 = 𝑎; 𝑎. 1 = 𝑎
◦ Commutative laws: 𝑎 + 𝑏 = 𝑏 + 𝑎; 𝑎. 𝑏 = 𝑏. 𝑎
◦ Associative laws: 𝑎 + 𝑏 + 𝑐 = 𝑎 + 𝑏 + 𝑐; 𝑎. 𝑏. 𝑐 = 𝑎. 𝑏 . 𝑐
◦ Distributive laws: 𝑎 + 𝑏. 𝑐 = 𝑎 + 𝑏 . (𝑎 + 𝑐); 𝑎. 𝑏 + 𝑐 = 𝑎. 𝑏 + 𝑎. 𝑐
◦ Complement laws: 𝑎 + 𝑎′ = 1; 𝑎. 𝑎′ = 0
Problem:
◦ If 𝑎, 𝑏 ∈ 𝑆 = {1, 2, 3,6} and 𝑎 + 𝑏 = 𝐿𝐶𝑀 𝑎, 𝑏 , 𝑎. 𝑏 = 𝐺𝐶𝐷 𝑎, 𝑏 𝑎𝑛𝑑 𝑎′ = 6/𝑎, show
that {𝑆, +,′ .′ , 1,6} is a Boolean Algebra
Solution:
1 and 6 are the zero element and unit element of {𝑆, +,′ .′ , 1,6}
If a represent any of the elements 1, 2, 3, 6 of S, clearly
𝑎 + 0 = 𝐿𝐶𝑀 𝑎, 1 = 𝑎
𝑎. 1 = 𝐺𝐶𝐷 𝑎, 6 = 𝑎
Identity laws hold
6
𝑎 + 𝑎′ = 𝐿𝐶𝑀 𝑎, = 6 =′ 1′
𝑎

6
𝑎. 𝑎 = 𝐺𝐶𝐷 𝑎, = 1 =′ 0′
𝑎
Complement laws holds
GRAPH THEORY
Evolution of graph theory
◦ Seven Bridges of Konigsberg
◦ Without any break how to trace a graph without
Over tracing & ends with the same point (starting point)
Graph
◦ A graph 𝐺 is an ordered tuple 𝐺 =< 𝑉, 𝐸, Φ𝐺 > where
𝑉 – Non empty set of vertices (nodes or points)
𝐸 − Set of Edges (Links or Bridges)
Φ𝐺 : 𝐸 𝐺 → (𝑉(𝐺) × 𝑉(𝐺)) is an incident function from 𝐸 𝐺 to unordered pair of vertices
𝑉(𝐺) × 𝑉(𝐺)
Basic Concepts
◦ Incident: The ends of an edge are said the incidents with the edge and vice versa
◦ Adjacent: Two vertices are incident with a common edge are adjacent
◦ Loop: An edge with identical ends is called loop
◦ Link: An edge with distinct ends is called link
◦ Finite Graph: A graph 𝐺 is said to be finite if both its vertex set and edge set are finite
◦ Trivial Graph: A graph with one vertex is said to be trivial graph
◦ Null Graph: A graph with no edge is called null graph
◦ Parallel Edges: If 𝑒1 =< 𝑢, 𝑣 > and 𝑒2 =< 𝑢, 𝑣 > then 𝑒1 & 𝑒2 are said to be parallel edges
◦ Degree of vertex: The degree of a vertex, 𝑢 denoted by 𝑑(𝑢) is defined as the no. of
edges incident at 𝑢. In case of loop it should be counted twice.
◦ Isolated Vertex: If 𝑑 𝑢 = 0 then it is said to be isolated vertex
◦ Pendent vertex: If 𝑑 𝑢 = 1 then 𝑢 is said to be pendent vertex
Hand Shaking Theorem
◦ In any graph 𝐺 =< 𝑉, 𝐸 >, σ𝑢∈𝑉(𝐺) 𝑑 𝑢 = 2|𝐸(𝐺)|
Proof:
Every edge exactly contribute 2 degree for every graph
Hence,
Theorem 2:
◦ In any graph the no. of odd degree vertices is even.
Proof:
By portioning vertices set into 𝑣1 & 𝑣2
𝑣1 - contains odd degree of vertices
𝑣2 - contains even degree of vertices
◦ Multigraph: A graph with parallel edges then graph is multigraph
◦ Pseudo graph: A multigraph with loops is said to be pseudo graph
◦ Simple graph: A graph with no parallel edges and loops is said to be simple graph
◦ Regular Graph: If degree of all the vertices of a graph 𝐺 is constant say 𝑘 then 𝐺 is said
to be 𝑘 − regular graph
◦ Complete graph: A graph 𝐺 is said to be complete if any two distinct vertices are
adjacent. A complete graph with 𝑛 vertices is denoted by 𝐾𝑛
𝑉 𝐾𝑛 = 𝑛; 𝐸 𝐾𝑛 = 𝑛𝐶2
Note: Every complete graph is regular and vice versa is not always true
◦ Bipartite Graph: A graph 𝐺 =< 𝑉, 𝐸 > is said to be bipartite if the vertex set 𝑉(𝐺) is
partitioned into two disjoint sets 𝑉1 (𝐺) & 𝑉2 (𝐺) such that every edge will have one end in
𝑉1 and other end in 𝑉2
◦ Complete Bipartite graph: A bipartite graph is said to be complete bipartite if the
bipartition 𝑉1 & 𝑉2 such that every vertex in 𝑉1 is adjacent with every vertex in 𝑉2
◦ Degree sequence of a graph: A non decreasing sequential arrangement of degrees of
vertices of a graph 𝐺 is called degree sequence of a graph.
◦ Complement of a graph: The complement of graph 𝐺 =< 𝑉, 𝐸 > is denoted by 𝐺 𝑐 with
𝑉 𝐺 𝑐 = 𝑉(𝐺) & 𝑒 ∈ 𝐸(𝐺 𝑐 ) iff 𝑒 ∉ 𝐸(𝐺)
Matrix Representation of graphs
◦ When 𝐺 is a simple graph with 𝑛 vertices 𝑣1 , 𝑣2 , . . , 𝑣𝑛 , the matrix of 𝐴 = [𝑎𝑖𝑗 ]
1, 𝑖𝑓 𝑣𝑖 𝑎𝑛𝑑 𝑣𝑗 𝑎𝑟𝑒 𝑎𝑑𝑗𝑎𝑐𝑒𝑛𝑡
◦ 𝑎𝑖𝑗 = ቊ
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
This is called adjacency matrix of 𝐺
Note:
1. Since simple graph has no loops, each diagonal entry of 𝐴 is zero
2. The adjacency matrix of simple graph is symmetric
3. deg(𝑣𝑖 ) is equal to the number of 1’s in the 𝑖𝑡ℎ 𝑟𝑜𝑤 𝑜𝑟 𝑖𝑡ℎ 𝑐𝑜𝑙𝑢𝑚𝑛
4. A pseudocode can also represented by an adjacency matrix. In this case, a loop at
the vertex 𝑣𝑗 is represented by 1 at 𝑗, 𝑗 𝑡ℎ position and the 𝑖, 𝑗 𝑡ℎ entry is equal to
number of edges that are incident on 𝑣𝑖 and 𝑣𝑗
Incident Matrix
◦ When 𝐺 is a simple graph with 𝑛 vertices 𝑣1 , 𝑣2 , . . , 𝑣𝑛 , and m edges 𝑒1 , 𝑒2 … 𝑒𝑚
1, 𝑖𝑓𝑒𝑑𝑔𝑒 e𝑖 𝑖𝑛𝑐𝑖𝑑𝑒𝑛𝑡 𝑜𝑛 𝑣𝑗
◦ 𝑏𝑖𝑗 = ቊ
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
This is called incident matrix of 𝐺. The dimension of incident matrix is 𝑛 × 𝑚
Note:
1. Each column of 𝐵 contains exactly two unit entries
2. A row with all 0 entries corresponds to an isolated vertex
3. A row with a single unit entry corresponds to a pendent vertex
4. 𝐷𝑒𝑔(𝑣𝑖 ) is equal to the number of 1′ 𝑠 in 𝑖𝑡ℎ row
5. Parallel edges are represented in the incident matrix using columns with identical
entries, loop is represented by a column with exactly one unit entry.
Isomorphism of a graph
◦ Two graph 𝐺 & 𝐻 are isomorphic if there exist a bijection Φ: 𝑉 𝐺 → 𝑉(𝐻) such that <
𝑢, 𝑣 >∈ 𝐸(𝐺) iff < Φ 𝑢 , Φ(𝑣) >∈ 𝐸(𝐻)
Necessary and Sufficient Conditions
◦ 𝑉 𝐺 = |𝑉(𝐻)|
◦ 𝐸 𝐺 = |𝐸(𝐻)|
◦ Degree of sequence should be the same
◦ Length of the path should be same.

◦ To determine whether two graphs are isomorphic, it will be easier to consider their
matrix representations.
Isomorphism and Adjacency matrix
◦ Two graphs are isomorphic iff their vertices can be labeled in such a way that the
corresponding adjacency matrix are equal
◦ Two labeled graphs 𝐺1 and 𝐺2 with adjacency matrix 𝐴1 and 𝐴2 respectively are
isomorphic iff there exist a permutation matrix 𝑃 such that 𝑃𝐴1 𝑃𝑇 = 𝐴2
◦ Permutation matrix is determined in 𝑛! Ways if 𝑛 vertices are there in the graph.
◦ The exact permutation matrix that satisfies 𝑃𝐴1 𝑃𝑇 = 𝐴2 this condition is by using degree
of vertices
Problem 1:

Total number of vertices in 𝐺1 and 𝐺2 = 5


Total number of edges in 𝐺1 and 𝐺2 = 8
𝑑 𝑢1 = 3, 𝑑 𝑢2 = 4, 𝑑 𝑢3 = 2, 𝑑 𝑢4 = 4, 𝑑 𝑢5 = 3
Degree Sequence of 𝐺1 = 2, 3, 3, 4, 4

𝑑 𝑣1 = 3, 𝑑 𝑣2 = 2, 𝑑 𝑣3 = 4, 𝑑 𝑣4 = 3, 𝑑 𝑣5 = 4
Degree Sequence of 𝐺2 = 2, 3, 3, 4, 4

𝑢1 → 𝑣1 , 𝑢2 → 𝑣5 , 𝑢3 → 𝑣2 , 𝑢4 → 𝑣3 , 𝑢5 → 𝑣4 (Adjacency matrix same)


Problem 2:
◦ Are the following two graphs are isomorphic?

◦ Solution
◦ Degree of vertex A is 2 and must correspond to either P, Q, T or U, which are of degee 2.
◦ Now each of the vertices P, Q, T, and U is adjacent to another vertex of degree 2
◦ P is adjacent to Q, Q is adjacent to P. But A is not adjacent to any vertex of degree 2
◦ Hence two graphs are not isomorphic.
Problem 3:
◦ Establish the isomorphism of the two graphs given in the below figure by considering
the adjacency matrix

◦ Solution
◦ The adjacency
Subgraph
Walk, Trail, Path
◦ Walk: An alternative sequence of vertices & edges in which it starts & ends with vertices
is called walk.
◦ Trail: A walk is said to be a trial if its edges are distinct
◦ Path: A walk is said to be a path if its vertices are distinct
◦ Closed Walk, trial and path: If the starting vertex and ending vertex are same
◦ Connected Graph: A graph 𝐺 is said to be connected if there exist at least one path
between every distinct pair of vertices
◦ Directed Graph: A graph whose edges specifies the direction
Planar and Plane Graph
◦ In a graph theory a planar graph is a graph that can be embedded in the plane, i.e., it can be
drawn on the plane in such a way that its edges intersect only at their endpoints. In other
words, it can be drawn in such a way that no edges cross each other. Such a drawing is called
a plane graph or planar embedding of the graph."

You might also like