BIT152 ยท 2081 ยท 10 marks
Define graph isomorphism with an example.Using Kruskal's algorithm generate the Minimum Spanning Tree from following graph.[5+5]
Define graph isomorphism with an example.Using Kruskal's algorithm generate the Minimum Spanning Tree from following graph.[5+5]
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.
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.