Presentation is loading. Please wait.

Presentation is loading. Please wait.

Graph Theory Hamiltonian Graphs

Similar presentations


Presentation on theme: "Graph Theory Hamiltonian Graphs"— Presentation transcript:

1 Graph Theory Hamiltonian Graphs

2 An Introduction to Hamiltonian Graphs
Definition: A graph of G is called Hamiltonian if G has a spanning cycle. A dodecahedron A hamiltonian cycle

3 Inductive: Assume the (n-1)-cube is hamiltonian. Consider the n-cube:
Ex1: Show that the graph of the n-cube is hamiltonian. pf: (By induction on n) Base: (n=3) OK Inductive: Assume the (n-1)-cube is hamiltonian. Consider the n-cube: 3 - cube (n -1)-cube x y y’ x’

4 Ex: Show that the graph G below is not hamiltonian.
روش اول : یالهای نارنجی رنگ در هر دور هامیلتونی باید حاضر باشند ، این یالهای یک دور تشکیل می دهند که از بقیه راس ها عبور نخواهد کرد

5 Observe: 1. Cn (n3) is hamiltonian. 2. Kn (n3) is hamiltonian.
3. A connected graph with cut-vertices is not hamiltonian.

6 Thm 1:بدون اثبات) If G is hamiltonian, than k(G - S)  |S| for every S  V(G), S  . این قضیه یک شرط لازم برای هامیلتونی بودن گرافها بدست میدهد بنابر این از آن برای رد کردن هامیلتون بودن برخی گراف ها می توان استفاده کرد

7 Ex: Show that the graph G below is not hamiltonian.
روش دوم : با استفاده از قضیه قبل ،چنانچه سه راس آبی رنگ را حذف کنیم، تعداد مولفه های باقی مانده 4 عدد خواهد شد. بنابراین هامیلتونی نمی تواند باشد .

8 چرا این گرافها هامیلتونی نیستند
7component 5component

9 4component اما در گرافهای هامیلتونی همواره این شرط برقرار است :
تعداد مولفه ها ی باقی مانده کوچکتر یا مساوی تعداد رووس حذف شده است. Example S={a, b, c, d, e, f, g} c a e d b g f 4component

10 Ex: Show that no bipartite graph of odd order is hamiltonian.

11 شرط های کافی برای هامیلتونی بودن
Thm 2 (Dirac’s Thm) بدون اثبات G: order p  3 If deg(v)  p/2 v V(G), then G is Hamiltonian.

