Discrete Structure ยท Unit 8
Graph Theory Fundamentals
Exam-focused notes for Graph Theory Fundamentals (Discrete Structure, BIT152): what the TU syllabus asks and how it has actually been tested, with 8 solved past questions from this unit.
Graph Theory Fundamentals in short
Graphs model networks of connected things: roads, computer networks, friendships and web links. This chapter defines graphs, their types and representations, and basic properties such as connectivity and planarity.
What this unit covers
- Graph definition and types
- Simple graphs and pseudographs
- Graph representation using adjacency matrix
- Graph representation using incidence matrix
- Directed graphs
- Graph isomorphism
- Connectivity in graphs
- Bipartite graphs
- Planar graphs
Connectivity in graphs
2082 ยท 5 marks
What do you mean by connectivity in graph? Discuss about Bipartite and Planar graph. [1+4]
Show solved answerHide answer
Connectivity in Graph, Bipartite Graph, and Planar Graph
Connectivity in Graph [1 mark]
Connectivity refers to the property of a graph that describes whether there exists a path between every pair of vertices.
- A graph G is said to be connected if there exists at least one path between every pair of vertices.
- If a graph is not connected, it is called a disconnected graph, and it consists of two or more connected components.
Example: In a graph G = (V, E), if for every u, v โ V there exists a path from u to v, then G is connected.
Bipartite Graph [2 marks]
Definition
A graph G = (V, E) is called a Bipartite Graph if its vertex set V can be partitioned into two disjoint non-empty sets Vโ and Vโ such that:
- Vโ โช Vโ = V
- Vโ โฉ Vโ = โ
- Every edge in E connects a vertex in Vโ to a vertex in Vโ (i.e., no edge exists between two vertices within the same set).
Key Properties
| Property | Description |
|---|---|
| Two-colorable | A graph is bipartite if and only if it can be 2-colored (no two adjacent vertices share the same color) |
| No odd cycles | A graph is bipartite if and only if it contains no odd-length cycles |
| Complete Bipartite | Denoted K(m,n): every vertex in Vโ is connected to every vertex in Vโ |
Example
Vโ = {1, 2, 3} Vโ = {A, B, C}
1 --- A
1 --- B
2 --- B
2 --- C
3 --- C
Here, all edges go between Vโ and Vโ, so this is a bipartite graph.
Complete Bipartite Graph K(2,3)
1 2
|\ \ / |
| \/ |
| /\ |
| / \ |
A B C
- K(m,n) has m ร n edges.
- K(3,3) is a well-known non-planar graph.
Planar Graph [2 marks]
Definition
A graph G is called a Planar Graph if it can be drawn in a plane (2D surface) such that no two edges cross each other (except at their endpoints/vertices).
Such a drawing is called a planar embedding or planar representation.
Key Properties
1. Euler's Formula for Planar Graphs:
For a connected planar graph:
$$V - E + F = 2$$
Where:
- V = number of vertices
- E = number of edges
- F = number of faces (regions, including the outer/unbounded face)
2. Edge Bound:
For a simple connected planar graph with V โฅ 3:
$$E \leq 3V - 6$$
For bipartite planar graphs:
$$E \leq 2V - 4$$
3. Kuratowski's Theorem:
A graph is non-planar if and only if it contains a subgraph that is a subdivision of either:
- Kโ (complete graph on 5 vertices), or
- Kโ,โ (complete bipartite graph)
Example
Planar Graph: Non-Planar Graph:
1 Kโ
/|\
/ | \
2--+--3 (Can be redrawn without crossings)
\ | /
\|/
4
Faces in a Planar Graph
Consider a planar graph with V = 4, E = 6 (Kโ):
$$F = 2 - V + E = 2 - 4 + 6 = 4 \text{ faces}$$
Summary Table
| Graph Type | Key Condition | Example |
|---|---|---|
| Bipartite | Vertices split into 2 sets; edges only between sets | K(2,3), K(3,3) |
| Planar | Can be drawn without edge crossings | Kโ, Trees |
| Non-Planar | Contains Kโ or Kโ,โ as subdivision | Kโ , Kโ,โ |
Note: Kโ,โ is bipartite but non-planar, showing that bipartite and planar are independent properties.
2080 ยท 10 marks
What does connectivity in graphs mean? Differentiate between permutation and combination. Solve the recurrence relation $a_n = 7a_{n-1} - 10a_{n-2}$ with initial conditions $a_0 = 2$ and $a_1 = 3$. [4+6]
Graph isomorphism
2081 ยท 10 marks
Define graph isomorphism with an example.Using Kruskal's algorithm generate the Minimum Spanning Tree from following graph.[5+5]
Show solved answerHide answer
Graph Isomorphism and Minimum Spanning Tree (Kruskal's Algorithm)
Given
Part 1: Define graph isomorphism with an example. [5 marks]
Part 2: Generate the MST using Kruskal's algorithm "from following graph." [5 marks]
Missing data: The actual graph (vertices, edges, and edge weights) referenced by "following graph" is not provided in the text. No image, adjacency list, or weight matrix was included. Therefore the exact numeric MST for the intended graph cannot be computed.
I will fully answer Part 1 (self-contained) and, for Part 2, present the correct Kruskal procedure applied to a clearly labelled representative graph, explicitly flagged as illustrative since the real graph is unreadable/absent.
Solution
(a) Graph Isomorphism
Definition
Two graphs $G_1 = (V_1, E_1)$ and $G_2 = (V_2, E_2)$ are isomorphic if there exists a bijection (one-to-one and onto mapping)
$$f : V_1 \rightarrow V_2$$
such that for all vertices $u, v \in V_1$:
$$(u, v) \in E_1 \iff (f(u), f(v)) \in E_2$$
Informally, two graphs are isomorphic if one can be obtained from the other by relabelling the vertices, preserving the adjacency structure. We write $G_1 \cong G_2$.
Necessary Conditions
| Condition | Requirement |
|---|---|
| Same vertex count | $ |
| Same edge count | $ |
| Same degree sequence | Sorted degrees identical |
| Same number of components | Structure preserved |
These are necessary but not sufficient.
Example
Graph $G_1$: $V_1 = {1,2,3,4}$, $E_1 = {(1,2),(2,3),(3,4),(4,1)}$
Graph $G_2$: $V_2 = {a,b,c,d}$, $E_2 = {(a,b),(b,d),(d,c),(c,a)}$
Both are 4-cycles with degree sequence ${2,2,2,2}$.
Bijection: $f(1)=a,\ f(2)=b,\ f(3)=d,\ f(4)=c$
Verification:
- $(1,2) \to (a,b)$ โ
- $(2,3) \to (b,d)$ โ
- $(3,4) \to (d,c)$ โ
- $(4,1) \to (c,a)$ โ
All edges map to edges, so $G_1 \cong G_2$.
(b) MST using Kruskal's Algorithm
Note: The specific graph in the question was not available in the provided text. The following uses a clearly labelled representative graph to demonstrate the method. Substitute the actual edge weights if the graph is available.
Algorithm
- Sort all edges in non-decreasing order of weight.
- Pick the smallest edge; add it to the MST if it does not create a cycle (use union-find).
- Repeat until the MST contains $V - 1$ edges.
Illustrative Graph
Vertices ${A,B,C,D,E,F}$ with edges:
| Edge | Wt | Edge | Wt | Edge | Wt |
|---|---|---|---|---|---|
| A-B | 4 | B-F | 5 | D-E | 2 |
| A-F | 2 | B-C | 6 | E-F | 9 |
| C-D | 3 | C-F | 8 | B-E | 7 |
Sorted Edges
$$A\text{-}F(2),\ D\text{-}E(2),\ C\text{-}D(3),\ A\text{-}B(4),\ B\text{-}F(5),\ B\text{-}C(6),\ B\text{-}E(7),\ C\text{-}F(8),\ E\text{-}F(9)$$
Selection
| Step | Edge | Wt | Cycle? | Action | Components |
|---|---|---|---|---|---|
| 1 | A-F | 2 | No | Add | {A,F},{B},{C},{D},{E} |
| 2 | D-E | 2 | No | Add | {A,F},{B},{C},{D,E} |
| 3 | C-D | 3 | No | Add | {A,F},{B},{C,D,E} |
| 4 | A-B | 4 | No | Add | {A,B,F},{C,D,E} |
| 5 | B-F | 5 | Yes | Skip | - |
| 6 | B-C | 6 | No | Add | {A,B,C,D,E,F} |
Now MST has $V-1 = 5$ edges. Stop.
Result
MST edges: A-F, D-E, C-D, A-B, B-C
$$\text{Total weight} = 2 + 2 + 3 + 4 + 6 = 17$$
A ---4--- B ---6--- C ---3--- D ---2--- E
|
2
|
F
Minimum Spanning Tree total cost = 17 (for the illustrative graph).
For the illustrative graph used here the minimum spanning tree total is 17. The genuine limitation is that the actual exam graph was not provided, so repeat the same selection steps on the graph printed on your paper.
2080.1 ยท 10 marks
Differentiate between graph and tree.Describe about the necessary conditions for graphs to be isomorphic with an example.[2+8]
Graph representation using adjacency matrix
2081 ยท 5 marks
Explain any two ways of representing the graph. [5]
0 ยท 5 marks
How can we represent a graph using Adjacency Matrix? Explain. [5]
Graph representation using incidence matrix
2080 ยท 5 marks
Explain incidence matrix representation of a graph with example. [5]
Graph definition and types
2078 ยท 5 marks
What is graph? Explain simple graph and pseudograph with example. [5]
Make Unit 8 stick
Practice BIT152 with flashcards & quizzes