Subgraphs and Special Graph Families
How much of a large network's structure survives when we zoom in on a small piece of it? This question drives one of the most useful ideas in graph theory: the subgraph. Given a graph modeling a social network, a circuit, or a molecule, we often want to isolate a fragment. This might be a cluster of mutually connected friends, a chain of dependencies, or a closed loop of causes. We then study it as a graph in its own right. Doing this precisely requires a key distinction. We must separate merely taking a piece of the vertex and edge sets (a general subgraph) from taking a piece that remembers every edge among the vertices we keep (an induced subgraph). This distinction matters because many real questions are really questions about induced subgraphs. Does this set of people form a clique of mutual friends? Does this set of tasks contain a hidden dependency cycle? Is this coloring problem secretly about detecting a forbidden pattern? Alongside subgraphs, a small family of named graphs recurs constantly. These serve as the building blocks and test cases of the whole subject: complete graphs , paths , cycles , and the complement operation , which swaps edges and non-edges. These are the "atoms" against which more complicated graphs are measured. They are also the pieces into which such graphs are decomposed. The big picture is that graph theory develops by comparing an unknown graph to these reference graphs. Does contain as a subgraph? Is itself a path or cycle? Does have some property lacks? Much of the subject's machinery — matchings, colorings, planarity, Ramsey theory — is phrased in exactly this vocabulary. This article builds the formal apparatus. It covers rigorous definitions of subgraph and induced subgraph, the four basic named families, the complement construction, and a foundational theorem relating edge counts of a graph and its complement. The article delivers precise definitions, a fully proved theorem about complement edge-counts, and two worked examples with concrete non-trivial graphs. It also includes a counterexample showing why the induced/non-induced distinction cannot be dropped. Finally, it surveys where these ideas surface in coloring, Ramsey theory, and computer science.
- A subgraph of keeps a subset of vertices and a subset of the corresponding edges; an induced subgraph keeps all edges between the chosen vertices.
- (complete graph), (path), and (cycle) are the standard reference families every graph is compared against.
- The complement has the same vertices as but exactly the non-edges of as its edges.
- Edge counts of and always sum to , the edge count of — a simple but load-bearing identity.
- Induced subgraphs are determined entirely by a vertex subset; general subgraphs are not, and this gap is where subtle errors creep in.
- Key idea: every graph is best understood through the smaller, canonical graphs — , , , — sitting inside or beside it.
Where this lives today
In graph coloring, the chromatic number of and the clique number (the largest with as an induced subgraph) are linked by , and perfect graphs are exactly those where this bound is tight for every induced subgraph — a definition that could not even be stated without the induced-subgraph concept. This sets up the transition to Graph Coloring and Chromatic Number. In Ramsey theory, the complement operation is the engine of the argument: Ramsey's theorem guarantees that for large enough , any red/blue coloring of the edges of contains a monochromatic , and phrasing "red edges" as and "blue edges" as is the standard setup, directly using Edge complementarity. In bipartite structure detection, checking whether a graph contains an odd cycle as a subgraph is the combinatorial heart of testing bipartiteness, foreshadowing Bipartite Graphs and Characterization. In computer science, induced subgraph isomorphism (deciding whether for some ) is NP-complete in general and underlies pattern-matching in chemical structure search, social network motif detection, and database query graphs. Paths and cycles as subgraphs are the basic objects tested by depth-first search (for cycle detection) and by shortest-path algorithms (which return induced or non-induced paths depending on the algorithm). In statistics and network science, complements of "similarity graphs" (where edges mean "similar") give "dissimilarity graphs," and clique-finding in one is independent-set-finding in the other, a direct application of the clique/independent-set duality from Example 2. In coding theory and design theory, complete graphs model round-robin tournament schedules, and their edge decompositions into paths or cycles (Hamiltonian decomposition of ) are classical combinatorial design problems.
Ask the tutor: Can you show why every self-complementary graph must have or vertices, with a full worked construction for ?
Let be a simple graph (no loops, no multiple edges), where is a set of unordered pairs of distinct vertices from .
Subgraph. A graph is a subgraph of , written , if
Induced subgraph. For a subset , the subgraph induced by , denoted , is the graph with vertex set and edge set
That is, contains every edge of with both endpoints in . A subgraph of is called induced if ; equivalently, is induced iff no edge of between two vertices of is missing from .
Spanning subgraph. A subgraph is spanning if .
Complete graph . The graph on vertices in which every pair of distinct vertices is joined by an edge:
It has edges.
Path . The graph on vertices with edge set ; it has edges and exactly two vertices of degree (when ).
Cycle (). The graph on vertices with edge set ; it has edges and every vertex has degree .
Complement. The complement of is the graph where
So has exactly the pairs of vertices that are not adjacent in .
Intuition
Think of as a friendship network drawn on a fixed set of people. A subgraph corresponds to choosing some people and some of their real friendships to record — perhaps you only wrote down half the friendships you know about among the people you chose. An induced subgraph is stricter: once you decide which people to include, you must record every friendship that actually exists among them. This is why induced subgraphs are so natural for questions like "is there a clique of size hiding in here?" — a clique is a set of vertices whose induced subgraph is complete, and the answer would be corrupted if we were allowed to selectively drop edges. The complement flips the entire picture: records exactly the non-friendships. A set of vertices that forms a clique in becomes an independent set (no edges at all) in , and vice versa. This duality is why the complement operation is indispensable in coloring theory and Ramsey theory: statements about cliques in translate directly into statements about independent sets in .
:::svg[ on 5 vertices, an induced subgraph , and a non-induced subgraph on the same vertex set]
Let be a simple graph on vertices, and let be its complement. Then
Consequently, for every vertex ,
We use direct counting via a partition of the edge set of (proof technique: partition/double counting). Fix the vertex set with . Let denote the set of all unordered pairs of distinct vertices of ; by definition of this set is exactly , and
This is a standard counting fact: choosing an unordered pair of distinct elements from an -element set can be done in ways, since each pair is counted once and there are ordered pairs of distinct elements, each unordered pair corresponding to ordered pairs. By the definition of a simple graph, : every edge of is some pair of distinct vertices. By the definition of the complement,
i.e. consists precisely of the pairs in that are not in . Hence and are disjoint, and their union is all of :
This is a partition of a finite set into two disjoint pieces, so by the addition principle,
This proves the first claim. For the second claim, fix . The degree counts the number of vertices with , and counts the number of with . Since every pair with lies in exactly one of or (shown above), the vertices split into exactly those adjacent to in and those adjacent to in , with no overlap and no omission. Hence
completing the proof.
∎For any simple graph , .
The corollary follows because is defined as , and taking complements twice removes the same set twice: , using the set-theoretic identity for (here ).
Worked examples
Example 1: Petersen-style asymmetric example on 6 vertices. Let and let have edge set
So is a -cycle –––––– with one extra "diagonal" chord , giving edges. Subgraph vs. induced subgraph. Take .
- The induced subgraph must contain every edge of with both endpoints in . Scanning : (yes), (yes), (yes), (no, ), (no), (no), (yes). So
a -cycle on — four edges.
- A non-induced subgraph on the same vertex set could legally omit some of these, e.g. with and is a valid subgraph (a matching of two disjoint edges) but is not induced, since it drops the edges and that actually has among these vertices.
Complement. Since , , and , matching Edge complementarity. Concretely, all pairs are
Removing the edges of leaves
which indeed has elements. Check the degree identity at vertex : , and ; sum is . ✓. Named families inside . contains as a subgraph (e.g. –––, using existing edges ), and contains as an induced subgraph, as computed above (on ), and contains the full -cycle as a spanning subgraph (drop the chord ). does not contain as a subgraph: a needs edges among vertices, but the maximum number of edges has among any vertices is (as seen with ), since has only edges total spread over vertices with maximum degree .
Example 2: A graph and its complement, with a clique/independent-set duality. Let and
So . Degrees: (), (), (), (), (). Is a clique? We check whether . The pairs are — all three are in . So yes, induces a triangle: . Complement. Here so , hence . All pairs on are
Removing the edges of (namely ) leaves
Duality check. Since is a clique in (all edges present), it must be an independent set in (no edges present): check — indeed none of these three appear in above. ✓ This illustrates the general fact that induces a complete subgraph in if and only if induces an edgeless subgraph in , an immediate consequence of the complement definition (a pair is an edge of exactly when it is a non-edge of ). Named families. Is itself a path or a cycle? has vertices and edges; would need edges and would need edges, so edge count alone does not rule out . But requires every vertex to have degree exactly , while here and . So is neither nor nor any relabeling of them — it is a genuinely different graph on vertices with edges (a "bull"-like graph: a triangle with pendant edges and ... actually hangs off and hangs off , two distinct pendants off the triangle).
The theorem-adjacent fact used constantly in practice is: a vertex set forms a clique in iff . This statement is about induced subgraphs. If we weaken the requirement to merely " has a subgraph on vertex set isomorphic to some graph with the right number of vertices," the clique-detection claim collapses. Concretely, reuse the graph from Example 1: , . Consider , all six vertices. If we only ask "does contain some spanning subgraph with vertices and at least one edge," the answer is trivially yes and tells us nothing about clique structure. Worse, if we mistakenly try to certify a clique using non-induced subgraphs: take any vertices, say , and note has a (non-induced) subgraph on these four vertices with edges — three edges, matching the edge count of a path or even close to that of a small clique fragment. If a careless argument concluded from "there is a -edge subgraph on " that " is close to forming a clique " (which needs edges), it would be checking the wrong object: the induced subgraph has edges — exactly the same three, since those are indeed all the -edges among these vertices, and , so is far from a clique. The point of the counterexample is sharper with a set where induced and arbitrary subgraphs visibly diverge: Take again. We showed (four edges: ). If someone instead builds the subgraph with and only edges (a valid, non-induced subgraph — just delete edges and from consideration), and mistakenly asks "does certify whether is a clique in ?", the answer from alone is uninformative: has edges, is disconnected, and looks nothing like a clique, even though the induced subgraph is the more edge-dense , and neither nor is — but only correctly reports the true adjacency structure of restricted to . Any clique-detection procedure that inspects an arbitrary subgraph on vertex set , rather than the induced subgraph , can be fed a sparse and wrongly certify "not a clique" even when is complete elsewhere, or conversely give no information when is not complete. This shows the induced-subgraph hypothesis cannot be dropped from clique-type theorems: only , using all edges among , correctly reflects whether is a clique.
Scope, edge cases & common traps
| Situation | What to check | Common error |
|---|---|---|
| or | is the empty graph; has one vertex, no edges | Forgetting these are valid (trivial) induced subgraphs |
| but not spanning | is allowed | Assuming subgraphs must use all vertices |
| Counting edges | Use | Forgetting is the same vertex set for and |
| Claiming is a clique | Must verify every pair in is an edge of , i.e. inspect | Checking only some pairs, or checking a non-induced subgraph |
| Path/cycle identification | Must match degree sequence and connectivity, not just edge count | Assuming equal edge count implies isomorphic to or |
| for cycles | is only defined for | Writing "" as if it were a valid simple graph (would need a multi-edge) |
The mathematician behind it
Origins · 1 minFrank Harary and how this was discovered
Frank Harary spent decades systematizing graph theory's basic vocabulary — subgraphs, induced subgraphs, complements, and the standard named families such as , , and — into the coherent framework used in every modern textbook. His 1969 book Graph Theory became the standard reference that fixed much of today's terminology, including the careful distinction between a subgraph and an induced subgraph that this article formalizes.
Harary was not the sole originator of these ideas — complement graphs and complete graphs trace to earlier combinatorics and to the graph-theoretic reformulation of Ramsey's theorem in the 1930s — but his expository and organizational work made graph theory a self-contained subject with a shared, precise vocabulary, rather than a scattered set of results borrowed from topology and combinatorics.
Origins · 1 minhow this was discovered
What exactly is the difference between "subgraph" and "induced subgraph"?
A subgraph of only requires that , , and every edge of has both endpoints in ; you are free to drop some edges of between the chosen vertices. An induced subgraph is a specific subgraph determined entirely by the vertex set : it must contain every edge of with both endpoints in , with no freedom to omit any. Every induced subgraph is a subgraph, but not every subgraph is induced — the two coincide only when the chosen edge set happens to be exactly the full edge set among the chosen vertices.
Why do we care about the complement graph at all?
The complement swaps the roles of "edge" and "non-edge," which turns questions about dense structure (cliques) into equivalent questions about sparse structure (independent sets), and vice versa. This is extremely useful computationally and theoretically: many hard problems about one structure become the same hard problem about the other, and results like Ramsey's theorem are naturally phrased using a graph and its complement simultaneously (think red edges vs. blue edges in a two-coloring of ).
Is the only graph on vertices with edges?
Yes. Any simple graph on vertices has at most edges, since that is the total number of distinct unordered pairs of vertices, and equality forces every pair to be an edge — which is exactly the definition of . So is uniquely the edge-maximal simple graph on vertices.
Can a graph be isomorphic to its own complement?
Yes; such graphs are called self-complementary. A necessary condition follows from Edge complementarity: since is required, and their sum is , we need to be even, which forces or . The smallest nontrivial example is (the path on 4 vertices), which is self-complementary.
Does " contains as a subgraph" mean the same as " has a path of length "?
Essentially yes, with care about "length" conventions: has vertices and edges, so containing as a subgraph means has a sequence of distinct vertices each consecutively adjacent, i.e. a path with edges. This subgraph need not be induced — may have extra edges (chords) among those vertices, as in Example 1's graph , which contains as a subgraph even though the induced subgraph on those same vertices might be denser.
Why does clique detection specifically need induced subgraphs and not just any subgraph?
Being a clique is a statement about the complete adjacency pattern among a vertex set: every pair must be connected. That property can only be certified by looking at all edges present among the vertices, which is precisely what records. An arbitrary subgraph on might omit edges that are actually present in , hiding true adjacencies, or one could imagine restricting attention to a sparse subgraph and wrongly concluding is not a clique. Only the induced subgraph gives a faithful, complete picture.
How does this connect to what comes next in graph theory?
Special families and the subgraph/induced-subgraph distinction set up two major directions: bipartiteness, characterized exactly by the absence of odd cycles as subgraphs (leading to Bipartite Graphs and Characterization), and coloring, where the chromatic number is bounded below by the size of the largest complete induced subgraph (leading to Graph Coloring and Chromatic Number). Both rely on precisely the vocabulary developed here.