Subgraphs, Paths, Cycles and Components

Learn about subgraphs, paths, cycles, and connected components.

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 GG is a subgraph of GG, as is a single edge of GG.

We say a graph GG is an improper subgraph of GG. All other subgraphs of GG, are said to be its proper subgraphs, and are said to be properly contained in GG. Some examples of proper and improper subgraphs can be seen below:

Get hands-on with 1400+ tech skills courses.