Trees and Distance. 2.1 Basic properties Acyclic : a graph with no cycle Forest : acyclic graph Tree : connected acyclic graph Leaf : a vertex of degree

• View
219

0

Embed Size (px)

Text of Trees and Distance. 2.1 Basic properties Acyclic : a graph with no cycle Forest : acyclic graph Tree...

• Trees and Distance

• 2.1 Basic propertiesAcyclic : a graph with no cycleForest : acyclic graphTree : connected acyclic graph Leaf : a vertex of degree 1Spanning subgraph of G : a subgraph with vertex set V(G)Spanning tree : a spanning subgraph that is a treeStar : a tree consisting of one vertex adjacent to all the others.

• Properties of treesLemma : every tree with at least two vertices has at least two leaves. Deleting a leaf from an n-vertex tree produces a tree with n-1 vertices.Theorem : (A) G is connected and has no cycles(B) G is connected and has n-1 edges(C) G has n-1 edges and no cycles(D) For u,v V(G), G has exactly one u,v-path

• Proof theoremA -> B,C : by induction on n.B-> A,C : delete edges from cycles of G one by one.C -> A,B : let G has k components. e(Gi) = n(Gi)-1 . e(G)=i[n(Gi)-1]=n-k.A->D : if some pair of vertices is connected by more than one path, it will form a cycle.D->A : if G has a cycle, then G has more than one u,v path .

• Properties of treesCorollary : (a) every edge of a tree is a cut edge. (b) adding one edge to a tree forms exactly one cycle. (c) every connected graph contains a spanning tree.Proposition : if T,T are spanning trees of G and e E(T)-E(T), then there is an edge e E(T)-E(T) such that T-e+e is a spanning tree of G.

• Properties of treesProposition : if T is a tree with k edges and G is a simple graph with (G)k, then T is a subgraph of G.

• Distance in trees and graphsd(u,v) : is the least length of a u,v-pathDiameter : max u,vV(G) d(u,v)Eccentricity of a vertex u, (u) : max u,vV(G) d(u,v)Radius of G : is min uV(G) (u)

• Distance in trees and graphsTheorem : if G is a simple graph, then diamG3 -> diam3Proof : u,v have no common neighbor. xV(G)-{u,v} has at least one of {u,v} as a nonneighbor. This makes x adjacent in to at least one of {u,v}. uvE().

• Distance in trees and graphsCenter of G : the subgraph induced by the vertices of minimum eccentricity.Theorem : the center of a tree is a vertex or an edge.

• Wiener indexWiener index of G : D(G) = u,vV(G)dG(u,v)Theorem : among trees with n vertices, the Wiener index D(T) is minimized by stars and maximized by paths ,both uniquely.

• 2.2 spanning trees and enumerationPrfer code : 12345678{7}{7,4}{7,4,4}{7,4,4,1}{7,4,4,1,7}{7,4,4,1,7,1}

• Prfer code12345678{7,4,4,1,7,1}{4,4,1,7,1}{4,1,7,1}{1,7,1}{7,1}{1}

• enumerationCorollary : given positive integers d1,, dn summing to 2n-2, there are exactly (n-2)!/(di-1)! Trees with vertex set [n] such that vertex i has degree di, for each i.

• Spanning trees in graphsProposition : Let (G) denote the number of spanning trees of a graph G. If eE(G) is not a loop, then (G)=(G-e)+(Ge)

• Matrix tree theorem

• Decomposition and graceful labelingsA graceful labeling of a graph G with m edges is a function f:V(G)->{0,,m} such that distinct vertices receive distinct numbers and {|f(u)-f(v)|:uvE(G} ={1,,m}.Conjecture : every tree has a graceful labeling.Theorem : if a tree T with m edges has a graceful labeling, then K2m+1 has a decomposition into 2m+1 copies of T.

• caterpillarCaterpillar : a tree in which a single path is incident to (or contains) every edge.Theorem : A tree is a caterpillar iff it does not contain the tree Y above.Y

• Branchings and eulerian digraphsBranching(out-tree) : an orientation of a tree having a root of indegree 0 and all other vertices of indegree 1.Theorem : directed matrix tree theorem : the number of spanning out-trees of G rooted at vi is the value of each cofactor in the ith row of Q- (Q- =D--A). 0 0 0Q- = -1 1 0 -1 -1 2 0 0 0A = 1 0 0 1 1 0 0 0 0D- = 0 1 0 0 0 2

• Eulerian circuit in directed graphLemma : in a strong digraph, every vertex is the root of an out-tree.Eulerian circuit in directed graph algorithm :

• 2.3 Optimization and TreesTheorem : in a Eulerian digraph with di=d+(vi)=d-(vi) the number of Eulerian circuits is ci(di-1)!, where c counts the in-trees to or out-trees from any vertex.Weighted graph : a graph with numerical labels on the edges

• Minimum spanning treeKruskals Algorithm :

187111012536924

• Shortest pathsDistance d(u,z) in a weighted graph is the minimum sum of the weights on the edges in a u,z-path.Dijkstras algorithm : 14345e65d2uacb{u,a}{u,a,b,c,d}{u,a,b}{u,a,b,c}{u,a,b,c,d,e}

13568

abcdes

13

1356

1356

13568

• Chinese Postman ProblemBFS algorithmChinese Postman Problem11111122223333444477

• Trees in computer scienceBinary tree : a rooted tree where each vertex has at most two children.K-ary tree allows each vertex up to k children.Prefix-codeHuffmans algorithm Documents COMBINATORIAL REDUCTIONS BETWEEN GRAPH ... COMBINATORIAL REDUCTIONS BETWEEN GRAPH PARTITIONING BY VERTEX
Documents 1 Directed Acyclic Graph DAG â€“ directed graph with no directed cycles
Documents IMPLEMENTATION OF DIRECTED ACYCLIC WORD .IMPLEMENTATION OF DIRECTED ACYCLIC WORD GRAPH MIROSLAV BALK
Documents Direct Acyclic Graph-based Ledger for Internet of Things ... Direct Acyclic Graph-based Ledger for Internet
Documents Algorithms for graph visualization - Startseite Every n-vertex planar graph has a planar straight-line
Documents Sequence Local Alignment using Directed Acyclic Word Graph Do Huy Hoang
Documents Documents