360 likes | 986 Views
Graph Theory. 大葉大學 資訊工程系 黃鈴玲 2011.9 . Textbook. G. Agnarsson and R. Greenlaw, Graph Theory: Modeling, Applications, and Algorithms, Pearson, 2007. G. Chartrand and O. R. Oellermann, Applied and Algorithmic Graph Theory, McGraw-Hill, 1993. Contents. Ch1 - Introduction to Graph Theory
E N D
Graph Theory 大葉大學 資訊工程系 黃鈴玲 2011.9
Textbook • G. Agnarsson and R. Greenlaw, Graph Theory: Modeling, Applications, and Algorithms, Pearson, 2007. • G. Chartrand and O. R. Oellermann, Applied and Algorithmic Graph Theory,McGraw-Hill, 1993.
Contents • Ch1 - Introduction to Graph Theory • Ch2 - Basic Concepts in Graph Theory • Ch3 - Trees and Forests • Ch4 - Spanning Trees • Ch5 - Fundamental Properties of Graphs and Digraphs • Ch6 - Connectivity and Flow • Ch7 - Planar Graphs • Ch8 - Graph Coloring • Ch10 - Independence, Dominance, and Matchings • Ch12 - Graph Algorithms
1.2 Why study graphs? • Problem 1.1: The Bridges of Kőnigsberg Problem: Make a round trip through downtown Kőnigsberg, traversing each bridge exactly once.
B1 I1 I2 B2 Q: 是否存在一種走法,可以走過每條邊一次,並回到起點? Ans: 因為每次經過一個點,都需要從一條邊進入該點,再用另一條邊離開,所以經過每個點一次要使用掉一對邊。 每個點上連接的邊數必須是偶數才行 此種走法不存在 (Chapter 5)
Problem 1.2: World Wide Web Communities Complete Bipartite Graph 航空公司網站 旅行社網頁 網頁連結
Problem 1.3: Job Assignments Jobs: qualified Applicants: Bipartite Graph Problem 1.8: Is the company able to meet its hiring need? If so, provide a possible set of hires that meet their needs. Ans: No (Ch10 Matching)
Problem 1.4: Storing Volatile Chemicals Problem: C1,C2, …, C7為有揮發性的化學藥品,有些不能存放在一起, (An edge between Ci and Cj indicates a grave danger in storing these chemicals in the same warehouse.) 至少需幾個倉庫? 1 2 4 3 3 Ans: 4 1 (Ch8 Graph Coloring) 2
1.3 Mathematical Preliminaries • Set, element, empty set, subset, union, intersection, disjoint, difference (A\B), cardinality (|A|, 即A集合的元素個數) • symmetric difference of A and B:AB = (A\B) (B\A) • power set of S: P(S) = { all subsets of S} • k-tuple: (a1, a2, …, ak) • Cartesian product of A1, A2, …, AkisA1A2…Ak ={ (a1, a2, …, ak) | ai Ai for each i }
1.4 The Definition of a Graph • A graph or a general graph is an ordered triple G = (V, E, ), where1. V .2. VE = .3. : E P(V) is a map such that |(e)| {1, 2} for each eE. • Vertex (點): element of V (V也常寫成V(G)) • Edge (邊): element of E (E也常寫成E(G)) • : edgemap • (e): endvertices (兩端點) of the edge e • (Note: V and E can be infinite.)
Example G=(V, E, ) V={u1, u2, u3, u4, u5} E={e1, e2, e3, e4, e5, e6} (e1)={u1, u2} (e2)=(e3)={u1, u3} (e4)={u2, u3} (e5)={u3, u4} (e6)={u4} u5 is called isolated.
Multiple edges, parallel edges: e u v • u, v : vertices of a graph G • u is called an endvertex (端點) of e. • u and v are adjacent (or neighbors) • u and e are incident.(adjacent用在點與點連接,以及邊與邊連接, incident用在點與邊連接) • loop:
1.5 Examples of Common Graphs • Simple graph: a graph having no multiple edges or any loop. can be omitted G=(V, E)
f u or hbors is the N(u1) = {u2, u3} N[u1] = {u1, u2, u3} N(u4) = N[u4] = {u3, u4} Exercise 17
pf. 在計算degree總和時,每條邊會被計算兩次,所以degree的總和等於邊數的兩倍。 degree sum = 12E(G) = 6
(degree是奇數的點,一定會有偶數個) pf. If the number of vertices with odd degree is odd, then the degree sum must be odd. The null graph Nn is 0-regular. The cycle Cn is 2-regular. The complete graph Kn is (n-1)-regular. The complete (m,n)-bipartite graph Km,n is a regular graph if and only if m=n. Every k-regular graph on n vertices has kn/2 edges. Exercise 13
1.7 Subgraphs is a subgraph of G if We writeG‘G.
If W={w1, w2, …, wm}, we write G[w1, w2, …, wm] instead of G[{w1, w2, …, wm}].
v e e' u 1.8 The Definition of a Directed Graph (h唸成eta)
G = (V, E, h) V = {u1, u2, u3, u4, u5} E = {e1, e2, e3, e4, e5, e6}
Simple digraph: a digraph without directed loops and parallel directed edges.
and the N -(u3) ={u1, u2} N +(u3) ={u1, u4}
( 所有點indegree總和= outdegree總和 = 邊數 ) A directed cycle is balanced and regular. Exercise: 補充:Draw a nonregular balanced digraph of 5 vertices. 26