R. Bar-Yehuda © www.cs.technion.ac.il/~cs234141 1 קומבינטוריקה למדעי - המחשב – הרצאה #17 Chapter 2: TREES מבוסס על הספר : S. Even, "Graph Algorithms",

Slides:



Advertisements
Similar presentations
Chapter 11 Trees Graphs III (Trees, MSTs) Reading: Epp Chp 11.5, 11.6.
Advertisements

CS 336 March 19, 2012 Tandy Warnow.
Great Theoretical Ideas in Computer Science for Some.
Trees Chapter 11.
 Theorem 5.9: Let G be a simple graph with n vertices, where n>2. G has a Hamilton circuit if for any two vertices u and v of G that are not adjacent,
Chapter 8 Topics in Graph Theory
Walks, Paths and Circuits Walks, Paths and Circuits Sanjay Jain, Lecturer, School of Computing.
De Bruijn sequences Rotating drum problem:
 期中测验时间:本周五上午 9 : 40  教师 TA 答疑时间 : 周三晚上 6 : 00—8 : 30  地点:软件楼 315 房间,  教师 TA :李弋老师  开卷考试.
CompSci 102 Discrete Math for Computer Science April 19, 2012 Prof. Rodger Lecture adapted from Bruce Maggs/Lecture developed at Carnegie Mellon, primarily.
Graphs III (Trees, MSTs) (Chp 11.5, 11.6)
Representing Relations Using Matrices
Tirgul 8 Graph algorithms: Strongly connected components.
Data Structures, Spring 2004 © L. Joskowicz 1 Data Structures – LECTURE 14 Strongly connected components Definition and motivation Algorithm Chapter 22.5.
Graph. Undirected Graph Directed Graph Simple Graph.
R. Bar-Yehuda © 1 Graph theory – תורת הגרפים 4.4 CATALAN NUMBERS מבוסס על הספר : S. Even, "Graph Algorithms", Computer.
R. Bar-Yehuda © 1 קומבינטוריקה למדעי - המחשב – הרצאה # DE BRUIJN SEQUENCES מבוסס על הספר : S. Even, "Graph Algorithms",
R. Bar-Yehuda © 1 Graph theory – תורת הגרפים 2.4 Directed Trees – עצים מכוונים מבוסס על הספר : S. Even, "Graph Algorithms",
R. Bar-Yehuda © 1 Graph theory – תורת הגרפים 2.6 THE NUMBER OF SPANNING TREE מבוסס על הספר : S. Even, "Graph Algorithms",
Applied Combinatorics, 4th Ed. Alan Tucker
What is the next line of the proof? a). Let G be a graph with k vertices. b). Assume the theorem holds for all graphs with k+1 vertices. c). Let G be a.
Definition Hamiltonian graph: A graph with a spanning cycle (also called a Hamiltonian cycle). Hamiltonian graph Hamiltonian cycle.
R. Bar-Yehuda © 1 Graph theory – תורת הגרפים 2.3 CAYLEY’S THEOREM – משפט קיילי מבוסס על הספר : S. Even, "Graph Algorithms",
Vertex Cut Vertex Cut: A separating set or vertex cut of a graph G is a set SV(G) such that S has more than one component. Connectivity of G ((G)): The.
Is the following graph Hamiltonian- connected from vertex v? a). Yes b). No c). I have absolutely no idea v.
R. Bar-Yehuda © 1 קומבינטוריקה למדעי - המחשב – הרצאה #16 EULER GRAPHS גרפים אויילרים מבוסס על הספר : S. Even, "Graph Algorithms",
Data Structures, Spring 2006 © L. Joskowicz 1 Data Structures – LECTURE 14 Strongly connected components Definition and motivation Algorithm Chapter 22.5.
Introduction to Graph Theory
GRAPH Learning Outcomes Students should be able to:
Subdivision of Edge In a graph G, subdivision of an edge uv is the operation of replacing uv with a path u,w,v through a new vertex w.
Turan’s theorem and extremal graphs Question: How many edges a simple graph must have to guarantee that the graph contains a triangle? Since K m,m and.
UNC Chapel Hill Lin/Foskey/Manocha Minimum Spanning Trees Problem: Connect a set of nodes by a network of minimal total length Some applications: –Communication.
Discrete Structures Lecture 12: Trees Ji Yanyan United International College Thanks to Professor Michael Hvidsten.
5.2 Trees  A tree is a connected graph without any cycles.
Induction Proof. Well-ordering A set S is well ordered if every subset has a least element. [0, 1] is not well ordered since (0,1] has no least element.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Connectivity and Paths 報告人:林清池. Connectivity A separating set of a graph G is a set such that G-S has more than one component. The connectivity of G,
Chap. 11 Graph Theory and Applications 1. Directed Graph 2.
Network Flows. Menger ’ s Theorem Theorem 7.1. (Menger [1927] ) Let G be a graph (directed or undirected), let s and t be two vertices, and k  N. Then.
 Quotient graph  Definition 13: Suppose G(V,E) is a graph and R is a equivalence relation on the set V. We construct the quotient graph G R in the follow.
