Trees. A tree is a graph which is. (a) Connected and. (b) has no cycles (acyclic).

Similar documents
Graph G = (V, E). V ={vertices}, E={edges}. V={a,b,c,d,e,f,g,h,k} E={(a,b),(a,g),( a,h),(a,k),(b,c),(b,k),...,(h,k)}

4 Packing T-joins and T-cuts

Cographs; chordal graphs and tree decompositions

CMPSCI611: The Matroid Theorem Lecture 5

List of Theorems. Mat 416, Introduction to Graph Theory. Theorem 1 The numbers R(p, q) exist and for p, q 2,

Discrete Wiskunde II. Lecture 5: Shortest Paths & Spanning Trees

NATIONAL UNIVERSITY OF SINGAPORE CS3230 DESIGN AND ANALYSIS OF ALGORITHMS SEMESTER II: Time Allowed 2 Hours

Topics in Graph Theory

1 Some loose ends from last time

1 Counting spanning trees: A determinantal formula

HW Graph Theory SOLUTIONS (hbovik) - Q

Ring Sums, Bridges and Fundamental Sets

Tree-width. September 14, 2015

Observation 4.1 G has a proper separation of order 0 if and only if G is disconnected.

Eulerian Subgraphs in Graphs with Short Cycles

R(p, k) = the near regular complete k-partite graph of order p. Let p = sk+r, where s and r are positive integers such that 0 r < k.

The Reduction of Graph Families Closed under Contraction

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Matroids and Greedy Algorithms Date: 10/31/16

Observation 4.1 G has a proper separation of order 0 if and only if G is disconnected.

Decomposing planar cubic graphs

An approximate version of Hadwiger s conjecture for claw-free graphs

Greedy Algorithms. CSE 101: Design and Analysis of Algorithms Lecture 10

Cycles in 4-Connected Planar Graphs

Advanced Topics in Discrete Math: Graph Theory Fall 2010

Part V. Matchings. Matching. 19 Augmenting Paths for Matchings. 18 Bipartite Matching via Flows

Graph Transformations T1 and T2

A necessary and sufficient condition for the existence of a spanning tree with specified vertices having large degrees

Discrete Optimization 2010 Lecture 2 Matroids & Shortest Paths

Extremal Graphs Having No Stable Cutsets

This article appeared in a journal published by Elsevier. The attached copy is furnished to the author for internal non-commercial research and

EXCLUDING SUBDIVISIONS OF INFINITE CLIQUES. Neil Robertson* Department of Mathematics Ohio State University 231 W. 18th Ave. Columbus, Ohio 43210, USA

Induced Subgraph Isomorphism on proper interval and bipartite permutation graphs

Clique numbers of graph unions

Notes on the Matrix-Tree theorem and Cayley s tree enumerator

15.1 Matching, Components, and Edge cover (Collaborate with Xin Yu)

Degree Sequence and Supereulerian Graphs

Design and Analysis of Algorithms

On the Connectivity of a Graph and its Complement Graph

CS 4407 Algorithms Lecture: Shortest Path Algorithms

Graphs & Algorithms: Advanced Topics Nowhere-Zero Flows

Perfect matchings in highly cyclically connected regular graphs

Breadth-First Search of Graphs

Graph coloring, perfect graphs

CLIQUES IN THE UNION OF GRAPHS

Even Cycles in Hypergraphs.

Analysis of Algorithms. Outline. Single Source Shortest Path. Andres Mendez-Vazquez. November 9, Notes. Notes

Connectivity and tree structure in finite graphs arxiv: v5 [math.co] 1 Sep 2014

1 Matchings in Non-Bipartite Graphs

M-saturated M={ } M-unsaturated. Perfect Matching. Matchings

CMPS 6610 Fall 2018 Shortest Paths Carola Wenk

An Introduction to Spectral Graph Theory

More on NP and Reductions

Graph Theory Notes. January 15, H. A. Kierstead

Dynamic Programming on Trees. Example: Independent Set on T = (V, E) rooted at r V.

Every line graph of a 4-edge-connected graph is Z 3 -connected

ALL GRAPHS WITH PAIRED-DOMINATION NUMBER TWO LESS THAN THEIR ORDER. Włodzimierz Ulatowski

Painting Squares in 2 1 Shades

7 The structure of graphs excluding a topological minor

