1 / 112

Graph Theory Chapter 1 An Introduction to Graphs

Graph Theory Chapter 1 An Introduction to Graphs. 大葉大學 (Da-Yeh Univ.) 資訊工程系 (Dept. CSIE) 黃鈴玲 (Lingling Huang). Outline. 1.1 What is a graph? 1.2 The Degree of a Vertex 1.3 Isomorphic Graphs 1.4 Subgraphs 1.5 Degree Sequences 1.6 Connected Graphs 1.7 Cut-Vertices and Bridges

bevis
Download Presentation

Graph Theory Chapter 1 An Introduction to Graphs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Graph TheoryChapter 1 An Introduction to Graphs 大葉大學(Da-Yeh Univ.)資訊工程系(Dept. CSIE)黃鈴玲(Lingling Huang)

  2. Outline 1.1 What is a graph? 1.2 The Degree of a Vertex 1.3 Isomorphic Graphs 1.4 Subgraphs 1.5 Degree Sequences 1.6 Connected Graphs 1.7 Cut-Vertices and Bridges 1.8 Special graphs 1.9 Digraphs

  3. Graph Theory 的起源 • 1736, Euler solved the Königsberg Bridge Problem (七橋問題) Q: 是否存在一 種走法,可以走過每座橋一次,並回到起點? (Ch7 Euler graph)

  4. C A D B Königsberg Bridge Problem  Q: 是否存在一種走法,可以走過每條邊一次,並回到起點? Ans: 因為每次經過一個點,都需要從一條邊進入該點,再用另一條邊離開,所以經過每個點一次要使用掉一對邊。  每個點上連接的邊數必須是偶數才行  此種走法不存在

  5. FF SC W BS A B C D An elementary example of graphs 4 students: A, B, C, D 4 positions: FF, SC, W, BS 四人各有喜好的工作:(如下圖,連線表示有興趣) Q: Can all four students find jobs they like? (Ch6 Matching) Ans: No

  6. Definition of a graph • A graphG is a finite nonempty set V(G) of vertices (also called nodes, 點) and a (possibly empty) set E(G) of 2-element subsets of V(G) called edges (or lines, 邊). V(G) : vertex set of G (只有一個 G 時常簡寫為 V) E(G) : edge set of G (只有一個 G 時常簡寫為 E) 常見的 edge 表示法: {u, v} = {v, u} = uv (or vu) 當邊有方向性時稱 G 為 directed graph (digraph)

  7. v u w z x y Example • A graph G=(V,E), where V={u, v, w, x, y, z} E={{u,v}, {u,w}, {w,x}, {x,y}, {x,z}} E={uv, uw, wx, xy, xz} • G 的 diagram表示法:

  8. e u v Adjacent and Incident • u, v : vertices of a graph G • u and v are adjacent in G if uv  E(G)( u is adjacent to v, v is adjacent to u) • e=uv (e joins u and v) (e is incident with u, e is incident with v)

  9. loop multiedges, parallel edges Graphs types • undirected graph: • (simple) graph: loop (), multiedge () • multigraph: loop (), multiedge () • Pseudograph: loop (), multiedge ()

  10. order and size • The number of vertices in a graph G is called its order (denoted by |V(G)| ). • The number of edges is its size(denoted by |E(G)| ). • Proposition 1:If |V(G)| = p and |E(G)| = q, then • A graph of order p and size q is called a (p, q) graph.

  11. Tom Dick Harry Sue Linda Application of graphs • 一群人間兩兩互相認識或不認識(i.e., 沒有A認識B但B不認識A的情形),在安排一張圓桌的晚餐座位時,是否存在一種排法能讓坐在一起的人都相互認識? eg. Tom, Dick know Sue, Linda. Harry knows Dick and Linda.  acquaintance graph:(連線表示認識) Q: 圖中是否有一個通過 所有點的cycle? (Ch8 Hamiltonian graph)

  12. A E D B C 連線表示不能同區 Application of graphs • 動物園要用圍牆劃分區域,避免同區的動物互相捕食,至少需分多少區? eg. Animals: A, B, C, D, E AC 不能與 BD 同區,E不能與其他動物同區 Q: 將圖形的點著色 (一色表示一區), 若相鄰兩點需塗不同色, 最少需多少顏色才夠? Ans: 3 色  3 區 (Ch 10 Graph Coloring)

  13. Homework • Exercise 1.1: 1, 2, 3, 4

  14. Outline 1.1 What is a graph? 1.2 The Degree of a Vertex 1.3 Isomorphic Graphs 1.4 Subgraphs 1.5 Degree Sequences 1.6 Connected Graphs 1.7 Cut-Vertices and Bridges 1.8 Special graphs 1.9 Digraphs

  15. u v y x w 1.2 The degree of a vertex Definition. For a vertex v of G, its neighborhoodN(v) = { u V(G) | vu  E(G) }. The degree of vertex v isdeg(v) = | N(v) |. N(u) = {x, w, v}, N(y)={ } deg(u) = 3, deg(y) =0

  16. Notes • If |V(G)| = p, then0  deg(v)  p-1,  v  V(G). • If deg(v) = 0, then v is called an isolated vertex (孤立點). • v is an odd vertex if deg(v) is odd.v is an even vertex if deg(v) is even.

  17. 2 3 u v x w 1 2 Handshaking theorem • Theorem 1.1(Handshaking theorem)Let G be a graph, Example pf. 在計算degree總和時,每條邊會被計算兩次。

  18. Handshaking theorem Corollary 1.1Every graph contains an even number of odd vertices. pf. If the number of vertices with odd degree is odd, then the degree sum must be odd.

  19. Regular graph Definition. A graph G is r-regular if every vertex of G has degree r. A graph G is regular if it’s r-regular for some r. Example Note.There is no 1-regular graph or 3-regular graph of order 5. (by Corollary 1.1) 2-regular

  20. u v u v G G w x w x Complement Definition. The complementG of a graph G is a graph with V(G) = V(G), and uv E(G) iff uv  E(G).

  21. Application of degree Q: n people. (n 2)Is it possible that every two of them are acquainted with a different number of people in the group?(Suppose if A knows B, then B knows A.) A: Consider the acquaintance graph。 若任兩人所認識的人數不等, 表示圖形中所有點的 degree 都不相等。 n 點的圖形中, degree 只可能是 0, 1, …, n-1 (共 n 種), 必有一點 x的 degree 為 0,另一點 y的 degree 為n-1, 也就是 x不認識 y,但 y 認識 x ,矛盾。

  22. Exercise 1Prove that every graph of order n  2 has at least two vertices with the same degree. (Hint. The problem in previous page.) pf. If not, then there exist vertices x and y with deg(x) = 0 and deg(y) = n-1. It’s impossible.

  23. Exercise 9.Every vertex of a graph G of order 14 and size 25 has degree 3 or 5. How many vertices of degree 3 does G have? sol. Suppose there are x vertices of degree 3, then there are 14-xvertices of degree 5. |E(G)| =25  degree sum=50 3x + 5(14-x) = 50 x = 10

  24. Try to draw the graph Exercise 10.A graph G of order 7 and size 10 has six vertices of degree a and one of degree b. What is b? sol. 6a + b = 20 (a, b) = (0, 20) () (1, 14) () (2, 8) () (3, 2) ()  a=3, b=2.

  25. Homework • Exercise 1.2: 4, 7, 11

  26. Outline 1.1 What is a graph? 1.2 The Degree of a Vertex 1.3 Isomorphic Graphs 1.4 Subgraphs 1.5 Degree Sequences 1.6 Connected Graphs 1.7 Cut-Vertices and Bridges 1.8 Special graphs 1.9 Digraphs

  27. v2 v2 1.3 Isomorphic graphs G1 G2 u1 v1 u3 u4 u5 v3 v5 v4 u2 G1 and G2 are the same(after moving some vertices).

  28. Isomorphic Definition.Two graph G1 and G2 are isomorphic (同構) (denoted by G1 G2 ) if there is a 1-1 and onto function  from V(G1) to V(G2) such that uv  E(G1) iff f (u) f (v)  E(G2). (對應過去後,仍能保持兩點間相連與否的關係) The function  is called an isomorphism. In previous page,f (vi) = uifor each i.

  29. Isomorphic Definition.Two graph G1 and G2 are equalif V(G1) = V(G2) and E(G1) = E(G2). Proposition.1. IfG1 G2, then |V(G1)| = |V(G2)| and |E(G1)| = |E(G2)|. 2. IfG1 G2 and  is an isomorphism from V(G1) to V(G2), then (So the degree sequences of these graphs must be the same.) 1 跟 2 是判斷兩個圖是否 isomorphic 的初步檢查條件

  30. G1 G2 without any triangle contain triangles Definition.Trivial graph: The graph of order 1. Exercise 1Find two nonisomorphic 3-regular graphs of order 6 and size 9. Sol.

  31. contain triangle without any triangle Exercise 8Determine whether the graphs G1 and G2 shown below are isomorphic. G1 G2 Ans: No

  32. 所有點的 degree 排列成的數列,通常由大到小排,1.5節會探討。 Note.1. 要證明 G1 G2 時,必須給出 isomorphism f這個函數,也就是必須明確說出 G1的哪一點 對應G2 的哪一點。 2. 要證明 G1 G2 時,只需說明原因 (如:點數 邊數不同,degree sequence不同,或圖形結 構哪裡不同等)。

  33. Homework • Exercise 1.3: 4, 7, 9

  34. Outline 1.1 What is a graph? 1.2 The Degree of a Vertex 1.3 Isomorphic Graphs 1.4 Subgraphs 1.5 Degree Sequences 1.6 Connected Graphs 1.7 Cut-Vertices and Bridges 1.8 Special graphs 1.9 Digraphs

  35. v w v w v w u y y y x x x G H F  G 1.4 Subgraphs Definition.A graph H is a subgraph of a graph G if V(H)  V(G) and E(H)  E(G). (denote H  G) Example  G

  36. G H v w v w u y y x x Induced Subgraph Definition.Let S  V(G), S  . The subgraph inducedby S is the maximal subgraph of G with vertex set S. (denoted by <S>) A subgraph H of a graph G is a vertex-induced subgraph if H=<S> for some S  V(G). H is not an induced subgraph of G. H ∪{xw}才是

  37. u G v w x u y x The deletion of vertices Definition.Let S  V(G). The graph G-S = <V(G)-S>. If S={v}, then we write G-v instead. G-S v w Let S={x,u}  y

  38. G <X> v w v w u u y x Edge Induced Subgraph Definition.Let X  E(G), X  . The subgraph inducedby X is the minimal subgraph of G with edge set X. (denoted by <X>) A subgraph H of a graph G is an edge-induced subgraph if H=<X> for some X  E(G). Let X={uv,vw} 

  39. u G v w H v w Definition.A subgraph H  G is a spanning subgraph of G if V(H) = V(G). Definition.H = G + {uv, uw} means E(H) = E(G) ∪ {uv, uw} , where uv, uwE(G). Exercise 5If H=<E(G)>, does it follows that H=<V(G)>? No 

  40. Homework • Exercise 1.4: 1, 3 Exercise 6Let G be a labeled (p, q) graph. How many different edge-induced subgraphs does G have? Note. 不同的邊集合會造出不同的 edge-induced subgraph Ans. 2q-1 ( X  E(G) 且 X , 共有 2q-1 種 X )

  41. Outline 1.1 What is a graph? 1.2 The Degree of a Vertex 1.3 Isomorphic Graphs 1.4 Subgraphs 1.5 Degree Sequences 1.6 Connected Graphs 1.7 Cut-Vertices and Bridges 1.8 Special graphs 1.9 Digraphs

  42. 3 2 G 1 minimum degree : d(G) 0 3 1 maximum degree : D(G) 1.5 Degree Sequence Definition.Let G=(V, E),V={v1, v2, …, vp}.Then s: deg(v1), deg(v2), …, deg(vp) is called a degree seqence of G. (For convenient, assume s is nonincreasing, then s is unique.) s: 3, 3, 2, 1, 1, 0

  43. Note • If d1, d2, …, dp is the degree sequence of some graph, then and 0  di p-1 i. • For a given sequence s: d1, d2, …, dp of integers such that and 0  di p-1 i,there is no guarantee that s is the degree sequence of some graph. ex. s: 5, 5, 3, 2, 1, 0 ( p-1 and 0 can’t exist at the same time) (Moreover, d1 p is impossible.)

  44. Definition.We call a sequence of nonnegative integers graphical if it is the degree sequence of some graph. Theorem 1.2 (Havel-Hakimi)Let s be a sequence: d1, d2, …, dp, where diN, i. Let s1 be the sequence: Then s is graphical iff s1 is graphical. (Note. s1即是把 d1扣掉,剩下的前 d1項各減 1。)

  45. dd1+2 d2-1 d3-1 dd1+1-1 dp d1vertices v2 v3 vd1+1 vd1+2 vp G1 … … v2 v3 vd1+1 vd1+2 vp G … … v1 Proof of Thm 1.2: (  ) If s1 : is graphical  graph G1 s.t. s1 is the degree sequence of G1  dd1+1 dd1+2 dp d2 d3 … s : d1, d2, …, dp is graphical.

  46. dd1+1 dd1+2 d1 d2 d3 dp vd1+1 vd1+2 vp v1 v2 v3 G … … :: Proof of Thm 1.2: (continued) (  ) If s : d1, d2, …, dp is graphical  graph G s.t. s is the degree sequence of Gwith deg(vi) = difor 1  i  p, and is maximum. Claim: { v1v2, v1v3, …, v1vd1+1}  E(G) i.e., If the claim is true, then G-v1 is a graphwith degree sequence s1  s1is graphical.

  47. vk v1 vj vn G Claim: { v1v2, v1v3, …, v1vd1+1}  E(G)Proof: If not, there must be two vertices vj and vk(j < k)with dj> dk s.t. v1vk E(G) but v1vj E(G). Since dj> dk,  vnV(G) s.t. vjvn E(G), vkvn E(G). Let G2 =G - {v1vk, vjvn} + {v1vj, vkvn} G2 has degree seq s but larger , 

  48. Algorithm s: d1, d2, …, dpsequence of integers To determine whether s is graphical: (1) If di=0, i, then s is graphical. If  di<0 for some i, then s is not graphical. Otherwise, go to (2). (2) Reorder s to a nonincreasing sequence if necessary. (3) Let s = s1, (s1的產生方式同 Thm 1.2), return to (1).

  49. Example 1 s: 4, 4, 3, 3, 2, 2 s1’: 3, 2, 2, 1, 2 (delete the first 4) s1: 3, 2, 2, 2, 1 (reorder) s2: 1, 1, 1, 1 (delete 3) s3’: 0, 1, 1 (delete the first 1) s3: 1, 1, 0 (reorder) s4: 0, 0 (delete the first 1)  s is graphical

  50. 2 4 3 3 2 4 Draw the graph s: 4, 4, 3, 3, 2, 2 s1’: 3, 2, 2, 1, 2 s1: 3, 2, 2, 2, 1 s2: 1, 1, 1, 1 s3’: 0, 1, 1 s3: 1, 1, 0 s4: 0, 0  s is graphical G

More Related