Terminology
A walk in a graph is a sequence of vertices , where adjacent vertices have an edge between them. The length of the walk is .
A path is a walk in which no vertices are repeated.
Let be a graph. We define a relation on by if there exists a walk. Easy to check that is a equivalence relation. The equivalence classes are called the connected components of .
A simple graph is an undirected graph that contains no loops (edges connecting a vertex to itself) and no multiple edges (more than one edge between the same two vertices).
Theorem 1.
Let and be two vertices in . If there exists a walk, then there exists a path. Moreover, the shortest walk is a path.
Induction Trap
Here’s a false claim:
Theorem 2(False claim).
Let be a graph on vertices, where each vertex is the endpoint of at least two edges. Then, has at least edges.
Faulty proof by induction
We attempt to prove the claim using induction on .
Base Case ():
The only graph on three vertices where each vertex is the endpoint of at least two edges is the complete graph , which has edges. Hence, the statement holds for .Inductive Step:
Assume that for , the theorem holds:
Any graph on vertices with the given property has at least edges.Now, consider a graph on vertices satisfying the given property. If we obtain from a graph on vertices by adding a vertex and at least two edges, then the number of edges in is at least
Hence, by induction, the statement is “proved.” (But it’s wrong!)
The flaw in this proof is the assumption that every -vertex graph satisfying the given property can be obtained by adding a vertex to an -vertex graph with the same property. This is not necessarily true. A counterexample is any cyclic graph, such as , which has fewer than edges despite satisfying the given vertex-degree condition.
Template for Proof by Induction on Number of Vertices
Statement:
Any graph with vertices satisfying property also has property .
Inductive Hypothesis:
Assume that all graphs on vertices satisfying property also satisfy property .
Inductive Step:
- Let be a graph on vertices with property .
- Choose a vertex in such that the subgraph satisfies property (requires justification).
- By the inductive hypothesis, has property .
- Show that adding to results in a graph that also satisfies property (requires justification).
Some theorems
Theorem 3.
Every graph whose minimum degree is contains a cycle.
Definition 4.
A bipartite graph is a graph whose vertex set can be partitioned into two nonempty subsets and such that each edge of has one endpoint in and one endpoint in .
Theorem 5.
A graph is a bipartite graph iff it doesn’t have any odd cycles.
Proof
One direction is very easy: if is bipartite with vertex sets and , every step along a walk takes you either from to or from to . To end up where you started, therefore, you must take an even number of steps.Conversely, suppose that every cycle of is even. Let be any vertex. For each vertex in the same component as , let be the length of the shortest path from to . Color red every vertex in whose distance from is even, and color the other vertices of blue. Do the same for each component of .
Check that if had any edge between two red vertices or between two blue vertices, it would have a closed walk of an odd number of edges, and hence an odd cycle. Thus, is bipartite, with the red vertices and the blue vertices forming the two parts.
Theorem 6.
In every graph, the number of vertices with odd degree is even.
Proof
Let denote the degree of the vertex . Note that . If we split the contribution to the LHS by vertices with odd degree and vertices with even degree, we observe that the sum of the degrees of vertices of odd degree is even. It follows that there must be an even number of vertices with odd degree.