directed graphs ii, trees
TRANSCRIPT
![Page 1: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/1.jpg)
Directed graphs II,Trees
Lecture 8
![Page 2: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/2.jpg)
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.
![Page 3: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/3.jpg)
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.
![Page 4: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/4.jpg)
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.
![Page 5: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/5.jpg)
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.
![Page 6: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/6.jpg)
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.
![Page 7: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/7.jpg)
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
![Page 8: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/8.jpg)
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.
![Page 9: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/9.jpg)
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.
![Page 10: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/10.jpg)
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.
![Page 11: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/11.jpg)
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 .
![Page 12: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/12.jpg)
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 .
![Page 13: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/13.jpg)
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 .
![Page 14: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/14.jpg)
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.
![Page 15: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/15.jpg)
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.
![Page 16: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/16.jpg)
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.
![Page 17: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/17.jpg)
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.
![Page 18: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/18.jpg)
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.
![Page 19: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/19.jpg)
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.
![Page 20: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/20.jpg)
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.
![Page 21: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/21.jpg)
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.
![Page 22: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/22.jpg)
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.
![Page 23: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/23.jpg)
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.
![Page 24: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/24.jpg)
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.
![Page 25: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/25.jpg)
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.
![Page 26: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/26.jpg)
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.
![Page 27: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/27.jpg)
(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.
![Page 28: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/28.jpg)
(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.
![Page 29: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/29.jpg)
(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.
![Page 30: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/30.jpg)
(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.
![Page 31: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/31.jpg)
(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.
![Page 32: Directed graphs II, Trees](https://reader030.vdocument.in/reader030/viewer/2022012804/61bd285461276e740b0ff36d/html5/thumbnails/32.jpg)
(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.