离散数学15.ppt

Download Report

Transcript 离散数学15.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
each vertex exactly once except for the
first vertex, which is also the last.

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 (GS)≤|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|.
 Omit
{b,h,i} from V,
 (G-S)=4>3=|S|,The graph has not
any Hamilton circuit
(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
 If
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|


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 :v1,v2,v3,…vn,v1
Hamilton path:v1,v2,v3,…vn,
2)If G has a Hamilton path, then G
has a Hamilton circuit or has not
any Hamilton circuit
 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
v1,v2,v3,…vn,v1。
 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.
 Kn 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≥(n23n+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
v1,v2,v3,…vn,v1.
 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.
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).

uv
0
d (u, v)  
{w( p) | p is a path between u and v} there is a path between u and v
min
p
 Dijkstra’s
 In
1959
algorithm (E.W.Dijkstra)
 Let
G=(V,E,w) and |V|=n where w>0.
Suppose that S is a nonempty subset
of V and v1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'''.
Exercise
 Next:
P306 3,4,5,6,18
Shortest-path problem
 Trees and their properties 7.4 P273