Undirected Graphs. V = { 1, 2, 3, 4, 5, 6, 7, 8 } E = { 1-2, 1-3, 2-3, 2-4, 2-5, 3-5, 3-7, 3-8, 4-5, 5-6 } n = 8 m = 11

Toughness and prism-hamiltonicity of P 4 -free graphs

RECAP: Extremal problems Examples

K 4 -free graphs with no odd holes

Blocks and 2-blocks of graph-like spaces

CS675: Convex and Combinatorial Optimization Fall 2014 Combinatorial Problems as Linear Programs. Instructor: Shaddin Dughmi

Out-colourings of Digraphs

Graphic sequences, adjacency matrix

MATH 61-02: PRACTICE PROBLEMS FOR FINAL EXAM

Parity Versions of 2-Connectedness

Preliminaries. Graphs. E : set of edges (arcs) (Undirected) Graph : (i, j) = (j, i) (edges) V = {1, 2, 3, 4, 5}, E = {(1, 3), (3, 2), (2, 4)}

Efficient Reassembling of Graphs, Part 1: The Linear Case

This article appeared in a journal published by Elsevier. The attached copy is furnished to the author for internal non-commercial research and

Supereulerian planar graphs

The Strong Largeur d Arborescence

k-blocks: a connectivity invariant for graphs

Reconstructibility of trees from subtree size frequencies

be a path in L G ; we can associated to P the following alternating sequence of vertices and edges in G:

ON GLOBAL DOMINATING-χ-COLORING OF GRAPHS

University of Chicago Autumn 2003 CS Markov Chain Monte Carlo Methods

Binomial Ideals from Graphs

The Interlace Polynomial of Graphs at 1

Decompositions of graphs into cycles with chords

Combinatorics and Optimization 442/642, Fall 2012

DECOMPOSITIONS OF MULTIGRAPHS INTO PARTS WITH THE SAME SIZE

Laplacian Integral Graphs with Maximum Degree 3

RECOVERY OF NON-LINEAR CONDUCTIVITIES FOR CIRCULAR PLANAR GRAPHS

Markov Decision Processes

Even pairs in Artemis graphs. Irena Rusu. L.I.F.O., Université d Orléans, bât. 3IA, B.P. 6759, Orléans-cedex 2, France

GRAPHIC REALIZATIONS OF SEQUENCES. Under the direction of Dr. John S. Caughman

Graph Theory Notes. August 8, H. A. Kierstead

Multi-coloring and Mycielski s construction

Lecture 10 February 4, 2013

Copyright 2013 Springer Science+Business Media New York

4-coloring P 6 -free graphs with no induced 5-cycles

Graph Minor Theory. Sergey Norin. March 13, Abstract Lecture notes for the topics course on Graph Minor theory. Winter 2017.

Some Results on Paths and Cycles in Claw-Free Graphs

THE EXTREMAL FUNCTIONS FOR TRIANGLE-FREE GRAPHS WITH EXCLUDED MINORS 1

Independent Transversals in r-partite Graphs

Single Source Shortest Paths

ALG 5.4. Lexicographical Search: Applied to Scheduling Theory. Professor John Reif

ON THE NUMBER OF COMPONENTS OF A GRAPH

Transcription:

Trees A tree is a graph which is (a) Connected and (b) has no cycles (acyclic). 1

Lemma 1 Let the components of G be C 1, C 2,..., C r, Suppose e = (u, v) / E, u C i, v C j. (a) i = j ω(g + e) = ω(g). (b) i j ω(g + e) = ω(g) 1. (a) u v (b) u v 2

Proof Every path P in G + e which is not in G must contain e. Also, Suppose ω(g + e) ω(g). (x = u 0, u 1,..., u k = u, u k+1 = v,..., u l = y) is a path in G + e that uses e. Then clearly x C i and y C j. (a) follows as now no new relations x y are added. (b) Only possible new relations x y are for x C i and y C j. But u v in G + e and so C i C j becomes (only) new component. 3

Lemma 2 G = (V, E) is acyclic (forest) with (tree) components C 1, C 2,..., C k. V = n. e = (u, v) / E, u C i, v C j. (a) i = j G + e contains a cycle. (b) i j G + e is acyclic and has one less component. (c) G has n k edges. 4