Graphs Lecture 2. Graphs (1) An undirected graph is a triple (V, E, Y), where V and E are finite sets and Y:E g{X V :| X |=2}. A directed graph or digraph.
Chapter 9.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 6th ed., by Kenneth H.
8.4 Closures of Relations Definition: The closure of a relation R with respect to property P is the relation obtained by adding the minimum number of.
CompSci 102 Discrete Math for Computer Science March 13, 2012 Prof. Rodger Slides modified from Rosen.
Great Theoretical Ideas in Computer Science for Some.
 2004 SDU 1 Lecture5-Strongly Connected Components.
COMPSCI 102 Introduction to Discrete Mathematics.
12. Lecture WS 2012/13Bioinformatics III1 V12 Menger’s theorem Borrowing terminology from operations research consider certain primal-dual pairs of optimization.
1. 期中测验时间和地点: 11 月 4 日, 上午 9:40—11 : 40 地点: 教室 2. 答疑时间和地点: 1)11 月 1 日 ( 周五 )13:00—15:00 软件楼 319 2)11 月 2 日和 3 日, 14:00—17:00 软件楼 3 楼 机房讨论室.
Lecture 12 Algorithm Analysis Arne Kutzner Hanyang University / Seoul Korea.
Trees.
Theory of Computational Complexity Probability and Computing Chapter Hikaru Inada Iwama and Ito lab M1.
Lecture 12 Algorithm Analysis
Planarity Testing.
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
CS 583 Analysis of Algorithms
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Lecture 12 Algorithm Analysis
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Theorem 5.13: For vT‘, l’(v)= min{l(v), l(vk)+w(vk, v)}
V12 Menger’s theorem Borrowing terminology from operations research
Discrete Mathematics for Computer Science
Lecture 12 Algorithm Analysis
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Minimum Spanning Trees
Presentation transcript:

R. Bar-Yehuda © 1 קומבינטוריקה למדעי - המחשב – הרצאה #17 Chapter 2: TREES מבוסס על הספר : S. Even, "Graph Algorithms", Computer Science Press, 1979 שקפים, ספר וחומר רלוונטי נוסף באתר הקורס : Slides, book and other related material at:

R. Bar-Yehuda © TREE DEFINITIONS Let G(V, E) be an (undirected), finite or infinite graph. We say that G is circuit-free if there are no simple circuits in G. G is called a tree if it is connected and circuit-free.

R. Bar-Yehuda © 3 Theorem 2.1: The following four conditions are equivalent: (a) G is a tree. (b) G is circuit-free, but if any new edge is added to G, a circuit is formed. (c) G contains no self-loops and for every two vertices there is a unique simple path connecting them. (d) G is connected, but if any edge is deleted from G, the connectivity of G is interrupted.

R. Bar-Yehuda © 4 Proof: We shall prove that conditions (a)  (b)  (c)  (d)  (a).

