Presentation is loading. Please wait.

Presentation is loading. Please wait.

 5.3.2 Hamilton paths.  Definition 20: A Hamilton paths is a path that contains each vertex exactly once. A Hamilton circuit is a circuit that contains.

Similar presentations


Presentation on theme: " 5.3.2 Hamilton paths.  Definition 20: A Hamilton paths is a path that contains each vertex exactly once. A Hamilton circuit is a circuit that contains."— Presentation transcript:

1  5.3.2 Hamilton paths

2  Definition 20: A Hamilton paths is a path that contains each vertex exactly once. A Hamilton circuit is a circuit that contains each vertex exactly once except for the first vertex, which is also the last.

3  Theorem 5.8: Suppose G(V,E) that has a Hamilton circuit, then for each nonempty proper subset S of V(G), the result which  (G- S)≤|S| holds, where G-S is the subgraph of G by omitting all vertices of S from V(G).  (G-S)=1 , |S|=2 The graph G has not any Hamilton circuit, if there is a nonempty purely subgraph S of G so that  (G-S)>|S|.

4  Omit {b,h,i} from V,   (G-S)=4>3=|S| , The graph has not any Hamilton circuit

5  If  (G-S)≤|S| for each nonempty proper subset S of G, then G has a Hamilton circuit or has not any Hamilton circuit.  For example: Petersen graph

6  Proof: Let C be a Hamilton circuit of G(V,E). Then  (C-S)≤|S| for each nonempty proper subset S of V  Why?  Let us apply induction on the number of elements of S.  |S|=1,  The result holds  Suppose that result holds for |S|=k.  Let |S|=k+1  Let S=S' ∪ {v} , then |S'|=k  By the inductive hypothesis,  (C-S')≤|S'|  V(C-S)=V(G-S)  Thus C-S is a spanning subgraph of G-S  Therefore  (G-S)≤  (C-S)≤|S|

7  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. n=8,d(u)=d(v)=3, u and v are not adjacent, d(u)+d(v)=6<8, But there is a Hamilton circuit in the graph. Note:1)if G has a Hamilton circuit, then G has a Hamilton path Hamilton circuit :v 1,v 2,v 3,…v n,v 1 Hamilton path:v 1,v 2,v 3,…v n, 2)If G has a Hamilton path, then G has a Hamilton circuit or has not any Hamilton circuit

8  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

9  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.

10  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.

11 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).

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

13  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'''.

14  Exercise P306 3,4,5,6,18  Next: Shortest-path problem  Trees and their properties 7.4 P273


Download ppt " 5.3.2 Hamilton paths.  Definition 20: A Hamilton paths is a path that contains each vertex exactly once. A Hamilton circuit is a circuit that contains."

Similar presentations


Ads by Google