(a) u, v C i implies there exists a path (u = u 0, u 1,..., u l = v) in G. So G + e contains the cycle u 0, u 1,..., u l, u 0. u v 5

(a) u v Suppose G + e contains the cycle C. e C else C is a cycle of G. C = (u = u 0, u 1,..., u l = v, u 0 ). But then G contains the path (u 0, u 1,..., u l ) from u to v contradiction. PSfrag replacements u 2 u 1 u v u l 1 6

The drop in the number of components follows from Lemma 1. The rest of the lemma follows from (c) Suppose E = {e 1, e 2,..., e r } and G i = (V, {e 1, e 2,..., e i }) for 0 i r. Claim: G i has n i components. Induction on i. i = 0: G 0 has no edges. i > 0: G i 1 is acyclic and so is G i. It follows from part (a) that e i joins vertices in distinct components of G i 1. It follows from (b) that G i has one less component than G i 1. End of proof of claim Thus r = n k (we assumed G had k components). 7

Corollary 1 If a tree T has n vertices then (a) It has n 1 edges. (b) It has at least 2 vertices of degree 1, (n 2). Proof (a) is part (c) of previous lemma. k = 1 since T is connnected. (b) Let s be the number of vertices of degree 1 in T. There are no vertices of degree 0 these would form separate components. Thus So s 2. 2n 2 = v V d T (v) 2(n s) + s. 8

Theorem 1 Suppose V = n and E = n 1. The following three statements become equivalent. (a) G is connected. (b) G is acyclic. (c) G is a tree. Proof Let E = {e 1, e 2,..., e n 1 } and G i = (V, {e 1, e 2,..., e i }) for 0 i n 1. 9

(a) (b): G 0 has n components and G n 1 has 1 component. Addition of each edge e i must reduce the number of components by 1 Lemma 1(b). Thus G i 1 acyclic implies G i is acyclic Lemma 2(b). (b) follows as G 0 is acyclic. (b) (c): We need to show that G is connected. Since G n 1 is acyclic, ω(g i ) = ω(g i 1 ) 1 for each i Lemma 2(b). Thus ω(g n 1 ) = 1. (c) (a): trivial. 10

Corollary 2 If v is a vertex of degree 1 in a tree T then T v is also a tree. v Proof Suppose T has n vertices and n edges. Then T v has n 1 vertices and n 2 edges. It acyclic and so must be a tree. 11

Cut edges cut edge e is a cut edge of G if ω(g e) > ω(g). Theorem 2 e = (u, v) is a cut edge iff e is not on any cycle of G. Proof ω increases iff there exist x y V such that all walks from x to y use e. Suppose there is a cycle (u, P, v, u) containing e. Then if W = x, W 1, u, v, W 2, y is a walk from x to y using e, x, W 1, P, W 2, y is a walk from x to y that doesn t use e. Thus e is not a cut edge. 12

P u v If e is not a cut edge then G e contains a path P from u to v (u v in G and relations are maintained after deletion of e). So (v, u, P, v) is a cycle containing e. Corollary 3 A connected graph is a tree iff every edge is a cut edge. 13

Corollary 4 Every finite connected graph G contains a spanning tree. Proof G, Consider the following process: starting with 1. If there are no cycles stop. 2. If there is a cycle, delete an edge of a cycle. Observe that (i) the graph remains connected we delete edges of cycles. (ii) the process must terminate as the number of edges is assumed finite. On termination there are no cycles and so we have a connected acyclic spanning subgraph i.e. we have a spanning tree. 14

Alternative Construction Let E = {e 1, e 2,..., e m }. begin T := for i = 1, 2,..., m do begin if T + e i does not contain a cycle then T T + e i end Output T end 15

Lemma 3 If G is connected then (V, T ) is a spanning tree of G. Proof Clearly T is acyclic. Suppose it is not connected and has compponnents C 1, C 2,..., C k, k 2. Let D = C 2 C k. Then G has no edges joining C 1 and D contradiction. (The first C 1 : D edge found by the algorithm would have been added.) 16

Theorem 3 Let T be a spanning tree of G = (V, E), V = n. Suppose e = (u, v) E \ T. (a) T + e contains a unique cycle C(T, e). (b) f C(T, e) implies that T + e f is a spanning tree of G. u f v 17

