Directed graphs II, Trees

Preview:

Citation preview

Directed graphs II,Trees

Lecture 8

Theorem 1.12 (Theorem 1.4.24) Euler’s Theorem fordigraphs: A digraph G has an Eulerian circuit if and only if(a) d+(v) = d−(v) for every vertex v in G and(b) G has at most one nontrivial weak component.

To prove it, we can use an analog of Lemma 1.5:Lemma 1.13: If d+(v) = d−(v) for every vertex v in G, then wecan partition E(G) into (directed) cycles.

Proof. As in Lemma 1.5, consider the longest (directed) pathsin G and use induction on the number of edges.

Proof of Theorem 1.12 now practically repeats the proof ofTheorem 1.6 with Lemma 1.13 replacing Lemma 1.5: choose alargest circuit in G, and if does not contain all edges, then weare able to enlarge it.

Theorem 1.12 (Theorem 1.4.24) Euler’s Theorem fordigraphs: A digraph G has an Eulerian circuit if and only if(a) d+(v) = d−(v) for every vertex v in G and(b) G has at most one nontrivial weak component.

To prove it, we can use an analog of Lemma 1.5:Lemma 1.13: If d+(v) = d−(v) for every vertex v in G, then wecan partition E(G) into (directed) cycles.

Proof. As in Lemma 1.5, consider the longest (directed) pathsin G and use induction on the number of edges.

Proof of Theorem 1.12 now practically repeats the proof ofTheorem 1.6 with Lemma 1.13 replacing Lemma 1.5: choose alargest circuit in G, and if does not contain all edges, then weare able to enlarge it.

Theorem 1.12 (Theorem 1.4.24) Euler’s Theorem fordigraphs: A digraph G has an Eulerian circuit if and only if(a) d+(v) = d−(v) for every vertex v in G and(b) G has at most one nontrivial weak component.

To prove it, we can use an analog of Lemma 1.5:Lemma 1.13: If d+(v) = d−(v) for every vertex v in G, then wecan partition E(G) into (directed) cycles.

Proof. As in Lemma 1.5, consider the longest (directed) pathsin G and use induction on the number of edges.

Proof of Theorem 1.12 now practically repeats the proof ofTheorem 1.6 with Lemma 1.13 replacing Lemma 1.5: choose alargest circuit in G, and if does not contain all edges, then weare able to enlarge it.

Theorem 1.12 (Theorem 1.4.24) Euler’s Theorem fordigraphs: A digraph G has an Eulerian circuit if and only if(a) d+(v) = d−(v) for every vertex v in G and(b) G has at most one nontrivial weak component.

To prove it, we can use an analog of Lemma 1.5:Lemma 1.13: If d+(v) = d−(v) for every vertex v in G, then wecan partition E(G) into (directed) cycles.

Proof. As in Lemma 1.5, consider the longest (directed) pathsin G and use induction on the number of edges.

Proof of Theorem 1.12 now practically repeats the proof ofTheorem 1.6 with Lemma 1.13 replacing Lemma 1.5: choose alargest circuit in G, and if does not contain all edges, then weare able to enlarge it.

de Bruijn graphsThe vertices of the de Bruijn graph Bn are the n-dimensional0,1-vectors.And Bn has an edge from (α1, . . . , αn) to (β1, . . . , βn) if and onlyifα2 = β1, α3 = β2, . . . , αn = βn−1.

de Bruijn graphs

• •

1

1

1

0

0

0

10

0

0

1

1

0 ↑ ↓ 11→←0

010 101000

001 011

111

110100

••

•0

0

1

11

0

1

1•

••

• 00

1

10

1

0

0

de Bruijn graphs have nice properties: they are sparse but onecan reach each vertex from any other vertex in n steps.

Also all n-edge paths in Bn starting from any fixed vertex endat different vertices.

Also Bn has Eulerian circuits.

Consider the following problem: Is there a cyclic arrangementof 2n binary digits such that all 2n strings of n consecutivedigits are all distinct?

Every Eulerian circuit in Bn−1 yields such a cyclic arrangement.

de Bruijn graphs have nice properties: they are sparse but onecan reach each vertex from any other vertex in n steps.

Also all n-edge paths in Bn starting from any fixed vertex endat different vertices.

Also Bn has Eulerian circuits.

Consider the following problem: Is there a cyclic arrangementof 2n binary digits such that all 2n strings of n consecutivedigits are all distinct?

