版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、Introduction to Graph Theory3/1/20041Introduction The three sections we are covering tonight have in common that they mostly contain definitions. Graph theory suffers from a large number of definitions that mathematicians use inconsistently. For instance, what some mathematicians call a graph, other
2、s call a simple graph. What some mathematicians call a multigraph, other just call a graph. Some mathematicians call a graph labeled if the vertices are labeled, while others mean that the edges are labeled. 3/1/20042Introduction Why are the definitions so confused in graph theory? I suspect it is s
3、imply a matter of convenience. People who want to write about simple graphs make their lives easier by just calling them graphs. People who want to write about multigraphs call them graphs. The caveat in all of this is clear: when you start to read a new book on graph theory read the definitions car
4、efully to make sure of the ground rules. 3/1/20043Graphs: Basic Definitions A graph, G, comprises a set V of vertices and a set E of edges. The vertex set can be anything, but is most commonly a collection of letters or numbers. The set of edges is a set of doubleton subsets of V. That is Ea,b:a,bV
5、and ab. We denote the graph by G(V,E). If G(V,E) is a graph and a,bE, then we say vertices a and b are adjacent and the edge a,b joins them or connects them or is incident on them. We call a and b the endpoints of the edge. Two edges that share one vertex, such as a,b and b,c with ac, are adjacent t
6、o each other. 3/1/20044Graphs: Representation Normally we think of a graph as a drawing. A little reflection shows that the definition above is a formalization of this intuition about graphs. We think of a graph comprising dots (vertices) connected by line segments or curves (edges). We give every d
7、ot a label and form the vertex set V out of the labels. If there is a curve connecting dots a and b, we include the edge a,b in E. 3/1/20045Graphs: Examples Let V=a,b,c,d and E=a,b,a,c,b,c,c,d acdb3/1/20046Graphs: Examples Let V=a,b,c,d and E=a,b,a,c,a,d,b,c,b,d,c,d. This is called the complete grap
8、h on four vertices, denoted K4. acdb3/1/20047Graphs: Examples Let V=a,b,c,d and E=. acdb3/1/20048Graphs: Variant Definitions Our definition of graph does not allow an edge to join a vertex to itself. Such an edge is called a loop, and some definitions of graph allow them. Our text refers to such a s
9、tructure as a graph with loops (clever, huh?), which is a straightforward name but not common as far as I know. Some definitions of graph allow for multiple edges between the same two vertices. Our book calls this structure a multigraph (which is a common and helpful usage in that it makes E a multi
10、set rather than a set). Our book calls a multigraph with loops a pseudograph. I think this terminology may be standard, but I am not a graph theorist. 3/1/20049Graphs: History Texts typically trace the origin of graph theory to the Knigsberg Bridge Problem and its solution by Leonhard Euler (the boo
11、k gives this solution a date of 1736). The book describes the problem and the history behind it. You may recall that Euler (pronounced “oiler) was a brilliant mathematician and perhaps the most prolific of history, remaining productive into his 70s or 80s despite going blind. 3/1/200410Graphs: Appli
12、cations On p. 229 the book mentions the application of graphs to printed circuit and microchip design. Graphs seem an intuitively natural way to model many situations in the Creation (connections of wires/leads, logistics/transportation problems, pipelines between points with known capacities, famil
13、y trees, organizational charts, among many more). This suggests why graph theory has grown so dramatically in the past century. 3/1/200411Graphs: More Definitions The degree of a vertex is the number of edges incident on the vertex. That is, if G(V,E) is a graph and aV, then degree(a)=|x:a,xE|. Put
14、another way, the degree of a vertex is the number of vertices adjacent to it. If a vertex has no adjacent vertices (degree 0), then it is isolated. 3/1/200412Graphs: Theorems on Degree (6.7) The sum of the degrees of the vertices of a graph is even. Proof: Each edge joins two vertices. Thus adding u
15、p the degrees of the vertices is equivalent to counting all the edges twice. Therefore the sum of the degrees is even. In fact it is twice the number of edges. (6.8) Every graph has an even number of vertices of odd degree. Proof: Otherwise the sum of the degrees would be odd. 3/1/200413Graphs: Subg
16、raphs A graph G(V,E) is a subgraph of the graph G(V,E) if VV and EE. Note that this does require G(V,E) to be a graph, so one cannot form a subgraph of arbitrary subsets of V and E. The second graph below is a subset of the first.acdbacb3/1/200414Graphs: Paths The notion of a path in a graph is intu
17、itively clear but a little hard to pin down formally. Suppose G(V,E) is a graph with vertices v0,v1,vk (not necessarily distinct) and edges e1,e2,ek (not necessarily distinct) in which edge ei=vi-1,vi for i=1,k. Then the alternating sequence of vertices and edges v0e1v1e2v2ekvk is a path from v0 to
18、vk of length k (note that the length is the number of edges, not vertices). Unless we work with multigraphs the listing of the edges is redundant, so we may speak more simply of the path as v0v1v2vk. This definition allows for incredibly knotty, repetitious paths. If we want to rule out that possibi
19、lity, we can speak of simple paths, which are paths in which no vertices (and thus no edges) are repeated. 3/1/200415Graphs: An Example of a Path Example: In the following diagram the red edges show a simple path of length three from a to e. The path is acde. Of course this could also be the non-sim
20、ple path acdcacacdede of length 11.abcde3/1/200416Graphs: Connectedness Intuitively a graph is connected if it has no parts that are isolated from each other, if you can get from each part to every other part. Formally we say a graph is connected if there exists a path between every pair of distinct
21、 vertices. Clearly this is equivalent to saying there is a simple path between every pair of distinct vertices. The graph just given is connected, but the following one is not since you cannot, for instance, get from a to d. abcde3/1/200417Graphs: Components A component is a maximal connected subgra
22、ph. For instance the previous graph has two components, one consisting of a,b,c and their edges, the other consisting of d,e and their edge. Formally a subgraph G of graph G is a component if G is connected (and nonempty) and every other connected subgraph of G that contains G equals G (this second
23、condition is what we mean by maximal in this context). 3/1/200418Graphs: Components A cycle is a nontrivial (length0) path whose initial and terminal vertices are the same and which has no repeated edges. If no vertex is repeated except that the initial vertex equals the terminal one, then the cycle
24、 is simple. An n-cycle is a simple cycle of length n. In the following graph, the simple cycle acbda (in red) is a 4cycle while adecdba is a non-simple cycle (no edges repeat, but the vertex d does) abcde3/1/200419Graphs: Components A graph in which an edge joins every pair of distinct vertices is a
25、 complete graph. We denote by Kn the complete graph on n vertices. A bipartite (two-part) graph G(V,E) is one in which we can partition V into two subsets A and B such that every edge in E joins a vertex in A to a vertex in B. If an edge joins every vertex in A to every vertex in B, then G is a comp
26、lete bipartite graph. In that case if |A|=m and |B|=n, then we denote the complete bipartite graph by Km,n. The book shows examples of these graphs in the figures at the bottom of page 231. 3/1/200420Graphs: Components Bipartite graphs arise naturally in many contexts. For instance imagine that we m
27、ake a list of students on the left edge of a page, make a list of courses on the right edge of a page, and then draw lines between students and the courses they have taken. The result is a bipartite graph. Similarly if we draw the graph of a relation from a set A to a set B, then the result is a bip
28、artite graph.3/1/200421Directed Graphs (Digraphs) A directed graph (digraph, for short) G consists of a set V of vertices and a set E of directed edges. A directed edge is an ordered pair of elements of V. Put another way, the pair G(V,E) with EVV is a digraph.Differences from graphs: Digraphs allow
29、 for loops of the form (a,a), It is also possible to have two edges (a,b) and (b,a) between vertices a and b. We take the ordering of the pairs in E to give each edge a direction: namely the edge (a,b) goes from a to b. We call a the initial vertex and b the terminal vertex of the edge. When we draw
30、 the digraph, we draw the edge (a,b) as an arrow from a to b. 3/1/200422Digraphs: Example Example: Let V=a,b,c,d and E=(a,b),(a,c),(b,a),(c,c),(d,c) acdb3/1/200423Digraphs: Degree and MiscellanyThe outdegree of a vertex is the number of edges that initiate at a. The indegree of a is the number of ed
31、ges that terminate at a. A vertex with indegree 0 is a source, and a vertex with outdegree 0 is a sink. In the above digraph outdeg(a)=2 and indeg(a)=1. Also c is a sink and d is a source. The book goes through some technicalities on directed multigraphs and digraphs. I believe they are irrelevant t
32、o us, and I suggest you ignore them. They are another example of the annoying technicalities that easily arise in a broad, shallow introduction to graph theory. 3/1/200424Digraphs: Directed Subgraphs & PathsDirected subgraphs (subdigraphs?) have the natural definition. Directed paths, however, are s
33、lightly different since one may travel only in the direction the edges have. For instance if abcd is a directed path, then there must be an edge from a to b (not merely an edge between a and b). 3/1/200425Digraphs: Underlying GraphsSometimes it is useful to “remove the arrowheads to turn a digraph i
34、nto a graph. In the process we must remove all loops and duplicate edges (i.e., edges going both from a to b and b to a). Formally we can do this for a digraph G(V,E) by letting E=E(a,a):aV (this removes the loops) and then defining Es=a,b:(a,b)E (this turns directed edges into edges). The graph Gs(
35、V,Es) is the graph we want and is called the underlying graph of the digraph G. 3/1/200426Digraphs: Connected & Strongly ConnectedA digraph is connected if its underlying graph is connected. It is strongly connected if there is a directed path from every vertex to every other vertex. As an example w
36、e see below a digraph and its underlying graph. Clearly the digraph is connected. It is not strongly connected, however, since for instance there is no directed path from a to d (or even from c to d). acdbacdb3/1/200427Trees: Definition & ApplicationsA tree is a connected graph with no cycles. A for
37、est is a graph whose components are trees. An example appears below. Trees come up in many contexts: tournament brackets, family trees, organizational charts, and decision trees, being a few examples. 3/1/200428Directed TreesA directed tree is a digraph whose underlying graph is a tree and which has
38、 no loops and no pairs of vertices joined in both directions. These last two conditions mean that if we interpret a directed tree as a relation, it is irreflexive and asymmetric. Here is an example. 3/1/200429Trees: Theorem on LeavesTheorem: A tree T(V,E) with finite vertex set and at least one edge
39、 has at least two leaves (a leaf is a vertex with degree one). Proof: Fix a vertex a that is the endpoint of some edge. Move from a to the adjacent vertex along the edge. If that vertex has no adjacent vertices then it has degree one, so stop. If not, move along another edge to another vertex. Conti
40、nue building a path in this fashion until you reach a vertex with no adjacent vertices besides the one you just came from. This is sure to happen because V is finite and you never use the same vertex twice in the path (since T is a tree). This produces one leaf. Now return to a. If it is a leaf, the
41、n you are done. If not, move along a different edge than the one at the first step above. Continue extending the path in that direction until you reach a leaf (which is sure to happen by the argument above). 3/1/200430Trees: Leaves & Internal VerticesIn the following tree the red vertices are leaves
42、. We now know every finite tree with an edge has a least two leaves. The other vertices are internal vertices.3/1/200431Trees: Equivalent Condition on PathsTheorem (6.37): Given vertices a and b in a tree T(V,E), there is a unique simple path from a to b. Proof: Trees are connected, so there is a si
43、mple path from a to b. The book gives a nice example of using the contrapositive to prove the rest of the theorem. Theorem (6.38): Given a graph G(V,E) such that every pair of vertices is joined by a unique simple path, then G is a tree. This is the converse of Theorem 6.37. Proof: Since a simple pa
44、th joins every pair of points, the graph is connected. Now suppose G has a cycle abca. Then ba and bca are distinct simple paths from b to a. This contradicts uniqueness of simple paths, so G cannot possess such a cycle. This makes G a tree. 3/1/200432Rooted TreesSometimes it is useful to distinguis
45、h one vertex of a tree and call it the root of the tree. For instance we might, for whatever reasons, take the tree above and declare the red vertex to be its root. In that case we often redraw the tree to let it all “hang down from the root (or invert this picture so that it all “grows up from the
46、root, which suits the metaphor better) 3/1/200433Rooted Directed TreesIt is sometimes useful to turn a rooted tree into a rooted directed tree T by directing every edge away from the root. 3/1/200434Rooted Trees: TerminologyRooted trees and their derived rooted directed trees have some useful termin
47、ology, much of which is suggested by family trees. The level of a vertex is the length of the path from it to the root. The height of the tree is the length of the longest path from a leaf to the root. If there is a directed edge in T from a to b, then a is the parent of b and b is a child of a. If
48、there are directed edges in T from a to b and c, then b and c are siblings. If there is a directed path from a to b, then a is an ancestor of b and b is a descendant of a. 3/1/200435(Rooted) Trees: Binary & m-aryOur book describes a directed tree as binary if no vertex has outdegree over 2. It is mo
49、re common to call a tree binary if no vertex has degree over 3. (In general a tree is m-ary if no vertex has degree over m+1. Our book calls a directed tree m-ary if no vertex has outdegree over m.) The directed rooted tree above is 4-ary (I think the word is quaternary) since it has a vertex with o
50、utdegree 4. In a rooted binary tree (hanging down or growing up) one can describe each child vertex as the left child or right child of its parent. 3/1/200436Trees: Edges in a TreeTheorem (6.41): A tree on n vertices has n1 edges. Proof: Let T be a tree with n vertices. Make it rooted. Then every ed
51、ge establishes a parent-child relationship between two vertices. Every child has exactly one parent, and every vertex except the root is a child. Therefore there is exactly one edge for each vertex but one. This means there are n1 edges. 3/1/200437Trees: Edges in a TreeTheorem (6.42): If G(V,E) is a
52、 connected graph with n vertices and n1 edges is a tree. This is the converse of theorem 6.41. Proof: Suppose G is as in the statement of the theorem, and suppose G has a cycle. Then we can remove an edge from the cycle without disconnecting G (see the next slide for why). If this makes G a tree, th
53、en stop. If not, there is still a cycle, so we can remove another edge without disconnecting G. Continue the process until the remaining graph is a tree. It still has n vertices, so it has n1 edges by a prior theorem. This is a contradiction since G had n1 vertices to start with. Therefore G has no
54、cycle and is thus a tree. 3/1/200438Trees: Edges in a Tree (lemma)(Why can we remove an edge from a cycle without disconnecting the graph? Let a and b be vertices. There is a simple path from a to b. If the path involves no edges in the cycle, then the path from a to be is unchanged. If it involves
55、edges in the cycle, let x and y be the first and last vertices in the cycle that are part of the path from a to b. So there is a path from a to x and a path from y to b. Since x and y are part of a cycle, there are at least simple two paths from x to y. If we remove an edge from the cycle, at least
56、one of the paths still remains. Thus there is still a simple path from a to b.) 3/1/200439Spanning Trees of a GraphIf G(V,E) is a graph and T(V,F) is a subgraph of G and is a tree, then T is a spanning tree of G. That is, T is a tree that includes every vertex of G and has only edges to be found in
57、G. Using the procedure in the previous paragraph (remove edges from cycles until only a tree remains), we can easily prove that every connected graph has a spanning tree (theorem 6.43). 3/1/200440jpflb730-K&G#CXzTvPrhndka:62=M(J%FZBVka:630-K&G#CWzTvPrhndka:63N-K&G#CWySvPrhnd9:63N)J&G#CWySuPrhnd9;53N
58、%FZBVxSuOqgmc8;51+L*H!EYAUwQsipflb730-K&G#CWzTvPrhnda:63N)K&G#CWySvPrhnd9;63N)J&G#CWySuOrhnd9;52=M(I$EYBVxRtjpflc8.40-L*H!DXzTvQsioeka:63N)J%F#CWySOqgmc8.51+L*H!EYAUwQsioflb73N-K&G#CWyTvPrhnd9:63N)K&G#CWySuPrhnd9;53N)J%G#CWySuOqhnd9;52=M(I$EYAVxRtjpflb8.40-K*H!DXzTvPsioeka:63N)J%FZCWySuOqgmd9;51+M(I
59、$EYAUwRtjpflb8.40-K&G!DXzTvPrhoeka:640-K&G#CXzTvPrhneka:63N)J%F#CWySuOqhnd9;51=M(I$EYAUxRtjpflb8.40-K&H!DXzTvPsioeka:63N)J%FZBWySuOqgmd9;51+L(I$EYAUwRtjpflb7.40-K&G#DXzTvPrhoeka:630-K&G#CXzTvPrhndka:63N-K&G#CWyTvPrhnd9:63N)K&G#CWySuPrhnd9;51+L(I$EYAUwQtjpflb740-K&G#DXzTvPrhneka:630-K&G#CWzTvPrhnda:6
60、3N-K&G#CWySvPrhnd9:63N)J&G#CWySuOrhnd9;53N)JZBVxRuOqgmc8;51+L*H!EYAUwQsioflb730-K&G#CWyTvPrhnda:63N)K&G#CWySuPrhnd9;62=M(I$EZBVxRtjpgmc8.40+L*H!DXzTwQsioeka30-K&G#CWzTvPrhndka:63N-K&G#CWyTvPrhnd9:63N)J&G#CWySuPrhnd9;53N)FZBVxSuOqgmc8;51+L*H!EYAUwQsipflb730-K&G#CWzTvPrhnda:63N)K&G#CWySvPrhnd9;63N)J&G
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 二零二五版牛糞有機肥生產加工合同規(guī)范4篇
- 二零二五年度新型農村電商服務合同規(guī)范文本4篇
- 二零二五年度美容美發(fā)產品研發(fā)及成果轉化合同3篇
- 二零二五年度城市更新改造項目投資合同6篇
- 二零二五年度出國勞務派遣與職業(yè)技能提升培訓合同3篇
- 房貸合同范本(2篇)
- 承包牛羊合同(2篇)
- 2025年度幕墻工程材料供應與配送合同4篇
- 2025年度農機維修服務網點加盟管理合同4篇
- 2025年歐派櫥柜出口貿易合同4篇
- (正式版)CB∕T 4552-2024 船舶行業(yè)企業(yè)安全生產文件編制和管理規(guī)定
- JBT 14588-2023 激光加工鏡頭 (正式版)
- 2024年四川省成都市樹德實驗中學物理八年級下冊期末質量檢測試題含解析
- 九型人格與領導力講義
- 廉潔應征承諾書
- 2023年四川省成都市中考物理試卷真題(含答案)
- 泵車述職報告
- 2024年山西文旅集團招聘筆試參考題庫含答案解析
- 恢復中華人民共和國國籍申請表
- 管理期貨的趨勢跟蹤策略 尋找危機阿爾法
- 瀝青化學分析試驗作業(yè)指導書
評論
0/150
提交評論