Proof (a) Lemma 2(a) implies that T + e has a cycle C. Suppose that T + e contains another cycle C C. Let edge g C \ C. T = T + e g is connected, has n 1 edges. But T contains a cycle C, contradictng Theorem 1. (b) T + e f is connected and has n 1 edges. Therefore it is a tree. 18

Maximum weight trees G = (V, E) is a connected graph. w : E R. w(e) is the weight of edge e. For spanning tree T, w(t ) = e T w(e). Problem: find a spanning tree of maximum weight. -1 2 1-2 -2 0 3 2 1 3 4-1 2-1 -1 2 2 4 2 4 5 2 1 1 4 2 19

Greedy Algorithm Sort edges so that E = {e 1, e 2,..., e m } where w(e 1 ) w(e 2 ) w(e m ). begin T := for i = 1, 2,..., m do begin if T + e i does not contain a cycle then T T + e i end Output T end Greedy always adds the maximum weight edge which does not make a cycle with previously chosen edges. 20

Theorem 4 Let G be a connected weighted graph. The tree constructed by GREEDY is a maximum weight spanning tree. Proof of G. Lemma 3 implies that T is a spanning tree Let the edges of the greedy tree be e 1, e 2,..., e n 1, in order of choice. Note that w(e i ) w(e i+1 ) since neither makes a cycle with e 1, e 2,..., e i 1. Let f 1, f 2,..., f n 1 be the edges of any other tree where w(f 1 ) w(f 2 ) w(f n 1 ). We show that w(e i ) w(f i) 1 i n 1. (1) 21

Suppose (1) is false. There exists k > 0 such that w(e i ) w(f i), 1 i < k and w(e k ) < w(f k). Each f i, 1 i k is either one of or makes a cycle with e 1, e 2,..., e k 1. Otherwise one of the f i would have been chosen in preference to e k. Let components of forest (V, {e 1, e 2,..., e k 1 }) be C 1, C 2,..., C n k+1. Each f i, 1 i k has both of its endpoints in the same component. PSfrag replacements C i f j 22

Let µ i be the number of f j which have both endpoints in C i and let ν i be the number of vertices of C i. Then µ 1 + µ 2 + µ n k+1 = k (2) ν 1 + ν 2 + ν n k+1 = n (3) It follows from (2) and (3) that there exists t such that [Otherwise n k+1 i=1 µ i = n k+1 i=1 n k+1 i=1 = k 1. µ t ν t. (4) (ν i 1) ν i (n k + 1) ] But (4) implies that the edges f j such that f j C t contain a cycle. 23

Cut Sets and Bonds If S V, S, V then the cut-set S : S = {e = vw E : v S, w S = V \ S} 2 d 4 a h 1 c e g 6 b 3 f 5 k S = {1, 2, 3} S : S = {d, e, f}. 24

Lemma 4 Let G be connected and X E. Then G[E \ X] is not connected iff X contains a cutset. Proof Only if G[E \ X] contains components C 1, C 2,..., C k, k 2 and so X C 1 : C 1 and C 1, V. If Suppose X = S : S and v S, w S. Then every walk from v to w in G contains an edge of X. acements v S S S S S w So G[E \ X] contains no walk from v to w. 25

A Bond B is a minimal cut-set. I.e. B = S : S and if T : T B then B = T : T. 2 d 4 a h 1 c e g 6 b 3 f 5 k S 1 = {1, 2, 3} S 2 = {2, 3, 4, 5} B 1 = S 1 : S 1 is a bond B 2 = S 2 : S 2 is not a bond since B 2 S 3 : S 3 and B 2 S 3 : S 3 where S 3 = {1}. 26

Theorem 5 G is connected and B is a a bond G \ B contains exactly 2 components. Proof : G\B contains components C 1, C 2,..., C k. Assume w.l.o.g. that there is at least one edge e in G joining C 1 and C 2. If k 3 then B C 3 : C 3 and B C 3 : C 3 since B contains e. : Assume that G \ B contains exactly two components C 1 = G[S], C 2 = G[ S]. Let e B. Adding e to the graph C 1 C 2 clearly produces a connected graph and so B \ e is not a cutset. 27

A co-tree T of a connected graph G is the edge complement of a spanning tree of G i.e. T = E \ T for some spanning tree T. Theorem 6 Let T be a spanning tree of G and e T. Then (a) T contains no bond of G. (b) T + e contains a unique bond B( T, e) of G. (c) f B( T, e) implies that T + e f is a co-tree of G. [Compare with Tree + edge cycle.] 28