Every Eulerian circuit in Bn−1 yields such a cyclic arrangement.

de Bruijn graphs have nice properties: they are sparse but onecan reach each vertex from any other vertex in n steps.

Also all n-edge paths in Bn starting from any fixed vertex endat different vertices.

Also Bn has Eulerian circuits.

Consider the following problem: Is there a cyclic arrangementof 2n binary digits such that all 2n strings of n consecutivedigits are all distinct?

Every Eulerian circuit in Bn−1 yields such a cyclic arrangement.

Kings in tournamentsA vertex v in a digraph D is a king if every vertex in D can bereached from v by a (directed) path of length at most 2.

Theorem 1.14 (Landau, 1953): Every tournament has a king.Moreover, in every tournament each vertex of maximumout-degree is a king.

Proof. Let x be a vertex of maximum out-degree in atournament T .

Note that V (T ) = {x} ∪ N+(x) ∪ N−(x). If x is not a king, thenthere should be y ∈ V (T ) not reachable from x in at most twosteps. Such y must be in N−(x). Fix this y .

For each z ∈ N+(x), yz ∈ E(T ) since otherwise (x , z, y) wouldbe our path. But then N+(x) ⊂ N+(y) and d+(x) < d+(y),contradicting the choice of x .

Kings in tournamentsA vertex v in a digraph D is a king if every vertex in D can bereached from v by a (directed) path of length at most 2.

Theorem 1.14 (Landau, 1953): Every tournament has a king.Moreover, in every tournament each vertex of maximumout-degree is a king.

Proof. Let x be a vertex of maximum out-degree in atournament T .

Note that V (T ) = {x} ∪ N+(x) ∪ N−(x). If x is not a king, thenthere should be y ∈ V (T ) not reachable from x in at most twosteps. Such y must be in N−(x). Fix this y .

For each z ∈ N+(x), yz ∈ E(T ) since otherwise (x , z, y) wouldbe our path. But then N+(x) ⊂ N+(y) and d+(x) < d+(y),contradicting the choice of x .

Kings in tournamentsA vertex v in a digraph D is a king if every vertex in D can bereached from v by a (directed) path of length at most 2.

Theorem 1.14 (Landau, 1953): Every tournament has a king.Moreover, in every tournament each vertex of maximumout-degree is a king.

Proof. Let x be a vertex of maximum out-degree in atournament T .

Note that V (T ) = {x} ∪ N+(x) ∪ N−(x). If x is not a king, thenthere should be y ∈ V (T ) not reachable from x in at most twosteps. Such y must be in N−(x). Fix this y .

For each z ∈ N+(x), yz ∈ E(T ) since otherwise (x , z, y) wouldbe our path. But then N+(x) ⊂ N+(y) and d+(x) < d+(y),contradicting the choice of x .

Main theorems in Chapter 1:1. Konig’s Theorem on bipartite graphs.

2. Euler’s Theorem on Eulerian circuits.

3. Degree Sum Formula

4. Mantel’s Theorem on triangle-free graphs.

5. Havel-Hakimi Theorem on graphic sequences.

Main theorems in Chapter 1:1. Konig’s Theorem on bipartite graphs.

2. Euler’s Theorem on Eulerian circuits.

3. Degree Sum Formula

4. Mantel’s Theorem on triangle-free graphs.

5. Havel-Hakimi Theorem on graphic sequences.

Main theorems in Chapter 1:1. Konig’s Theorem on bipartite graphs.

2. Euler’s Theorem on Eulerian circuits.

3. Degree Sum Formula

4. Mantel’s Theorem on triangle-free graphs.

5. Havel-Hakimi Theorem on graphic sequences.

Main theorems in Chapter 1:1. Konig’s Theorem on bipartite graphs.

2. Euler’s Theorem on Eulerian circuits.

3. Degree Sum Formula

4. Mantel’s Theorem on triangle-free graphs.

5. Havel-Hakimi Theorem on graphic sequences.

Main theorems in Chapter 1:1. Konig’s Theorem on bipartite graphs.

2. Euler’s Theorem on Eulerian circuits.

3. Degree Sum Formula

4. Mantel’s Theorem on triangle-free graphs.

5. Havel-Hakimi Theorem on graphic sequences.

TreesA graph with no cycle is called acyclic.A tree is a connected acyclic graph.

