Graph Theory: Traversing a graph Ingrid Narvaez Fall 2013 Dr. Mongi Abidi
Paths and Walks • Slide 2
Paths and walks • Slide 3
Number of walks • Slide 4
Connectivity • Two vertices are said to be connected if there exists a path between them. • A vertex is connected to itself, even if there is no physical path drawn to it. • A graph is connected if every pair of vertices in the graph is connected. Connected Graph Slide 5 Not a connected Graph
Cycles and Closed Paths • A cycle is a walk with 3 or more vertices that starts and ends at the same place. Slide 6
Euler Tours and Hamiltonian Cycles • An Euler tour is a walk that traverses every edge in a graph exactly once. • Every connected graph with vertices of even degree has an Euler tour. • A Hamiltonian cycle is a cycle that visits every vertex exactly once. • There is no known algorithm to define a Hamiltonian cycle in a given graph. Slide 7
Trees • Forest Slide 8 Two trees
Spanning Trees • A spanning tree is a subgrapgh that touches every vertex on the graph an creates no cycles. • Every graph has a spanning tree. • For a weighted graph, its minimum spanning tree is a tree that contains edges with smallest weights. Slide 9
Spanning Trees 1 3 2 2 3 3 1 1 7 7 1 Weighted graph G=(V, E) Slide 10 Minimum Spanning Tree of weight 19