Presentation is loading. Please wait. #  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,

## Presentation on theme: " 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,"— Presentation transcript:

 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, d(u)+d(v)≥n.  Corollary 1: Let G be a simple graph with n vertices, n>2. G has a Hamilton circuit if each vertex has degree greater than or equal to n/2.  Proof: If any two vertices of G are adjacent,then G has a Hamilton circuit v 1,v 2,v 3,…v n,v 1 。  If G has two vertices u and v that are not adjacent, then d(u)+d(v)≥n.  By the theorem 5.9, G has a Hamilton circuit.  K n has a Hamilton circuit where n≥3

 Theorem 5.10: Let the number of edges of G be m. Then G has a Hamilton circuit if m≥(n 2 - 3n+6)/2,where n is the number of vertices of G.  Proof: If any two vertices of G are adjacent,then G has a Hamilton circuit v 1,v 2,v 3,…v n,v 1.  Suppose that u and v are any two vertices of G that are not adjacent.  Let H be the graph produced by eliminating u and v from G.  Thus H has n-2 vertices and m-d(u)-d(v) edges.

 Theorem 5. 11 ： Let G be a simple graph with n vertices, n>2. G has a Hamilton path if for any two vertices u and v of G that are not adjacent, d(u)+d(v)  n-1.  G has a Hamilton path If G has a Hamilton circuit  If G has a Hamilton path, then G has a Hamilton circuit or has not a Hamilton circuit