So, an acyclic graph is also called a forest.By definition, each component of a forest is a tree.

Lemma 2.1:(a) Every tree with at least two vertices has at least two leaves.(b) Deleting a leaf from a connected graph produces anotherconnected graph.

Proof. Let T be a tree on n ≥ 2 vertices and let P be a path ofmaximum length in T . Then the endpoints of P must be distinctleafs, since otherwise we could find a longer path or a cycle.This proves (a).

Let G be a connected graph and v be a leaf in G. LetG′ = G − v .Since G is connected, for any vertices u,w ∈ V (G)− v , there isa u,w-path P(u,w). It does not contain v , since every internalvertex of P(u,w) has degree at least 2.

Therefore, P(u,w) is in G′. Since each P(u,w) is in G′, graphG′ is connected.

Lemma 2.1:(a) Every tree with at least two vertices has at least two leaves.(b) Deleting a leaf from a connected graph produces anotherconnected graph.

Proof. Let T be a tree on n ≥ 2 vertices and let P be a path ofmaximum length in T . Then the endpoints of P must be distinctleafs, since otherwise we could find a longer path or a cycle.This proves (a).

Let G be a connected graph and v be a leaf in G. LetG′ = G − v .Since G is connected, for any vertices u,w ∈ V (G)− v , there isa u,w-path P(u,w). It does not contain v , since every internalvertex of P(u,w) has degree at least 2.

Therefore, P(u,w) is in G′. Since each P(u,w) is in G′, graphG′ is connected.

Lemma 2.1:(a) Every tree with at least two vertices has at least two leaves.(b) Deleting a leaf from a connected graph produces anotherconnected graph.

Proof. Let T be a tree on n ≥ 2 vertices and let P be a path ofmaximum length in T . Then the endpoints of P must be distinctleafs, since otherwise we could find a longer path or a cycle.This proves (a).

Let G be a connected graph and v be a leaf in G. LetG′ = G − v .Since G is connected, for any vertices u,w ∈ V (G)− v , there isa u,w-path P(u,w). It does not contain v , since every internalvertex of P(u,w) has degree at least 2.

Therefore, P(u,w) is in G′. Since each P(u,w) is in G′, graphG′ is connected.

Characterization of treesTheorem 2.2 (A characterization of trees): Let n ≥ 1. For ann-vertex graph G, the following are equivalent(A) G is connected and has no cycles.

(B) G is connected and has n − 1 edges.

(C) G has no cycles and has n − 1 edges.

(D) For any u, v ∈ V (G), G has exactly one u, v -path.

(F) Adding to G any edge creates a graph with exactly onecycle.

Proof. (A)⇒ (B,C). We use induction on n. For n = 1 the claimis obvious. Suppose that n > 1 and every tree with k < nvertices has exactly k −1 edges. Let G be any n-vertex tree. ByLemma 2.1 (a), G has a leaf, say v . By Lemma 2.1 (b), G − vhas (n− 1)− 1 edges. But then G has n− 1 edges, as claimed.

Characterization of treesTheorem 2.2 (A characterization of trees): Let n ≥ 1. For ann-vertex graph G, the following are equivalent(A) G is connected and has no cycles.

(B) G is connected and has n − 1 edges.

(C) G has no cycles and has n − 1 edges.

(D) For any u, v ∈ V (G), G has exactly one u, v -path.

(F) Adding to G any edge creates a graph with exactly onecycle.

Proof. (A)⇒ (B,C). We use induction on n. For n = 1 the claimis obvious. Suppose that n > 1 and every tree with k < nvertices has exactly k −1 edges. Let G be any n-vertex tree. ByLemma 2.1 (a), G has a leaf, say v . By Lemma 2.1 (b), G − vhas (n− 1)− 1 edges. But then G has n− 1 edges, as claimed.

Characterization of treesTheorem 2.2 (A characterization of trees): Let n ≥ 1. For ann-vertex graph G, the following are equivalent(A) G is connected and has no cycles.

(B) G is connected and has n − 1 edges.

(C) G has no cycles and has n − 1 edges.

(D) For any u, v ∈ V (G), G has exactly one u, v -path.

(F) Adding to G any edge creates a graph with exactly onecycle.

Proof. (A)⇒ (B,C). We use induction on n. For n = 1 the claimis obvious. Suppose that n > 1 and every tree with k < nvertices has exactly k −1 edges. Let G be any n-vertex tree. ByLemma 2.1 (a), G has a leaf, say v . By Lemma 2.1 (b), G − vhas (n− 1)− 1 edges. But then G has n− 1 edges, as claimed.

