Professional Documents
Culture Documents
Unit 3 - Session 3
Unit 3 - Session 3
Components of a Graph
C. P. S. Pathirana.
Senior Lecturer
Department of Mathematics & Philosophy of Engineering.
The Open University of Sri Lanka.
Components of a Graph
• Introduction
Recall - (sub-graphs)
𝑣1 𝑣5
𝑣3
𝐺
𝑣4 𝑣2 𝑣4
𝑣2
𝑣1 𝑣1 𝑣5
𝑣3 𝑣3
𝐺1 𝐺2
𝑑𝑖𝑠𝑡 𝑢, 𝑣 = ∞
Example
𝑣1
𝑣3 𝑣4 𝑣5
𝑣2
𝑑𝑖𝑠𝑡 𝑣1 , 𝑣2 = 1
𝑑𝑖𝑠𝑡 𝑣1 , 𝑣3 = 1
𝑑𝑖𝑠𝑡 𝑣1 , 𝑣4 = 2
𝑑𝑖𝑠𝑡 𝑣1 , 𝑣5 = ∞
Definition 3.3
➢ That is first find all the shortest paths and among them
choose the longest one.
Example 𝑣1 𝑣2
𝑣3 𝑣4
𝑣6 𝑣5
Now write the shortest paths between two vertices.
• Therefore 𝑑𝑖𝑎𝑚 𝐺 = 3.
THANK YOU