Professional Documents
Culture Documents
TOPIC REVIEW
Subgraphs
A subgraph S of a graph G is a graph whose set of vertices and set
of edges are all subsets of G. (Since every set is a subset of itself, every
graph is a subgraph of itself.)
All the edges and vertices of G might not be present in S; but if a vertex is
present in S, it has a corresponding vertex in G and any edge that connects
two vertices in S will also connect the corresponding vertices in G. All of these
graphs are subgraphs of the first graph.
Spanning subgraph
A spanning subgraph is a subgraph that contains all the vertices of the
original graph. A spanning tree is a spanning subgraph that is often of interest
Spanning tree
A spanning tree is a subset of Graph G, which has all the vertices covered with
minimum possible number of edges. Hence, a spanning tree does not have
cycles and it cannot be disconnected.
APPLICATION
• Sometimes, you are given graph, but only need one way to connect
nodes.
o For example, a network with redundant connections.
o When routing data, you don't care about redundancy: just need a
way to send the data to its destination.
o So if we are looking at routing decisions, we basically want to
reduce the graph to a tree. The tree tells us exactly how we will
send the data.
o If a link fails, we can choose a different tree.
• Given a graph G=(V,E), a subgraph of G that is connects all of the
vertices and is a tree is called a spanning tree.
o For example, suppose we start with this graph:
o We can remove edges until we are left with a tree: the result is a
spanning tree.
o Clearly, a spanning tree will have |V|−1 edges, like any other tree.