Proof (a) X T G \ X T which implies that G \ X is connected. So X is not a bond. (b)&(c) G \ ( T + e) = T \ e contains exactly two components and so by Theorem 5 T + e contains a bond B = S : S where S, S are the 2 components of T \ e. f B e C(T, f) T + f e is a tree T + e f is a co-tree proving (c) Hence every bond of T + e contains f otherwise T + e f contains a bond, contradicting (a) and proving (b). 29

e f frag replacements S B = (S : S) S 30

How many trees? Cayley s Formula n=4 4 12 n=5 5 60 60 n=6 6 120 360 90 360 360 31

Contracting edges If e = vw E, v w then we can contract e to get G e by (i) deleting e, (ii) identifying v, w i.e. make them into a single new vertex. 1 a b 4 e g f 5 1 a b c 6 g f 5 2 c 3 2 G e is obtained by deleting e. τ(g) is the number of spanning trees of G. 32

Theorem 7 If e E is not a loop then τ(g) = τ(g e) + τ(g e). Proof τ(g e) = the number of spanning trees of G which do not contain e. τ(g e) = the number of spanning trees of G which contain e. [Bijection T T e maps spanning trees of G which contain e to spanning trees of G e.] 33

Matrix Tree Theorem Define the V V matrix L = D A where A is the adjacency matrix of G and D is the diagonal matrix with D(v, v) = degree of v. 2 3-1 -1-1 3 1 4 L = -1 3-1 -1-1 -1 3-1 -1-1 -1 3 acements 3-1 -1 L 1 = -1 3-1 Determinant L 1 = 16-1 -1 3 Let L 1 be obtained by deleting the first row and column of L. Theorem 8 τ(g) = determinant L 1. 34

Pfuffer s Correspondence There is a 1-1 correspondence φ V between spanning trees of K V (the complete graph with vertex set V ) and sequences V n 2. Thus for n 2 τ(k n ) = n n 2 Cayley s Formula. Assume some arbitrary ordering V = {v 1 < v 2 < < v n }. φ V (T ): begin T 1 := T ; for i = 1 to n 2 do begin s i := neighbour of least leaf l i of T i. T i+1 = T i l i. end φ V (T ) = s 1 s 2... s n 2 end 35

5 3 8 14 7 6 11 4 2 9 13 1 12 15 10 6,4,5,14,2,6,11,14,8,5,11,4,2 36

Lemma 5 v V (T ) appears exactly d T (v) 1 times in φ V (T ). Proof Assume n = V (T ) 2. By induction on n. n = 2: φ V (T ) = Λ = empty string. Assume n 3: PSfrag replacements T 1 s 1 l 1 φ V (T ) = s 1 φ V1 (T 1 ) where V 1 = V {l 1 }. s 1 appears d T1 (s 1 ) 1 + 1 = d T (s 1 ) 1 times induction. v s 1 appears d T1 (v) 1 = d T (v) 1 times induction. 37

Construction of φ 1 V Inductively assume that for all X < n there is an inverse function φ 1 X. (True for n = 2). Now define φ 1 V by φ 1 V (s 1s 2... s n 2 ) = φ 1 V (s 1 2... s n 2 ) plus edge s 1 l 1, where l 1 = min{s : s / s 1, s 2,... s n 2 } and V 1 = V {l 1 }. Then φ V (φ 1 V (s 1s 2... s n 2 )) = = φ V (φ 1 V 1 (s 2... s n 2 ) plus edge s 1 l 1 ) = s 1 φ V1 (φ 1 V 1 (s 2... s n 2 )) = s 1 s 2... s n 2. Thus φ V has an inverse and the correspondence is established. 38

Number of trees with a given degree sequence Corollary 5 If d 1 + d 2 + + d n = 2n 2 then he number of spanning trees of K n with degree sequence d 1, d 2,..., d n is ( n 2 d 1 1,d 2 1,...,d n 1 ) = (n 2)! (d 1 1)!(d 2 1)! (d n 1)!. Proof From Pfuffer s correspondence and Lemma 5 this is the number of sequences of length n 2 in which 1 appears d 1 1 times, 2 appears d 2 1 times and so on. 39