12 (1) Cn (n  5): hamiltonian p  5, deg(vi) = 2< p/2  i (2(
این قضیه قادر به تشخیص بسیاری از گرافهای هامیلتونی نمی باشد (مثلا دو نمونه زیر) ، در قضیه آتی شرط کافی دیگری را بیان میکنیم که با استفاده از آن بسیاری از این گراف ها را می توان تشخیص داد (1) Cn (n  5): hamiltonian p  5, deg(vi) = 2< p/2  i (2(

13 Thm -3 .Ore theorem (بدون اثبات )
Let G be a graph of order p  3. Suppose u and v are nonadjacent vertices of G s.t. deg(u) + deg(v)  p. Then G is hamiltonian iff G+uv is hamiltonian.

14 Def: A closure c(G) of a graph G of order p is a graph obtained from G by recursively joining pairs of nonadjacent vertices whose degree sum is at least p until no such pairs remain. ※ c(G) is unique. خوش تعریف استc(G)

15 نتایجی که از قضیه قبل گرفته می شود
Thm4 G is hamiltonian  c(G) is hamiltonian. اثبات : نتیجه بدیهی از قضیه Ore

16 با ساختن بستار گراف زیر نشان دهید این گراف هامیلتونی نمی باشد
p=7 4+3  7 4+3  7 4+3  7 Not hamiltonian!

17 n=7 چون بستار گراف اولیه یک گراف کامل است. پس گراف اولیه هامیلتونی بوده

18 Cor1 |V(G)| = p  3. u,v  V(G). If deg(u) + deg(v)  p  u ~ v, then G is hamiltonian. Cor2 |V(G)| = p, |E(G)| = q. If q  , then G is hamiltonian.

19 Corolary3 Let G be a graph of order p3. If c(G)  Kp , then G is hamiltonian. G c(G)  K9  G is hamiltonian.

20 Ex. Show that if a graph of order at least 3 has an isolated vertex or an end-vertex, then its closure is not complete. pf: (1) If u is an isolated vertex of graph G, then deg(u) = 0, deg(v)  p-2 for every vertex v  u.  In c(G), u ~ v  u  v  c(G)  Kp (2) If u is an end-vertex then deg(u) = 1, deg(v)  p-2 if u ~ v

21 Graph Theory Matchings and Factorizations
تطابق ( جورسازی)

22 1 An Introduction to Matchings
Focus: Find 1-regular subgraphs of maximum size in a graph. Marriage Problem: Given a collection of men and women, where each woman knows some of the men, under what conditions can every woman marry a man she knows? A variation of this problem is to find the maximum number of woman, each of whom can marry a man she knows.

23 Model the problem: bipartite graph G = (S1S2, E), S1={men}, S2={women}, abE if a knows b. (1) Under what conditions does G have a 1-regular subgraph that contains all the vertices that represent the women? (2) What is the maximum size of a 1-regular subgraph of G?

24 Optimal Assignment Problem: Given several job openings and applicants for one or more of these positions. The hiring company wishes to receive the maximum possible benefit as a result of its hiring. For example, the experience of the applicants may be an important factor to consider during the hiring process. The company may benefit by employing fewer people with more experience than a larger number with less experience.

25 هدف : حداکثر کردن تعداد شاغلین
کاربردهای مبحث تطابق در گرافها Example 1 (Job Assignment Problem) Job J1~J5, Applicants A1~A7 هدف : حداکثر کردن تعداد شاغلین Jobs: qualified Applicants:

26 هدف : حداکثر کردن مجموع درآمد شاغلین
Example 2 (Weighted Job Assignment Problem) Job J1~J5, Applicants A1~A7, هدف : حداکثر کردن مجموع درآمد شاغلین

27 Model the problem: weighted bipartite graph G = (S1S2, E), S1={applicants}, S2={jobs}, a S1, b S2, abE if a has applied b, w(a,b) is the benefit that the company will gain by hiring applicant a.  To find a 1-regular subgraph H of G where the sum of the weights of the edges in H is a maximum.

28 Definition: A matching in a graph G is a 1-regular subgraph of G, that is, a subgraph induced by a collection of pairwise nonadjacent edges. We also refer to a matching as a collection of edges that induces a matching. A matching of maximum cardinality in a graph G is called a maximum matching of G.

29 M = { ab, cd, ef } is a maximum matching M’ = { bc, de } is maximal,
not maximum. c d e f Maximum  Maximal

30 Definition: If G is a graph of order p that has a matching of cardinality p/2, then such a matching is called a perfect matching. Note: If a graph of order p has a perfect matching, then p must be even. e.g. K1,3 has even order but no perfect matching.

31 a maximal matching a perfect matching

32 Definition: A matching in a weighted graph G is a set of edges of G, no two of which are adjacent. A maximum weight matching in a weighted graph is a matching in which the sum of the weights of its edges is maximum. Note: A maximum weight matching need not be a maximum matching.

33 M = { v1v2, v3v5 }is a maximum weight matching (weight sum=4)
M’ = {v1v2, v3v4, v5v6 }is a maximum matching

34 M : a matching of a graph G, e: an edge, v: a vertex
Definition: M : a matching of a graph G, e: an edge, v: a vertex (1). eM : e is called a matched edge (2). e M : e is an unmatched edge (3). v is a matched vertex if v is incident with a matched edge; v is a single vertex otherwise.

35 قضیه هال :)بدون اثبات) این قضیه یک روش ابتدایی برای اثبات وجود یا عدم وجودِ ، تطابق های پوشش دهنده مجموعه Xدر گراف های دو بخشی بدست می دهد.

36 Graph Theory گراف های مسطح Planar Graphs

37 Properties of Planar Graphs
Definition: A graph that can be drawn in the plane without any of its edges intersecting is called a planar graph. A graph that is so drawn in the plane is also said to be embedded (or imbedded) in the plane. Applications: (1) circuit layout problems (2) Three house and three utilities problem

38 Definition: A planar graph G that is drawn in the plane so that no two edges intersect (that is, G is embedded in the plane) is called a plane graph. (a) planar, not a plane graph (c) another plane graph (b) a plane graph

39 Note. A given planar graph can give rise to several different plane graph.
Definition: Let G be a plane graph. The connected pieces of the plane that remain when the vertices and edges of G are removed are called the regions of G. Fig 9-2 G1 R3: exterior R1 G1 has 3 regions. R2

40 Definition: Every plane graph has exactly one unbounded region, called the exterior region. The vertices and edges of G that are incident with a region R form a subgraph of G called the boundary of R. G2 G2 has only 1 region.

41 Boundary of R1: Boundary of R5: v1 v2 v3 G3 v1 v2 v3 v4 v5 v6 v7 v8 v9
G3 has 5 regions.

42 Observe: (1) Each cycle edge belongs to the boundary of two regions.
(2) Each bridge is on the boundary of only one region. (exterior)

43 Theorem 1: بدون اثبات A graph G is embeddable on the plane if and only if it is embeddable on the sphere. pf : Suppose that G has an embedding G on the sphere. Choose a point z of the sphere not in G. Then the image of G under stereographic projection from z is an embedding of G on the plane. The converse is proved similarly.

44 Thm 2: (Euler’s Formula)
If G is a connected plane graph with p vertices, q edges, and r regions, then p - q + r = 2. pf: (by induction on q) (basis) If q = 0, then G  K1; so p = 1, r =1, and p - q + r = 2. (inductive) Assume the result is true for any graph with q = k - 1 edges, where k  1. Let G be a graph with k edges. Suppose G has p vertices and r regions.

45 If G is a tree, then G has p vertices, p-1 edges and 1 region.
 p - q + r = p – (p-1) + 1 = 2. If G is not a tree, then some edge e of G is on a cycle. Hence G-e is a connected plane graph having order p and size k-1, and r-1 regions.  p - (k-1) + (r-1) = 2 (by assumption)  p - k + r = 2 #

46 Two embeddings of a planar graph

47 Definition: A plane graph G is called maximal planar if, for every pair u, v of nonadjacent vertices of G, the graph G+uv is nonplanar. Thus, in any embedding of a maximal planar graph G of order at least 3, the boundary of every region of G is a triangle. (چرا ؟)

48 Embed the graph G in the plane, resulting in r regions.
Thm 3: If G is a maximal planar graph with p  3 vertices and q edges, then q = 3p - 6. pf: Embed the graph G in the plane, resulting in r regions.  p - q + r = 2. Since the boundary of every region of G is a triangle, every edge lies on the boundary of two regions.  p - q + 2q / 3 = 2.  q = 3p - 6

49 The boundary of every region is a 4-cycle.
Cor. 1: If G is a maximal planar bipartite graph with p  3 vertices and q edges, then q = 2p - 4. pf: The boundary of every region is a 4-cycle. 4r = 2q  p - q + q / 2 = 2  q = 2p - 4. Cor. 2: If G is a planar graph with p  3 vertices and q edges, then q  3p - 6. pf: If G is not maximal planar, we can add edges to G to produce a maximal planar graph. By Thm. 3.

50 Thm 4: Every planar graph contains a vertex of degree 5 or less.
pf: Let G be a planar graph of p vertices and q edges. If deg(v)  6 for every vV(G) 2q  6p 3p-6 q  6p-12 2q 6p-12  2q  6p 

51 Two important nonplanar graph
K3,3 K5

52 Thm 5: The graphs K5 and K3,3 are nonplanar.
pf: (1) K5 has p = 5 vertices and q = 10 edges. q > 3p  K5 is nonplanar. (2) Suppose K3,3 is planar, and consider any embedding of K3,3 in the plane. Suppose the embedding has r regions. p - q + r = 2  r = 5 K3,3 is bipartite  The boundary of every region has 4 edges. 

53 Definition: A subdivision of a graph G is a graph obtained by inserting vertices (of degree 2) into the edges of G.

54 Subdivisions of graphs.
H is a subdivision of G. F F is not a subdivision of G.

55 Definition Two graphs G’ and G’’ are homeomorphic if both G’ and G’’ are subdivisions of the same graph G. Observation A graph G is planar if, and only if, every graph homeomorphic to G is planar.

56

57 Homework Are the graphs G and H homeomorphic? G H

58 Example : The Petersen graph is nonplanar.
Thm 6: (Kuratowski’s Theorem) A graph G is planar, if and only if, it has no subgraph homeomorphic to either K5 or K3,3. Example : The Petersen graph is nonplanar. 3 2 1 6 5 4 1 2 3 4 5 6 7 8 9 10 (a) Petersen (b) Subdivision of K3,3

59 Homework Show that the following graph is nonplanar.

60 گراف های مسطح و اجسام افلاطونی(اختیاری)

61

62

63 چنبره (Torus){مبحث اختیاری تا انتهای مبحث گرافهای مسطح} :

64 گراف چنبره ای گرافی که بتواند روی چنبره نشانده شود،به طوری که یال ها همدیگر را قطع نکنند هر گراف مسطح چنبره ای هست الزاما هر گراف چنبره ای مسطح نیست

65 نشاندن گرافK3,3 روی تیوب(چنبره)

66 رویه کره ای با تعداد متناهی حفره یا دسته
نکته:چنبره از نظر توپولوژی با کره ای با یک دسته معادل است

67 نشانده K7 روی چنبره t t u v w x y z t t

68 Graph Theory Coloring Graphs

69 Outline 1 Vertex Colorings 2 Edge Colorings

70 1 Vertex Colorings Focus: Partition the vertex (edge) set of an associated graph so that adjacent vertices (edges) belong to different sets of the partition.

71 Definition: A coloring of a graph G is an assignment of colors (elements of some set) to the vertices of G, so that adjacent vertices are assigned distinct colors. If n colors are used, then the coloring is referred to as an n-cloloring of G. Every coloring of a graph G produces a partition of V(G) into independent sets, called color classes. If there exists an n-coloring of a graph G, then G is n-colorable.

72 A graph G with chromatic number n is also called n-chromatic.
Definition: The minimum n for which a graph G is n-colorable is called the chromatic number of G, and is denoted by c(G). A graph G with chromatic number n is also called n-chromatic. G  K  c(G)  4 1  4-coloring  c(G)  4 2 3  c(G) = 4 1 1 1 4

73 The Chromatic Number Problem:
For a given graph G of order p and positive integer b with 2 < b  p, is c (G)  b? It is also an NP-complete problem. (1) c(Kp) = p for every positive integer p. (2) c(Cp) = 3 if n  3 is odd. c(Cp) = 2 if n  4 is even. (3) c(Km,n) = 2 for every pair m,n of positive integers.

74 عدد خوشه Definition: A clique in a graph G is a maximal complete subgraph. The maximum order of a clique is the clique number of G and is denoted by w (G).

75 Theorem 1: A graph is 2-colorable if and only if it is bipartite. اثبات : تمرین) Theorem 2: (i) w(G)  c(G)  1 + D. (ii) c(G)  D if and only if G is neither a complete graph nor an odd cycle.

76 Proof. (i) w(G)  c(G), trivial. (i) c(G)  1 + D: Since each vertex has degree  D. If there are 1+D colors, any vertex can be colored by a color different with all its neighbors. There is a (1 + D)-coloring of G.  c(G)  1 + D (ii) بدون اثبات

77 Example استفاده از این قضیه برای محاسبه
(1) Kn K2 : w = n, D = n  c = n There are graphs for which D=c. (2) Kn,n : w = 2, c = 2, D = n There are graphs for which D-c is arbitrarily large. There are also graphs for which c-w is large.

78 Example Multipartite Graphs

79

80

81 2 Chromatic Polynomials چندجمله ای رنگی
Note. Two colorings of a labeled graph G are considered different if they assign different colors to the same vertex of G. Definition. The chromatic polynomial f ( G, t ) of graph G is the number of different colorings of G that use t or fewer colors. Note. If t < c(G), then f ( G, t ) = 0.

82 علاوه بر مبحث چندجمله ای رنگی در اسلاید های آتی ، به عنوان جایگزین می توانید از صفحات 567 الی 569 کتاب گریمالدی (نسخه اصلی 2004) استفاده کنید

83 Figure f (K4, t ) = t (t - 1)(t - 2)(t - 3) f (K4, t ) = t 4
v t - 1 t v1 v2 v4 v3 t w x t - 3 t t - 2 t f (K4, t ) = t (t - 1)(t - 2)(t - 3) f (K4, t ) = t 4 f (Kp, t ) = t (t - 1)(t- p+1) f (Kp, t ) = t p

84 Figure If c(v2) = c(v3): f (K1,4, t ) = t (t - 1)4
 f (C4, t ) = t (t - 1) (t 2 - 3t +3)

85 If c(v2) = c(v3): = If c(v2)  c(v3): v1 v2 v4 v3 C4 v1 v2 = v3 v4 v1

86 Definition. For a graph G with nonadjacent vertices u and v, Let G:u=v be a graph with V(G:u=v) = V(G)-{v}, E(G:u=v) = { eE(G) | e is not incident with v} U { uw | vw E(G) }. Theorem 3. بدون اثبات If u and v are nonadjacent vertices in a , noncomplete graph G, then f ( G, t ) = f ( G+uv, t ) + f (G:u=v, t ) اضافه کردن یال uv uv انقباض دو راس

87 کاربرد این قضیه در بدست آوردن چندجمله ای رنگی
u v u v u v + = v u = + 2 + = + 3 +  f (P4, t ) = t (t -1)(t -2)(t -3) + 3t (t -1)(t -2) + t (t -1)

88 یک الگوریتم حریصانه برای رنگ آمیزی
یک الگوریتم حریصانه برای رنگ آمیزی اولا پیدا کردن حداقل تعداد رنگ های لازم برای رنگ کردن گراف (تعیین عدد رنگی) در حالت کلی یک مساله سخت(Np-Complete) می باشد . یعنی زمان تحلیل و اجرای آن یک تابع نمایی برحسب تعداد رئوس گراف است . الگوریتم آتی یک رنگ آمیزی از گراف به دست می دهند هرچند این جوابها بهینه نمی باشد اما زمان اجرای الگوریتم سریع می باشد.

89 Algorithm (Sequential Coloring Algorithm) [To produce a coloring of G with V(G)= {v1, v2, …, vp}.]
Sort the colors adjacent with vi in nondecreasing order and call the resulting list Li. If c does not appear on Li, then assign color c to vi, and go to Step 5; otherwise, continue. 4. c  c +1 5. If i < p, then i  i +1, and return to Step 2; otherwise, stop.

90 مثال 1 G v1 v2 v5 v3 v6 v4 2 2 3 3 1 For any graph G of order p, there are p! possible ways to label the vertices.

91 مثال G: V(G) = {v1, u1, v2, u2, …, vn, un}. E(G) = { uivj | i  j }
3 3 n n


Download ppt "Graph Theory Hamiltonian Graphs"

Similar presentations


Ads by Google