Characterization of treesTheorem 2.2 (A characterization of trees): Let n ≥ 1. For ann-vertex graph G, the following are equivalent(A) G is connected and has no cycles.

(B) G is connected and has n − 1 edges.

(C) G has no cycles and has n − 1 edges.

(D) For any u, v ∈ V (G), G has exactly one u, v -path.

(F) Adding to G any edge creates a graph with exactly onecycle.

Proof. (A)⇒ (B,C). We use induction on n. For n = 1 the claimis obvious. Suppose that n > 1 and every tree with k < nvertices has exactly k −1 edges. Let G be any n-vertex tree. ByLemma 2.1 (a), G has a leaf, say v . By Lemma 2.1 (b), G − vhas (n− 1)− 1 edges. But then G has n− 1 edges, as claimed.

(B)⇒ (A,C). Suppose G is connected and has n − 1 edges.Deleting an edge from a cycle in G leaves it connected. Do thisprocedure until the final graph G′ has no cycles but isconnected. By definition, G′ is a tree. Since (A)⇒ (B), G′ hasn − 1 edges. But then G′ = G.

(C)⇒ (A,B). Suppose G has no cycles and has n − 1 edges.Let G1, . . . ,Gk be the components of G. Let ni (respectively, ei )be the number of vertices (respectively, edges) in Gi . Byconstruction, each Gi is a tree. Since (A)⇒ (B), for each1 ≤ i ≤ k , ei = ni − 1. Then

n − 1 = |E(G)| =k∑

i=1

ei =k∑

i=1

(ni − 1) = n − k .

Thus, k = 1, as claimed.

(B)⇒ (A,C). Suppose G is connected and has n − 1 edges.Deleting an edge from a cycle in G leaves it connected. Do thisprocedure until the final graph G′ has no cycles but isconnected. By definition, G′ is a tree. Since (A)⇒ (B), G′ hasn − 1 edges. But then G′ = G.

(C)⇒ (A,B). Suppose G has no cycles and has n − 1 edges.Let G1, . . . ,Gk be the components of G. Let ni (respectively, ei )be the number of vertices (respectively, edges) in Gi . Byconstruction, each Gi is a tree. Since (A)⇒ (B), for each1 ≤ i ≤ k , ei = ni − 1. Then

n − 1 = |E(G)| =k∑

i=1

ei =k∑

i=1

(ni − 1) = n − k .

Thus, k = 1, as claimed.

(A)⇒ (D) (We prove (¬D)⇒ (¬A)). If (D) does not hold, thenthere are u, v ∈ V (G) s.t. either (a) there are no u, v -paths or(b) there are more than one u, v -paths.If (a) holds, then G is disconnected, and if (b) holds, then G hasa cycle. In any case, G is not a tree.

(A)⇒ (D) (We prove (¬D)⇒ (¬A)). If (D) does not hold, thenthere are u, v ∈ V (G) s.t. either (a) there are no u, v -paths or(b) there are more than one u, v -paths.If (a) holds, then G is disconnected, and if (b) holds, then G hasa cycle. In any case, G is not a tree.

(D)⇒ (F) Suppose (D) holds for G and u, v ∈ V (G). Since by(D), G has exactly one u, v -path, G + uv will have exactly onecycle (passing through uv ).

(F)⇒ (A) (We prove (¬A)⇒ (¬F)). If (A) does not hold, theneither (a) G has a cycle, say C, or (b) G is disconnected.If (a) holds, then adding an edge with both ends on C createsat least one more cycle, so (F) does not hold.If (a) does not hold but (b) holds, then adding an edge withends in distinct components would create a graph with nocycles, violating (F) again.

(D)⇒ (F) Suppose (D) holds for G and u, v ∈ V (G). Since by(D), G has exactly one u, v -path, G + uv will have exactly onecycle (passing through uv ).

(F)⇒ (A) (We prove (¬A)⇒ (¬F)). If (A) does not hold, theneither (a) G has a cycle, say C, or (b) G is disconnected.If (a) holds, then adding an edge with both ends on C createsat least one more cycle, so (F) does not hold.If (a) does not hold but (b) holds, then adding an edge withends in distinct components would create a graph with nocycles, violating (F) again.