Communication Network2 3 8 10 1 4 5 9 11 6 7 Each edge is a link that can be constructed (i.e., a feasible link).
Graph Operations And Representation
Sample Graph Problems
Path problems.
Connectedness problems.
Spanning tree problems.
Path Finding Path between 1 and 8.
2 3 8 10 1 4 5 9 11 6 7 4 8 6 6 7 5 2 4 4 5 3 Path length is 20.
Vertices represent cities and edges represent highways. Edge weights are distances or driving times. Depending on the context, path length may either be the number of edges on the path or the sum of the weights of the edges on the path.
Another Path Between 1 and 8
2 3 8 10 1 4 5 9 11 6 7 4 8 6 6 7 5 2 4 4 5 3 Path length is 28.
Since a graph may have more than one path between two vertices, we may be interested in finding a path with a particular property. For example, find a path with minimum length
Example Of No Path
2 3 8 10 1 4 5 9 11 6 7 No path between 2 and 9.
Connected Graph
Undirected graph.
There is a path between every pair of vertices.
Example Of Not Connected
2 3 8 10 1 4 5 9 11 6 7
Connected Graph Example
2 3 8 10 1 4 5 9 11 6 7
Determine whether an undirected graph is connected.
Connected Components
2 3 8 10 1 4 5 9 11 6 7
Connected Component
A maximal subgraph that is connected.
Cannot add vertices and edges from original graph and retain connectedness.
A connected graph has exactly 1 component.
Not A Component
2 3 8 10 1 4 5 9 11 6 7
Determine connected components of an undirected graph
Communication Network
2 3 8 10 1 4 5 9 11 6 7 Each edge is a link that can be constructed (i.e., a feasible link).
Communication Network Problems
Is the network connected?
Can we communicate between every pair of cities?
Find the components.
Want to construct smallest number of feasible links so that resulting network is connected.
Cycles And Connectedness
2 3 8 10 1 4 5 9 11 6 7 Removal of an edge that is on a cycle does not affect connectedness.
Cycles And Connectedness
2 3 8 10 1 4 5 9 11 6 7 Connected subgraph with all vertices and minimum number of edges has no cycles.
Tree
Connected graph that has no cycles.
n vertex connected graph with n-1 edges.
In graph terminology, the term rooted tree is used to denote what we were earlier calling a tree (Chapter 12).
Spanning Tree
Subgraph that includes all vertices of the original graph.
Subgraph is a tree.
If original graph has n vertices, the spanning tree has n vertices and n-1 edges.
Minimum Cost Spanning Tree
2 3 8 10 1 4 5 9 11 6 7 4 8 6 6 7 5 2 4 4 5 3 8 2 Tree cost is sum of edge weights/costs.
Comments