CS 637: Mathematics-II

Lecture 20: Structural Graph Proofs on Paths, Cycles, and Trees

Three Worked Structural Proofs

What We Will Prove

  1. A path \(P_n\) with \(n \ge 2\) has exactly two non-cut vertices.
  2. A connected graph with \(n\) vertices and \(n\) edges has exactly one cycle.
  3. If a tree has \(n-k+1\) leaves and one vertex of each degree \(2,3,\dots,k\), then \[ n = \frac{k(k-1)}{2} + 2. \]

Main Techniques

Cut vertices in trees Spanning trees Unique path property Handshaking lemma Leaf counting

Notation Note

In Question 3, we interpret the statement in the standard way: among the non-leaf vertices, there is exactly one vertex of each degree \(2,3,\dots,k\). Since there are \(n-k+1\) leaves, the remaining \(k-1\) vertices are precisely those non-leaf vertices.

Question 1: A Path Has Exactly Two Non-Cut Vertices

Statement

Prove that a path has exactly two non-cut vertices.

More precisely, for the path graph \(P_n\) with \(n \ge 2\), the only non-cut vertices are its two endpoints.

Proof

Let the path be

\[ v_1 - v_2 - \cdots - v_n. \]

The endpoints are \(v_1\) and \(v_n\).

  • If we remove \(v_1\), the remaining graph is \[ v_2 - v_3 - \cdots - v_n, \] which is still connected.
  • Similarly, removing \(v_n\) leaves a connected path.
  • Now take an internal vertex \(v_i\) with \(2 \le i \le n-1\). After removing \(v_i\), the graph splits into \[ v_1 - \cdots - v_{i-1} \quad \text{and} \quad v_{i+1} - \cdots - v_n. \] These two parts are disconnected, so \(v_i\) is a cut vertex.

Hence the internal vertices are cut vertices, and the two endpoints are not cut vertices. Therefore a path has exactly two non-cut vertices.

Picture

non-cut cut cut cut non-cut
The endpoints survive deletion without disconnecting the graph; every internal vertex breaks the path into two pieces.

Small Exception

The trivial path \(P_1\) has only one vertex, so it has one non-cut vertex. The statement “exactly two” is true for \(P_n\) with \(n \ge 2\).

Question 2: Connected Graph with \(n\) Vertices and \(n\) Edges

Statement

Prove that a connected graph with \(n\) vertices and \(n\) edges has exactly one cycle.

Key Idea

Start from a spanning tree. A spanning tree on \(n\) vertices has exactly \(n-1\) edges. Since the graph has \(n\) edges, it has exactly one extra edge beyond a spanning tree.

Proof

Let \(G\) be a connected graph with \(n\) vertices and \(n\) edges. Since \(G\) is connected, it has a spanning tree \(T\).

A spanning tree on \(n\) vertices has exactly \(n-1\) edges, so

\[ |E(G)\setminus E(T)| = n-(n-1)=1. \]

Thus there is exactly one edge \(e=uv\) in \(G\) that does not belong to \(T\).

Because \(T\) is a tree, there is a unique path in \(T\) from \(u\) to \(v\). Adding the extra edge \(e\) to that unique path creates a cycle. So \(G\) has at least one cycle.

Now let \(C\) be any cycle in \(G\). Since \(T\) is acyclic, the cycle \(C\) cannot lie entirely inside \(T\). Therefore \(C\) must contain an edge of \(E(G)\setminus E(T)\). But there is only one such edge, namely \(e\). Hence every cycle of \(G\) must contain \(e\).

Once \(e=uv\) is fixed, the rest of the cycle must be the unique \(u\)-\(v\) path in the tree \(T\). Therefore there is only one possible cycle.

So \(G\) has exactly one cycle.

Terminology

A connected graph with exactly one cycle is called a unicyclic graph. The theorem shows that every connected graph with \(|V|=|E|\) is unicyclic.

Question 3: Tree with \(n-k+1\) Leaves

Statement

Let \(T\) be a tree with \(n\) vertices. Suppose \(T\) has \(n-k+1\) leaves, and among the remaining vertices there is exactly one vertex of each degree \(2,3,\dots,k\). Find the relation between \(n\) and \(k\).

First Count the Non-Leaves

The number of leaves is \(n-k+1\), so the number of non-leaf vertices is

\[ n-(n-k+1)=k-1. \]

This matches the list of degrees \(2,3,\dots,k\), which contains exactly \(k-1\) values.

Use the Handshaking Lemma

For any tree on \(n\) vertices,

\[ \sum_{v\in V(T)} \deg(v)=2(n-1). \]

Computation

The leaves contribute \(n-k+1\) to the degree sum, because each leaf has degree \(1\).

The non-leaf vertices contribute

\[ 2+3+\cdots+k = \frac{k(k+1)}{2}-1. \]

Applying the handshaking lemma gives

\[ (n-k+1) + \left(\frac{k(k+1)}{2}-1\right) = 2(n-1). \]

Simplifying,

\[ n-k+\frac{k(k+1)}{2} = 2n-2, \] \[ n = \frac{k(k+1)}{2}-k+2 = \frac{k(k-1)}{2}+2. \]

Therefore the required relation is

\[ \boxed{n=\frac{k(k-1)}{2}+2.} \]

Check with Small Values

\(k\) Predicted \(n\) Leaves \(n-k+1\)
2 3 2
3 5 3
4 8 5

Takeaways

Proof Patterns to Remember

  • For a path, deleting an endpoint keeps the graph connected, while deleting an internal vertex splits the path into two components.
  • For a connected graph with \(n\) vertices and \(n\) edges, compare it with a spanning tree of size \(n-1\); one extra edge creates one and only one cycle.
  • For trees, the identity \(\sum \deg(v)=2(n-1)\) is often the fastest way to convert information about leaves and internal degrees into an equation.

Final Answers

  1. A path \(P_n\) with \(n \ge 2\) has exactly two non-cut vertices, namely its endpoints.
  2. A connected graph with \(n\) vertices and \(n\) edges is unicyclic, so it has exactly one cycle.
  3. Under the stated interpretation of Question 3, \[ n=\frac{k(k-1)}{2}+2. \]
🏠