Subgraphs, Paths, Cycles and Components
Explore the concepts of subgraphs, paths, cycles, and connected components within graphs. Understand how these elements form the basis for analyzing graph structure and preparing for algorithm implementation. Gain clarity on the properties of paths and cycles in both simple graphs and directed graphs.
We'll cover the following...
Subgraphs
A subgraph of a graph is the graph obtained from it by removing zero or more vertices or edges.
Note: Removing an edge does not result in the removal of its end-vertices. However, removing a vertex necessarily results in the removal of its incident edges.
So, starting with an obvious example—every graph is its own subgraph. A single vertex of a graph is a subgraph of , as is a single edge of .
We say a graph is an improper subgraph of . All other subgraphs of , are said to be its proper subgraphs, and are said to be properly contained in . Some examples of proper and improper subgraphs can be seen below:
Let’s take a look at some important types of graphs that occur as subgraphs. These are immensely useful for carrying out discussions of graph algorithms.