5.4 Shortest-path problem  Let G=(V,E,w) be a weighted connected simple graph, w is a function from edges set E to position real numbers set. We denoted the weighted of edge {i,j} by w(i,j), and w(i,j)=+  when {i,j}  E  Definition 21: Let the length of a path p in a weighted graph G =(V,E,w) be the sum of the weights of the edges of this path. We denoted by w(p). The distance between two vertices u and v is the length of a shortest path between u and v, we denoted by d(u,v).

 Dijkstra’s algorithm (E.W.Dijkstra)  In 1959

 Let G=(V,E,w) and |V|=n where w>0. Suppose that S is a nonempty subset of V and v 1  S. Let T=V-S. Example: Suppose that (u,v',v'',v''',  v) is a shortest path between u and v. Then (u,v',v'',v''') is a shortest path between u and v'''.

 Let v  T. l(v) be the length of a shortest path from v1 to v containing only vertices in S.

 l(e)=?  a,b,e 6;  a,b,c,e 4, l(e)=4?  。  Note:l(v) is the length of a shortest path from v1 to v containing only vertices in S.  l(e)=6.  l(z)=  。 Example ： S={a,b}, T={c,d,e,z} l(c) ： a  c ： a,c 4 a,b,c 3, l(c)=3 。

 l(c)=3 ， l(e)=6, l(d)=8, l(z)=  。  min v  T {l(v)}=l(c)=3 is the length of a shortest path from a to c.  Theorem 5.12 ： Suppose that min v  T {l(v)}= l(v'). Then the length of the shortest path from v 1 to v' is l (v').

 Proof: Suppose that there is a path p from v 1 to v', and the length of this path less than l(v').  Then the path p must conclude some vertices of T-{v'}.

 l(v)?  (1) S={v 1 },T=V-{v 1 },for v  T (2)For S  V, T=V-S, suppose that these vertices of the shortest paths from v 1 to any vertices of S are in S. By Theorem 5.12(min v  T {l(v)}=l(v k ), v k  T), we gained the result which l(v k ) is the length of the shortest path from v 1 to v k (distance) 。 The vertex v k is added to S. (3)Let S'=S ∪ {v k }, T'=T-{v k }, v  T'. Suppose that l'(v) is the length of a shortest path from v 1 to v containing only vertices in S'. Then l'(v)=min{l(v),l(v k )+w(v k,v))} (4)Let S=S',T=T', l(v)=l'(v), goto (2)

 S={a,b},T={c,d,e,z}  l(c)=3 ， l(e)=6, l(d)=8, l(z)=+  。  min v  T {l(v)}=l(c)=3  S’={a,b,c}, T’={d,e,z}  l'(e)=min{ l(e), l(c)+w(c,e)}=4,  l'(d)=min{l(d), l(c)+w(c,d)}=8,  w(c,d)= +   l'(z)=min{l(z), l(c)+w(c,z)}= + 

 Theorem 5.13: For v  T‘, l’(v)= min{l(v), l(v k )+w(v k, v)}  Proof: Let S'=S ∪ { v k }.  Suppose that l‘(v) is the length of a shortest path from v1 to v containing only vertices in S’.  (1)There are some paths from v 1 to v, but these paths don’t contain the vertex v k and other vertices of T'. Then l(v) is the length of the shortest path of these paths, i.e. l'(v)=l(v) 。  (2)There are some paths from v 1 to v, these paths from v 1 to v k don’t contain other vertices of T', and the vertex v k adjacent edge {v k,v}. Then l(v k )+w(v k,v) is the length of the shortest path of these paths, viz l'(v)= l(v k )+w(v k,v).

 (1)Let S= ,T=V,l(v 1 )=0,for v  v 1 and l(v)=+   Let k=1  (2)S'=S ∪ {v k },T'=T-{v k } ，  For each vertex v of T',  l'(v)=min{l(v),l(v k )+w(v k,v)};  l'(v)  l(v),S'  S,T'  T 。  (3)min v  T {l(v)}=l(v k+1 ) 。  (4)if k=n-1,then stop  if k<n-1,then k+1  k goto (2) 。

 Example:Find the length of a shortest path between a and z in the given weighted graph

 The length of a shortest path between a and z is 13 and the path is (a,c,g,e,f,z)

5.5 Trees  5.5.1 Trees and their properties  Definition 22: A tree is a connected undirected graph with no simple circuit, and is denoted by T. A vertex of T is a leaf if only if it has degree one. Vertices are called internal vertices if the degrees of the vertices are more than 1. A graph is called a forest if the graph is not connected and each of the graph’s connected components is a tree.

 Theorem 5.14: Let T be a graph with n vertices. The following assertions are equivalent.  (1)T is a connected graph with no simple circuit.  (2)T is a graph with no simple circuit and e=n-1 where e is number of edges of T.  (3)T is a connected graph with e=n-1 where e is number of edges of T.  (4)T is a graph with no simple circuit, and if x and y are nonadjacent vertices of T then T+{x,y} contains exactly a simple circuit. T+{x,y} is a new graph which is obtained from T by joining x to y.  (5)T is connected and if {x,y}  E(T) then T-{x,y} is disconnected. Where T-{x,y} is a new graph which is obtained from T by removing edge {x,y}.  (6)There is a unique simple path between any two of vertices of T.

 Proof ： (1)→(2): If T is a connected graph with no simple circuit, then T is a graph with no simple circuit and e=n-1. i.e prove e=n-1  Let us apply induction on the number of vertices of T.  When n=2, T is a connected graph with no simple circuit, the result holds

 Suppose that result holds for n=k  n=k+1?  (Theorem 5.4:Let  (G)≥2, then there is a simple circuit in the graph G.)  By the theorem 5.4, and T is connected and no simple circuit.  There is a vertex that has degree one. Let the vertex be u, and suppose that u is incident with edge {u,v}.  We remove the vertex u and edge {u,v} from T, and get a connected graph T’ with no simple circuit, and T’ has k vertices.  By the inductive hypothesis, T’ has k-1 edges.  e(T)=e(T’)+1=k

 (2)→(3): T is an acyclic graph with e=n- 1.Now we prove T is connected and e=n-1. i.e. prove T is connected  Suppose T is disconnected. Then T have  (  >1) connected components T 1,T 2,…,T . The number of vertices of T i is n i for i=1,2,… , and n 1 +n 2 +…+n  =n.

 (3)→(4): T is a connected graph with e=n-1, we prove “T is a graph with no simple circuit, and if x and y are nonadjacent vertices of T then T+{x,y} contains exactly a simple circuit”.  1)We first prove that T doesn't contain simple circuit.  Let us apply induction on the number of vertices of T.  T is connected with n=2 and e=1, Thus T doesn't contain any simple circuit. The result holds when n=2 and e=1

 Suppose that result holds for n=k-1  For n=k,  (T)  1  There is a vertex that has degree one. The vertex is denoted by u. i.e d(u)=1.  Why?  2e  2k, i.e. e  k( e=n-1=k-1), contradiction  We has a new graph T’ which is obtained from T by removing the vertex u and incident with edge {u,v}  By the inductive hypothesis, T' doesn't contain any simple circuit. Thus T doesn't contain any simple circuit

 2) If x and y are nonadjacent vertices of T, then T+{x,y} contains a simple circuit  There is a simple path from x to y in T.  (x=v i,v i1,…, v is,v j =y) 。  (x=v i,v i1,…, v is,v j =y,v i =x) 。  3)Next, we prove T+{x,y} contains exactly a simple circuit.  Suppose that there are two (or more than) simple circuit in T+{x,y}.

 Exercise  1.Find the length of a shortest path between a and z in the given weighted graph.

Download ppt " 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,"

Similar presentations

Ads by Google