R. Bar-Yehuda © 5 (a)  (b): We assume that G is connected and circuit-free Let e be a new edge, that is e  E; the two endpoints of e, a and b, are elements of V. If a = b, then e forms a self-loop and therefore a circuit exists. If a  b, there is a path in G (without e) between a and b; if we add e, this path with e forms a circuit.

R. Bar-Yehuda © 6 (b)  (c): We assume that G is circuit- free and that no edge can be added to G without creating a circuit. Let a and b be any two vertices of G. If there is no path between them, then we can add an edge between a and b without creating a circuit. Thus, G must be connected. Moreover, if there are two simple paths, P and P’, between a and b, then there is a circuit in G. To see this, assume that P = e 1, e 2,..., e l and P' = e 1 ', e 2 ',..., e m '. Since both paths are simple, one cannot be the beginning of the other. Let i be the first index for which e i  e i ', and let v be the first vertex on e i, e i+1,..., e l which is also on e i ', e i+1 ',..., e m '. The two disjoint subpaths between the branching off vertex and v form a simple circuit in G.

R. Bar-Yehuda © 7 (c)  (d): We assume the existence of a unique simple path between every pair of vertices of G. This implies that G is connected. Assume now that we delete an edge e from G. Since G has no self-loops, e is not a self-loop. Let a and b be e’s endpoints. If there is now (after the deletion of e) a path between a and b, then G has more than one simple path between a and b.

R. Bar-Yehuda © 8 (d)  (a): We assume that G is connected and that no edge can be deleted without interrupting the connectivity If G contains a simple circuit, any edge on this circuit can be deleted without interrupting the connectivity. Thus, G is circuit-free.

R. Bar-Yehuda © 9 Theorem 2.2: Let G(V, E) be a finite graph and n = |V|. The following three conditions are equivalent: ( a) G is a tree. (b) G is circuit-free and has n – 1 edges. (c) G is connected and has n – 1 edges. Proof: For n = 1 the theorem is trivial. Assume n  2. We shall prove that conditions (a)  (b)  (c)  (a)..

R. Bar-Yehuda © 10 (a)  (b): Let us prove, by induction on n, that if G is a tree, then its number of edges is n – 1. This statement is clearly true for n = 1. Assume that it is true for all n < m, and let G be a tree with m vertices. Let us delete from G any edge e. By condition (d) of Theorem 2.1, G is not connected any more, and clearly is broken into two connected components each of which is circuit-free and therefore is a tree. By the inductive hypothesis, each component has one edge less than the number of vertices. Thus, both have m – 2 edges. Add back e, and the number of edges is m – 1.

R. Bar-Yehuda © 11 (b)  (c): We assume that G is circuit-free and has n – 1 edges. Let us first show that G has at least two vertices of degree 1. Choose any edge e. An edge must exist since the number of edges is n – 1 and n  2. Extend the edge into a path by adding new edges to its ends if such exist. A new edge attached at the path’s end introduces a new vertex to the path or a circuit is closed. Thus, our path remains simple. Since the graph is finite, this extension must terminate on both sides of e, yielding two vertices of degree 1.

R. Bar-Yehuda © 12 (b)  (c): We assume that G is circuit-free and has n – 1 edges…. cont Now, the proof that G is connected proceeds by induction on the number of vertices, n. The statement is obviously true for n = 2. Assume that it is true for n = m – 1, and let G be a circuit-free graph with m vertices and m – 1 edges. Eliminate from G a vertex v, of degree 1, and its incident edge. The resulting graph is still circuit-free and has m – 1 vertices and m – 2 edges; thus, by the inductive hypothesis it is connected. Therefore, G is connected too.

R. Bar-Yehuda © 13 (c)  (a): Assume that G is connected and has n – 1 edges. If G contains circuits, we can eliminate edges (without eliminating vertices) and maintain the connectivity. When this process terminates, the resulting graph is a tree, and, by (a)  (b), has n – 1 edges. Thus, no edge can be eliminated and G is circuit-free.

R. Bar-Yehuda © 14 Corollary 2.1: A finite tree, with more than one vertex, has at least two leaves.