112
Graph Theory Graph Theory Chapter 1 Chapter 1 An Introduction to Graphs An Introduction to Graphs 大大大大 大大大大 (Da-Yeh Univ.) (Da-Yeh Univ.) 大大大大大 大大大大大 (Dept. CSIE) (Dept. CSIE) 大大大 大大大 (Lingling Huang) (Lingling Huang)

Graph Theory Chapter 1 An Introduction to Graphs

  • Upload
    bevis

  • View
    86

  • Download
    1

Embed Size (px)

DESCRIPTION

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 - PowerPoint PPT Presentation

Citation preview

Page 1: Graph Theory Chapter 1  An Introduction to Graphs

Graph TheoryGraph Theory

Chapter 1 Chapter 1 An Introduction to GraphsAn Introduction to Graphs

大葉大學大葉大學 (Da-Yeh Univ.)(Da-Yeh Univ.)

資訊工程系資訊工程系 (Dept. CSIE)(Dept. CSIE)

黃鈴玲黃鈴玲 (Lingling Huang)(Lingling Huang)

Page 2: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-22

OutlineOutline

1.1 What is a graph?1.1 What is a graph?1.2 The Degree of a Vertex1.2 The Degree of a Vertex1.3 Isomorphic Graphs1.3 Isomorphic Graphs1.4 Subgraphs1.4 Subgraphs1.5 Degree Sequences1.5 Degree Sequences1.6 Connected Graphs1.6 Connected Graphs1.7 Cut-Vertices and Bridges1.7 Cut-Vertices and Bridges1.8 Special graphs1.8 Special graphs1.9 Digraphs1.9 Digraphs

Page 3: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-33

Graph Theory Graph Theory 的起源的起源

1736, Euler solved the 1736, Euler solved the Königsberg Königsberg Bridge Problem (Bridge Problem ( 七橋問題七橋問題 ))

Q: Q: 是否存在一 是否存在一 種走法,可以走種走法,可以走過每座橋一次,過每座橋一次,並回到起點?並回到起點?(Ch7 Euler graph)

Page 4: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-44

Königsberg Bridge ProblemKönigsberg Bridge Problem

Ans: 因為每次經過一個點,都需要從一條邊進入該點,再用另一條邊離開,所以經過每個點一次要使用掉一對邊。

每個點上連接的邊數必須是偶數才行

此種走法不存在

A

B

C

D

Q: Q: 是否存在一種走法,可以走過每條邊一次,並是否存在一種走法,可以走過每條邊一次,並回到起點?回到起點?

Page 5: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-55

An elementary An elementary example example of graphsof graphs4 students: A, B, C, D4 students: A, B, C, D

4 positions: FF, SC, W, BS4 positions: FF, SC, W, BS四人各有喜好的工作:四人各有喜好的工作: (( 如下圖,連線表示有興如下圖,連線表示有興

趣趣 ))

A B C D

FF SC W BSQ: Can all four students find jobs they like?

Ans: No(Ch6 Matching)

Page 6: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-66

Definition of a graphDefinition of a graph

A A graphgraph GG is is a finite nonempty set a finite nonempty set V(G)V(G) of of verticesvertices (also (also

called called nodesnodes, , 點點 ) and ) and a (possibly empty) set a (possibly empty) set E(G)E(G) of 2-element of 2-element

subsets of V(G) called subsets of V(G) called edgesedges (or (or lineslines, , 邊邊 ). ). V(G) : vertex set of G (V(G) : vertex set of G ( 只有一個 只有一個 G G 時常簡寫為 時常簡寫為 V)V)E(G) : edge set of G (E(G) : edge set of G ( 只有一個 只有一個 G G 時常簡寫為 時常簡寫為 E)E)常見的 常見的 edge edge 表示法表示法 : : {u, v}{u, v} = = {v, u}{v, u} = = uvuv (or (or

vuvu))當邊有方向性時稱 當邊有方向性時稱 G G 為 為 directed graphdirected graph (digraph) (digraph)

Page 7: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-77

ExampleExample

A graph A graph G=(V,E)G=(V,E), where, where

V={u, v, w, x, y, z}V={u, v, w, x, y, z}

E={{u,v}, {u,w}, {w,x}, {x,y}, E={{u,v}, {u,w}, {w,x}, {x,y}, {x,z}}{x,z}}

E={uv, uw, wx, xy, xz}E={uv, uw, wx, xy, xz} G G 的 的 diagramdiagram

表示法表示法 ::

vu

w

x y

z

Page 8: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-88

uu, , vv : vertices of a graph G : vertices of a graph G

uu and and vv are are adjacentadjacent in G if uv in G if uv E(G) E(G)( u is adjacent to v, v is adjacent to u)( u is adjacent to v, v is adjacent to u)

e=uv (e e=uv (e joinsjoins u and v) (e is u and v) (e is incident incident withwith u, e is u, e is incident withincident with v) v)

Adjacent and IncidentAdjacent and Incident

u ve

Page 9: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-99

Graphs typesGraphs types

undirected graph:undirected graph:• (simple) graph: loop ((simple) graph: loop (), multiedge (), multiedge ())• multigraph: loop (multigraph: loop (), multiedge (), multiedge ())• Pseudograph: loop (Pseudograph: loop (), multiedge (), multiedge ())

loop multiedges, parallel edges

Page 10: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-1010

order and sizeorder and size

The number of vertices in a graph G is The number of vertices in a graph G is called its called its orderorder (denoted by (denoted by |V(G)||V(G)| ). ).

The number of edges is its The number of edges is its sizesize(denoted by (denoted by |E(G)||E(G)| ). ).

Proposition 1:Proposition 1:If |V(G)| = If |V(G)| = pp and |E(G)| = and |E(G)| = qq, then, then

A graph of order A graph of order pp and size and size qq is called a is called a

((pp, , qq) graph) graph..

2

pq

Page 11: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-1111

Application of graphsApplication of graphs

一群人間兩兩互相認識或不認識一群人間兩兩互相認識或不認識 (i.e., (i.e., 沒有沒有 AA 認識認識BB 但但 BB 不認識不認識 AA 的情形的情形 )) ,在安排一張圓桌的晚餐,在安排一張圓桌的晚餐座位時,是否存在一種排法能讓坐在一起的人都相互座位時,是否存在一種排法能讓坐在一起的人都相互認識?認識?

eg.eg.

TomTom, , DickDick know know SueSue, , LindaLinda..

HarryHarry knows Dick and Linda. knows Dick and Linda.

Tom Dick

Sue Linda

Harry

acquaintance graph:( 連線表示認識 )

(Ch8 Hamiltonian graph)

Q: 圖中是否有一個通過所有點的 cycle?

Page 12: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-1212

A

D E B

C

eg. Animals: A, B, C, D, eg. Animals: A, B, C, D, EE

AC AC 不能與 不能與 BD BD 同區,同區, EE 不能與其他動物同區不能與其他動物同區

Application of graphsApplication of graphs

動物園要用圍牆劃分區域,避免同區的動物互相捕食,動物園要用圍牆劃分區域,避免同區的動物互相捕食,至少需分多少區?至少需分多少區?

Q: 將圖形的點著色 ( 一色表示一區 ) , 若相鄰兩點需塗不同色, 最少需多少顏色才夠? 連線表示不能同區

Ans: 3 色 3 區(Ch 10 Graph Coloring)

Page 13: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-1313

HomeworkHomework

Exercise 1.1: Exercise 1.1: 1, 2, 3, 41, 2, 3, 4

Page 14: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-1414

OutlineOutline

1.1 What is a graph?1.1 What is a graph?1.2 The Degree of a Vertex1.2 The Degree of a Vertex1.3 Isomorphic Graphs1.3 Isomorphic Graphs1.4 Subgraphs1.4 Subgraphs1.5 Degree Sequences1.5 Degree Sequences1.6 Connected Graphs1.6 Connected Graphs1.7 Cut-Vertices and Bridges1.7 Cut-Vertices and Bridges1.8 Special graphs1.8 Special graphs1.9 Digraphs1.9 Digraphs

Page 15: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-1515

1.2 The degree of a 1.2 The degree of a vertexvertex

Definition.Definition.

For a vertex For a vertex vv of G, its of G, its neighborhoodneighborhood N(N(vv)) = { = { uu V(G) | V(G) | vv uu E(G) }. E(G) }.

The The degreedegree of vertex of vertex vv is isdeg(deg(vv)) = | N( = | N(vv) |. ) |.

y

u v

wx

N(u) = {x, w, v}, N(y)={ }

deg(u) = 3, deg(y) =0

Page 16: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-1616

NotesNotes

If |V(G)| = If |V(G)| = pp, then, then0 0 deg( deg(vv) ) pp1, 1, vv V(G). V(G).

If deg(If deg(vv) = 0, then ) = 0, then vv is called an is called an isolated vertexisolated vertex ( ( 孤立點孤立點 ).).

vv is an is an odd vertexodd vertex if deg( if deg(vv) is odd.) is odd.vv is an is an even vertexeven vertex if deg( if deg(vv) is ) is even.even.

Page 17: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-1717

Handshaking theoremHandshaking theorem

Theorem 1.1Theorem 1.1 (Handshaking theorem)(Handshaking theorem)Let G be a graph,Let G be a graph, 2|)G(E| )deg(

)G(V

v

v

pf. 在計算 degree 總和時,每條邊會被計算兩次。

u v

wx

2 3

21

8)deg()G(V

v

v

4|)(| GE

Example

Page 18: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-1818

Handshaking theoremHandshaking theorem

Corollary 1.1Corollary 1.1 Every graph contains an even number Every graph contains an even number of odd vertices.of odd vertices.

pf. If the number of vertices with odd degree is odd, then the degree sum must be odd.

Page 19: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-1919

Regular graphRegular graph

Definition.Definition.

A graph G is A graph G is r-regularr-regular if every vertex of G has if every vertex of G has degree r.degree r.

A graph G is A graph G is regularregular if it if it’’s s r-regularr-regular for some r. for some r.

2-regular

Note. There is no 1-regular graph or 3-regular graph of order 5.

(by Corollary 1.1)

Example

Page 20: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-2020

ComplementComplement

Definition.Definition.

The The complementcomplement GG of a graph G of a graph G is a graph with V(G) = V(G), and is a graph with V(G) = V(G), and uv uv E(G) iff uv E(G) iff uv E(G). E(G).

u v

w x

G

u v

w x

G

Page 21: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-2121

Application of degreeApplication of degree

Q: Q: nn people. ( people. (nn 2) 2)Is it possible that every two of them Is it possible that every two of them are acquainted with a different number are acquainted with a different number of people in the group?of people in the group?(Suppose if A knows B, then B knows A.)(Suppose if A knows B, then B knows A.)

A: Consider the acquaintance graph 。 若任兩人所認識的人數不等, 表示圖形中所有點的 degree 都不相等。 n 點的圖形中, degree 只可能是 0, 1, …, n1 ( 共 n 種 ) , 必有一點 x 的 degree 為 0 ,另一點 y 的 degree 為 n1 , 也就是 x 不認識 y ,但 y 認識 x ,矛盾。

Page 22: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-2222

Exercise 1Exercise 1 Prove that every graph of order Prove that every graph of order n n 2 has at least two vertices with 2 has at least two vertices with the same degree.the same degree.

pf. If not, then there exist vertices x and y with deg(x) = 0 and deg(y) = n1. It’s impossible.

(Hint. The problem in previous page.)

Page 23: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-2323

Exercise 9.Exercise 9. Every vertex of a graph G of order Every vertex of a graph G of order 14 and size 25 has degree 3 or 5.14 and size 25 has degree 3 or 5.

How many vertices of degree 3 How many vertices of degree 3 does G have?does G have?

sol. Suppose there are x vertices of degree 3, then there are 14x vertices of degree 5. |E(G)| =25 degree sum=50 3x + 5(14x) = 50 x = 10

Page 24: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-2424

Exercise 10.Exercise 10. A graph G of order 7 and size 10 A graph G of order 7 and size 10 has six vertices of degree has six vertices of degree aa and and one of degree one of degree bb. What is . What is bb??

sol. 6a + b = 20 (a, b) = (0, 20) () (1, 14) () (2, 8) () (3, 2) () a=3, b=2.

Try to draw the graph

Page 25: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-2525

HomeworkHomework

Exercise 1.2:Exercise 1.2:

4, 7, 114, 7, 11

Page 26: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-2626

OutlineOutline

1.1 What is a graph?1.1 What is a graph?1.2 The Degree of a Vertex1.2 The Degree of a Vertex1.3 Isomorphic Graphs1.3 Isomorphic Graphs1.4 Subgraphs1.4 Subgraphs1.5 Degree Sequences1.5 Degree Sequences1.6 Connected Graphs1.6 Connected Graphs1.7 Cut-Vertices and Bridges1.7 Cut-Vertices and Bridges1.8 Special graphs1.8 Special graphs1.9 Digraphs1.9 Digraphs

Page 27: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-2727

1.3 Isomorphic graphs1.3 Isomorphic graphs

v1

v3 v4v5

u1

u2

u3 u4 u5

G1 G2

G1 and G2 are the same (after moving some vertices).

v2

v2

Page 28: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-2828

IsomorphicIsomorphic

Definition.Definition.Two graph GTwo graph G11 and G and G22 are are isomorphic (isomorphic ( 同同構構 ) ) (denoted by (denoted by GG11 G G22 ) if ) if there is a 1-there is a 1-1 and onto function 1 and onto function from V(G from V(G11) to ) to V(GV(G22) such that) such that uv uv E(G E(G11) iff ) iff (u) (u) (v) (v) E(G E(G22).).

(( 對應過去後,仍能保持兩點間相連與否的關係對應過去後,仍能保持兩點間相連與否的關係 ))

The function The function is called an is called an isomorphismisomorphism..

In previous page,In previous page, ((vvii) = ) = uuii for each for each ii..

Page 29: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-2929

IsomorphicIsomorphic

Definition.Definition.Two graph GTwo graph G11 and G and G22 are are equalequal if V(Gif V(G11) = V(G) = V(G22) and E(G) and E(G11) = E(G) = E(G22).).

)( )),((deg)(deg 121GVvvv GG

1 跟 2 是判斷兩個圖是否 isomorphic 的初步檢查條件

Proposition.Proposition. 1. If1. If GG11 G G22, then |V(G, then |V(G11)| = |V(G)| = |V(G22)| and )| and |E(G |E(G11)| = |E(G)| = |E(G22)|.)|. 2. If2. If GG11 G G22 and and is an isomorphism is an isomorphism fromfrom V(G V(G11) to V(G) to V(G22), then ), then

(So the degree sequences of these graphs must be the same.)

Page 30: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-3030

Definition.Definition.Trivial graphTrivial graph: The graph of order : The graph of order 1.1.

Exercise 1Exercise 1Find two nonisomorphic 3-regular Find two nonisomorphic 3-regular graphs of order 6 and size 9.graphs of order 6 and size 9.

G1 G2

contain triangles without any triangle

Sol.

Page 31: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-3131

Exercise 8Exercise 8Determine whether the graphs G1 Determine whether the graphs G1 and G2 shown below are and G2 shown below are isomorphic.isomorphic.

G1 G2

without any triangle contain triangle

Ans: No

Page 32: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-3232

Note.Note. 1. 1. 要證明 要證明 GG11 G G2 2 時,必須給出 時,必須給出 isomorphism isomorphism 這這這這這這這這,也就是必須明確說出 ,也就是必須明確說出 GG11 的哪一點的哪一點 對應 對應 GG2 2 的哪一點。的哪一點。

2. 2. 要證明 要證明 GG11 G G2 2 時,只需說明原因 時,只需說明原因 (( 如:點數如:點數 邊數不同, 邊數不同, degree sequencedegree sequence 不同,或圖形結不同,或圖形結 構哪裡不同等 構哪裡不同等 )) 。。

所有點的 degree 排列成的數列,通常由大到小排, 1.5 節會探討。

Page 33: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-3333

HomeworkHomework

Exercise 1.3:Exercise 1.3:

4, 7, 94, 7, 9

Page 34: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-3434

OutlineOutline

1.1 What is a graph?1.1 What is a graph?1.2 The Degree of a Vertex1.2 The Degree of a Vertex1.3 Isomorphic Graphs1.3 Isomorphic Graphs1.4 Subgraphs1.4 Subgraphs1.5 Degree Sequences1.5 Degree Sequences1.6 Connected Graphs1.6 Connected Graphs1.7 Cut-Vertices and Bridges1.7 Cut-Vertices and Bridges1.8 Special graphs1.8 Special graphs1.9 Digraphs1.9 Digraphs

Page 35: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-3535

1.4 Subgraphs1.4 Subgraphs

Definition.Definition.A graph H is a A graph H is a subgraphsubgraph of a graph G if of a graph G if V(H) V(H) V(G) and E(H) V(G) and E(H) E(G). (denote E(G). (denote H H G G))

G

u

v w

x y

H

v w

x y

G G

v w

x y

F

Example

Page 36: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-3636

Definition.Definition.Let S Let S V(G), S V(G), S . The . The subgraph inducedsubgraph induced by Sby S is the maximal subgraph of G with is the maximal subgraph of G with vertex set S. (denoted by vertex set S. (denoted by <S><S>))

A subgraph H of a graph G is a A subgraph H of a graph G is a vertex-vertex-induced subgraphinduced subgraph if H=<S> for some S if H=<S> for some S V(G).V(G).

Induced SubgraphInduced Subgraph

G

u

v w

x y

H is not an induced subgraph of G.

v w

x y

H

H ∪{xw} 才是

Page 37: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-3737

The deletion of The deletion of verticesvertices

Definition.Definition.Let S Let S V(G). The graph V(G). The graph GGSS = <V(G) = <V(G)S>.S>.

If S={v}, then we write GIf S={v}, then we write Gv instead.v instead.

G

u

v w

x y

Let S={x,u}

GS

u

v w

x y

Page 38: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-3838

Definition.Definition.Let X Let X E(G), X E(G), X . The . The subgraph inducedsubgraph induced by Xby X is the minimal subgraph of G with is the minimal subgraph of G with edge set X. (denoted by edge set X. (denoted by <X><X>))

A subgraph H of a graph G is an A subgraph H of a graph G is an edge-edge-induced subgraphinduced subgraph if H=<X> for some X if H=<X> for some X E(G).E(G).

Edge Induced SubgraphEdge Induced Subgraph

G

u

v w

x y

Let X={uv,vw}

<X>

u

v w

Page 39: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-3939

Definition.Definition.A subgraph H A subgraph H G is a G is a spanning spanning subgraph subgraph of G if V(H) = V(G).of G if V(H) = V(G).

Definition.Definition.H = G H = G ++ {uv, uw} means {uv, uw} means E(H) = E(G) E(H) = E(G) ∪ ∪ {uv, uw} , where uv, {uv, uw} , where uv, uwuwE(G).E(G).

Exercise 5Exercise 5If H=<E(G)>, does it follows that If H=<E(G)>, does it follows that H=<V(G)>?H=<V(G)>?

No G u

v w

H

v w

Page 40: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-4040

HomeworkHomework

Exercise 1.4:Exercise 1.4:

1, 31, 3

Exercise 6Exercise 6Let G be a Let G be a labeledlabeled (p, q) graph. How (p, q) graph. How many different edge-induced subgraphs many different edge-induced subgraphs does G have?does G have?

Note. 不同的邊集合會造出不同的 edge-induced subgraph

Ans. 2q1 ( X E(G) 且 X , 共有 2

q1 種 X )

Page 41: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-4141

OutlineOutline

1.1 What is a graph?1.1 What is a graph?1.2 The Degree of a Vertex1.2 The Degree of a Vertex1.3 Isomorphic Graphs1.3 Isomorphic Graphs1.4 Subgraphs1.4 Subgraphs1.5 Degree Sequences1.5 Degree Sequences1.6 Connected Graphs1.6 Connected Graphs1.7 Cut-Vertices and Bridges1.7 Cut-Vertices and Bridges1.8 Special graphs1.8 Special graphs1.9 Digraphs1.9 Digraphs

Page 42: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-4242

1.5 Degree Sequence1.5 Degree Sequence

Definition.Definition.Let Let GG=(=(VV, , EE),), VV={={vv11, , vv22, …, , …, vvpp}.}. Then Then ss:: deg( deg(vv11), deg(), deg(vv22), …, deg(), …, deg(vvpp)) is called a is called a degree seqencedegree seqence of of GG. .

(For convenient, assume (For convenient, assume ss is is nonincreasingnonincreasing, , then then ss is unique.) is unique.)

s: 3, 3, 2, 1, 1, 0G 3 2

13

10

minimum degree : (G)

maximum degree : (G)

Page 43: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-4343

If If dd11, , dd22, , ……, , ddpp is the degree sequence of is the degree sequence of some graph, then and 0 some graph, then and 0 dd ii pp1 1 ii..

For a given sequence For a given sequence ss: : dd11, , dd22, , ……, , ddpp of of integers such that and 0 integers such that and 0 dd ii pp1 1 ii, ,

there is no guarantee that there is no guarantee that ss is the degree is the degree sequence of some graph.sequence of some graph.

ex. ex. ss: 5, 5, 3, 2, 1, 0: 5, 5, 3, 2, 1, 0

NoteNote

even. is 1

p

iid

even is 1

p

iid

(Moreover, d1 p is impossible. )

( p1 and 0 can’t exist at the same time)

Page 44: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-4444

Definition.Definition.We call a sequence of nonnegative integers We call a sequence of nonnegative integers graphicalgraphical if it is the degree sequence of if it is the degree sequence of some graph.some graph.

Theorem 1.2 (Havel-Hakimi)Theorem 1.2 (Havel-Hakimi)Let Let ss be a sequence: be a sequence: dd11, , dd22, …, , …, ddpp, where , where ddii NN, , ii..

Let Let ss1 be the sequence: be the sequence:

Then Then ss is graphical iff is graphical iff ss1 is graphical. is graphical.

pddd dddddd ,,,,1,,1,1 32132 111

(Note. s1 即是把 d1 扣掉,剩下的前 d1 項各減 1 。 )

Page 45: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-4545

Proof of Thm 1.2:Proof of Thm 1.2:

pddd dddddd ,,,,1,,1,1 32132 111

v1

G1…

v2 v3 vd1+1 vd1+2

d21 d31vp

dd1+11 dd1+2 dp

( ( ) If ) If ss11 : : is graphical is graphical graph graph GG11 s.t. s.t. ss11 is the degree sequence is the degree sequence of of GG11

d2 d3

G …

v2 v3 vd1+1 vd1+2 vp

dd1+1 dd1+2 dp

ss : : dd11, , dd22, …, , …, ddp p is graphical.is graphical.

d1 vertices

Page 46: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-4646

( ( ) If ) If ss : : dd11, , dd22, …, , …, ddpp is graphical is graphical graph graph GG s.t. s.t. ss is the degree sequence is the degree sequence of of GG with deg(with deg(vvii) = ) = ddii for 1 for 1 ii pp,,

and is maximum. and is maximum.

Proof of Thm 1.2: (continued)Proof of Thm 1.2: (continued)

)( 1

)deg(vNw

w

Claim: { v1v2, v1v3, …, v1vd1+1} E(G)

v1G …

v2 v3vd1+1 vd1+2

d2 d3

vp

dd1+1 dd1+2 dpd1

::

i.e.,

If the claim is true, then G-v1 is a graphwith degree sequence s1 s1 is graphical.

Page 47: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-4747

If not, there must be two vertices If not, there must be two vertices vvjj and and vvkk ((j j

< < kk))with with ddjj > > ddkk s.t. s.t. vv11vvkk EE((GG)) but but vv11vvjj EE((GG).).

Claim: { v1v2, v1v3, …, v1vd1+1} E(G)

Proof: Proof:

v1G

vjvk vn

Since Since ddjj > > ddkk, , vvnnVV((GG)) s.t. s.t. vvjjvvnn EE((GG)), , vvkkvvnn EE((GG).).

Let Let GG22 = = G G { {vv11vvkk, , vvjjvvnn} + {} + {vv11vvjj, , vvkkvvnn}}

)( 1

)deg(vNw

wGG22 has degree seq has degree seq ss but larger , but larger ,

Page 48: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-4848

AlgorithmAlgorithm

ss: : dd11, , dd22, …, , …, ddpp sequence of integerssequence of integersTo determine whether To determine whether ss is graphical: is graphical:

(1) If (1) If ddii=0, =0, ii, then , then ss is graphical. is graphical. If If ddii<0 for some <0 for some ii, then , then ss is not graphical. is not graphical. Otherwise, go to (2). Otherwise, go to (2).

(2) Reorder (2) Reorder ss to a nonincreasing sequence to a nonincreasing sequence if necessary. if necessary.

(3) Let (3) Let ss = = ss11, (, (ss11 的產生方式同 的產生方式同 Thm 1.2), Thm 1.2), return to (1). return to (1).

Page 49: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-4949

Example 1Example 1

s: 4, 4, 3, 3, 2, 2s: 4, 4, 3, 3, 2, 2

ss11’’: 3, 2, 2, 1, 2 (delete the first 4): 3, 2, 2, 1, 2 (delete the first 4)

ss11: 3, 2, 2, 2, 1 (reorder): 3, 2, 2, 2, 1 (reorder)

ss22: 1, 1, 1, 1 (delete 3): 1, 1, 1, 1 (delete 3)

ss33’’: 0, 1, 1 (delete the first 1): 0, 1, 1 (delete the first 1)

ss33: 1, 1, 0 (reorder): 1, 1, 0 (reorder)

ss44: 0, 0 (delete the first 1): 0, 0 (delete the first 1)

s is graphicals is graphical

Page 50: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-5050

Draw the graphDraw the graph

s: 4, 4, 3, 3, 2, 2s: 4, 4, 3, 3, 2, 2

s1s1’’: 3, 2, 2, 1, 2: 3, 2, 2, 1, 2

s1: 3, 2, 2, 2, 1 s1: 3, 2, 2, 2, 1

s2: 1, 1, 1, 1 s2: 1, 1, 1, 1

s3s3’’: 0, 1, 1 : 0, 1, 1

s3: 1, 1, 0 s3: 1, 1, 0

s4: 0, 0 s4: 0, 0

s is graphicals is graphical

G

4

42

2 3

3

Page 51: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-5151

Example 2Example 2

s: 5, 4, 3, 2, 1, 1s: 5, 4, 3, 2, 1, 1

ss11: 3, 2, 1, 0, 0 (delete 5): 3, 2, 1, 0, 0 (delete 5)

ss22: 1, 0, -1, 0 (delete 3): 1, 0, -1, 0 (delete 3)

s is not graphicals is not graphical

Page 52: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-5252

Definition.Definition.Let G=(V,E), Let G=(V,E), the set the set DD (G)={deg(v) | v(G)={deg(v) | vV }V } is is called the called the degree setdegree set of G. of G.

Ex.Ex.s: 4, 4, 3, 3, 2, 2s: 4, 4, 3, 3, 2, 2D D (G)={ 2, 3, 4 } (G)={ 2, 3, 4 } (( 去掉順序及重複性去掉順序及重複性 ))

Kapoor et al [7] showed thatKapoor et al [7] showed thatEvery finite set of nonnegative Every finite set of nonnegative integers is the degree set of some integers is the degree set of some graph.graph.

Page 53: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-5353

Exercise 6Exercise 6

Let |V(G)|=12, Let |V(G)|=12, DD (G)(G){4, 5, 6}.{4, 5, 6}.Show that G contains either Show that G contains either

(i) at least 4 vertices of degree 4,(i) at least 4 vertices of degree 4,

(ii) at least 6 vertices of degree 5,(ii) at least 6 vertices of degree 5,

(iii) at least 5 vertices of degree 6.(iii) at least 5 vertices of degree 6.ProofProof

If not, deg 4 If not, deg 4 點數 點數 33

deg 5 deg 5 點數 點數 55

deg 6 deg 6 點數 點數 44

3+5+4=12

deg 4 deg 4 點數 點數 = = 33

deg 5 deg 5 點數 點數 = = 55

deg 6 deg 6 點數 點數 = = 44

degreedegree 總和不為偶數 總和不為偶數

Page 54: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-5454

Exercise 8Exercise 8

Let G be a graph with Let G be a graph with DD (G) = {(G) = {mm, , nn}, }, where G contains where G contains mm vertices of degree vertices of degree mm and and nn vertices of degree vertices of degree nn..Prove that if G contains an odd vertex, Prove that if G contains an odd vertex, then every vertex of G is odd.then every vertex of G is odd.

ProofProof

degree sum = degree sum = mm22 + + nn22

If If mm is odd then is odd then nn must be odd, must be odd, and vice versa.and vice versa.

Page 55: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-5555

HomeworkHomework

Exercise 1.5:Exercise 1.5:1, 3, 5, 7, 91, 3, 5, 7, 9

Page 56: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-5656

OutlineOutline

1.1 What is a graph?1.1 What is a graph?1.2 The Degree of a Vertex1.2 The Degree of a Vertex1.3 Isomorphic Graphs1.3 Isomorphic Graphs1.4 Subgraphs1.4 Subgraphs1.5 Degree Sequences1.5 Degree Sequences1.6 Connected Graphs1.6 Connected Graphs1.7 Cut-Vertices and Bridges1.7 Cut-Vertices and Bridges1.8 Special graphs1.8 Special graphs1.9 Digraphs1.9 Digraphs

Page 57: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-5757

1.6 Connected graphs1.6 Connected graphsDefinition.Definition.

A A walkwalk in a graph G is an alternating in a graph G is an alternating sequencesequence W: vW: v00, e, e11, v, v11, e, e22, v, v22, , ……, v, vn-1n-1, e, enn, v, vnn (n (n0)0)of vertices and edges, where eof vertices and edges, where e ii=v=vi-1i-1vvii, , i.i.( ( 故 故 W W 中的 中的 eeii 可省略可省略 ) (W is also called a ) (W is also called a vv0 0 --vvn n walkwalk))

W is said to have W is said to have length nlength n..

A A trailtrail is a walk without repeated edges. is a walk without repeated edges.

A A pathpath is a walk without repeated vertices. is a walk without repeated vertices.G

u

v w

x y

walk: x, w, v, x, w trail: x, w, v, x, ypath: x, w, v

Page 58: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-5858

Theorem 1.3Theorem 1.3Every u-v walk in a graph contains a u-v Every u-v walk in a graph contains a u-v path.path.

Proof. 去掉重複的點或邊即可

DefinitionDefinition(1) A (1) A cyclecycle is a walk is a walk vv00, v, v11, v, v22, , ……, v, vn-1n-1, v, vnn in in which nwhich n3, v3, v0 0 = v= vnn, and v, and v11, v, v22, , ……, v, vn-1n-1, v, vnn are are distinct. (distinct. (n-cyclen-cycle))

(2) A u-v walk is (2) A u-v walk is closedclosed if u=v. (closed walk) if u=v. (closed walk)

(3) A nontrivial closed trail is called a (3) A nontrivial closed trail is called a circuitcircuit..

Page 59: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-5959

DefinitionDefinition(1) Let u,v(1) Let u,vV(G), u is V(G), u is connected toconnected to v if v if u-v u-v path. path.

(2) G is (2) G is connectedconnected if u is connected to v if u is connected to v u,v u,v V(G), otherwise, G is called V(G), otherwise, G is called disconnecteddisconnected..

(3) A subgraph H of G is a (3) A subgraph H of G is a componentcomponent of of G if G if H is a maximal connected subgraph H is a maximal connected subgraph of G.of G.

(4) The number of components of G is (4) The number of components of G is denoted by denoted by kk (G)(G)..

Note. “is connected to” is an equivalence relation

Page 60: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-6060

Exercise 7Exercise 7

Let G be a graph. |V(G)|=p, pLet G be a graph. |V(G)|=p, p2.2.Suppose Suppose (G) (G) (p-1)/2. (p-1)/2.Prove that G is connected.Prove that G is connected.

ProofProof

If G is disconnected,If G is disconnected,

since since (G) (G) (p-1)/2, (p-1)/2,

each component must contain (p+1)/2 each component must contain (p+1)/2 vertices. vertices.

Page 61: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-6161

Exercise 10Exercise 10

Prove that if a graph G has a closed walk Prove that if a graph G has a closed walk of odd length, then it has a cycle of odd of odd length, then it has a cycle of odd length.length.

(1) 若點沒有重複此 walk 本身即 odd cycle(2) 若點 x 重複出現

設此 walk P: v0=x, v1, v2, …, vi=x, vi+1, …, vn, v0=x 其中 vi 是從 v0 走到 vn 的過程中, x 最後一次出現則可將 P 分成兩個 closed walk:P1: v0=x, v1, v2, …, vi=xP2: vi=x, vi+1, …, vn, v0=x兩者必有一為 odd length取此一 walk 仿照上述方法再拆,最後必可得一 odd cycle.

Proof.

Page 62: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-6262

Exercise 11Exercise 11

Show that a graph Show that a graph G contains (1) a path contains (1) a path of length of length ((G)), and (2) a cycle of length , and (2) a cycle of length at least at least ((G)) +1 if +1 if ((G)) 2. 2.

Proof: Let P: v0, v1, …, vk be a longest path of G.

Then deg(v0) ((GG)), , and and NN((v0 ) V(P) for otherwise P is not longest. It follows that the length of P is at least ((G)).

Let vn be the vertex of P with v0vn E(G) and n is largest.

Since NN((v0) V(C),It is clear that the length of C is at least ((G)) +1. +1.

If If ((G)) 2 2, then n 2. 2. Let C: v0, v1, …, vn, v0.

Page 63: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-6363

HomeworkHomework

Exercise 1.6:Exercise 1.6:1, 2, 3, 4, 5, 8, 91, 2, 3, 4, 5, 8, 9

Page 64: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-6464

OutlineOutline

1.1 What is a graph?1.1 What is a graph?1.2 The Degree of a Vertex1.2 The Degree of a Vertex1.3 Isomorphic Graphs1.3 Isomorphic Graphs1.4 Subgraphs1.4 Subgraphs1.5 Degree Sequences1.5 Degree Sequences1.6 Connected Graphs1.6 Connected Graphs1.7 Cut-Vertices and Bridges1.7 Cut-Vertices and Bridges1.8 Special graphs1.8 Special graphs1.9 Digraphs1.9 Digraphs

Page 65: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-6565

1.7 Cut Vertices and 1.7 Cut Vertices and BridgesBridges

Definition 1Definition 1

A vertex A vertex vv in a graph in a graph GG is called a is called a cut-vertexcut-vertex if if kk((GG vv) > ) > kk((GG).).

So So vv is a cut-vertex in a is a cut-vertex in a connected graph connected graph GG if if G G vv is is disconnected.disconnected.

Page 66: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-6666

e.g.e.g.

G G : cut-vertex: cut-vertex :: vv33,, v v55

cut-edgecut-edge ::

vv55vv66

v1

v5

v3

v2

v4

v6

Page 67: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-6767

Definition 2Definition 2 An edge An edge ee in a graph in a graph GG is called a is called a

bridgebridge (cut-edge) (cut-edge) if if kk((GG ee) > ) > kk((GG).).

e.g.e.g. The graph in previous page: The graph in previous page: vv55vv66 is a bridge. is a bridge.

Note. Note. (1) if vv is a cut-vertex of a connected graph GG, , then kk((GG vv) ) 2(2)If e is a bridge of a connected graph GG,

then kk((GG ee) ) =2

Page 68: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-6868

Proof.() Let ee be a bridge of GG.

Suppose ee =uv, and assume, to the contrary, that ee lies on a cycle C : u, v, w, …, x, u.

Then C e : v, w, …, x, u is a u-v path of GG ee.

Claim: GG e e is connected.is connected. (If the claim is true, (If the claim is true, ))

Theorem 1.4Theorem 1.4

An edge An edge ee of a connected graph of a connected graph GG is a is a bridge bridge iffiff ee does not lie on a cycle of does not lie on a cycle of GG..

(e is not a bridge)

Page 69: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-6969

(Proof of above Claim)Let u1, v1 VV((Gee)=)=VV((GG))

∵ ∵GG is connected is connected

∴ ∴ u1-v1 path P in G.If ee P, then P is also a path in Gee

u1-v1 path in Gee If If ee PP,, then then

((PPCC))ee is a is a u1-v1 walk in walk in GGee ∴ ∴ u1-v1 path in path in GGee

Therefore, Therefore, GGee is connected. is connected.

v1uu1 v

C

P

Page 70: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-7070

(() ) Suppose Suppose e=uve=uv is an edge that lies on is an edge that lies on no cycle of no cycle of GG. Then . Then GGee contains no contains no u-vu-v path.path.Otherwise, if Otherwise, if PP is a is a u-vu-v path in path in GGee, then , then PP { { uv uv }} is a cycle containing is a cycle containing ee, , . .

Page 71: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-7171

Definition 3Definition 3

A A nontrivialnontrivial connected graph connected graph without a cut-vertex is called a without a cut-vertex is called a nonseparablenonseparable graph.graph.

A A blockblock BB of a nontrivial of a nontrivial connected graph connected graph GG is a subgraph is a subgraph of of GG that itself is a that itself is a maximalmaximal nonseparable graph.nonseparable graph.

# of vertices 22

Page 72: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-7272

e.g. e.g. GG

v1G has 3 blocks :

<{v1,v2,v3}>, <{v3,v4,v5}>, <{v5,v6}>v3

v2

v4 v5

v6

Page 73: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-7373

Note: Note:

1. A block is necessarily an induced 1. A block is necessarily an induced subgraph. subgraph.

2. The blocks of a graph produce a partition 2. The blocks of a graph produce a partition of the edge set of the graph. of the edge set of the graph.

3. 3. Every two blocks have at most one vertex Every two blocks have at most one vertex

in common. in common.

4. If 4. If vv VV((BB11))VV((BB22), where ), where BB11, , BB22 are are block of block of GG, then , then vv is a cut-vertex. is a cut-vertex.

5. If 5. If GG is nonseparable, then is nonseparable, then GG is a block. is a block.

Page 74: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-7474

DefinitionDefinitionA block of a graph A block of a graph GG that contains that contains exactly one cut-vertex of exactly one cut-vertex of GG is called is called an an end-blockend-block of G. of G.

Theorem 1.5Theorem 1.5Let Let GG be a connected graph with at be a connected graph with at least one cut-vertex. Then least one cut-vertex. Then GG has at has at least two end-blocks. least two end-blocks.

(( 介紹到介紹到 treetree 時再証時再証 ))

Page 75: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-7575

HomeworkHomework

Exercise 1.7:Exercise 1.7:

1, 2, 4, 5, 6, 71, 2, 4, 5, 6, 7

Page 76: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-7676

SolSol ::(a) If (a) If GG has a bridge has a bridge ee,, assume assume G G = = GG11GG2 2 {{ee},}, where where ee==abab, , GG11 and and GG22 are the two components of are the two components of GGee..

G1 G2

a b

HW3HW3

((a) Show that if a) Show that if GG is an is an rr-regular -regular connected graph, where connected graph, where rr is even, then is even, then GG contains no bridges.contains no bridges.

(b) Is the statement in (a) still true if (b) Is the statement in (a) still true if rr is is odd?odd?

Page 77: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-7777

Consider the subgraph Consider the subgraph GG11

vv VV((GG11), deg), degGG ((vv)=)= rr if if vv aa

rr11 if if vv==aa

∵∵rr is even is even

∴ ∴ is odd is odd

)(deg)( 1

1v

GVvG

1

Page 78: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-7878

(b) No, (b) No, e.g. e.g. r r = 1= 1

GG ::

r = r = 33

GG ::

Page 79: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-7979

HW4 HW4

Find a counterexampleFind a counterexample

(a) If (a) If GG is a connected graph that is a connected graph that contains only even vertices, then contains only even vertices, then GG contains no cut-vertices. contains no cut-vertices.

Sol.Sol.

Page 80: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-8080

HW8 HW8 A connected graph A connected graph GG contains contains three distinct verticesthree distinct vertices uu, , vv and and ww with the property that every with the property that every u-wu-w path in path in GG contains contains vv. Show that . Show that vv is a cut-vertex.is a cut-vertex.

Proof. Consider Gv,

there is no u-w path in Gv. k(Gv)>1 = k(G)

v is a cut-vertex.

Page 81: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-8181

OutlineOutline

1.1 What is a graph?1.1 What is a graph?1.2 The Degree of a Vertex1.2 The Degree of a Vertex1.3 Isomorphic Graphs1.3 Isomorphic Graphs1.4 Subgraphs1.4 Subgraphs1.5 Degree Sequences1.5 Degree Sequences1.6 Connected Graphs1.6 Connected Graphs1.7 Cut-Vertices and Bridges1.7 Cut-Vertices and Bridges1.8 Special graphs1.8 Special graphs1.9 Digraphs1.9 Digraphs

Page 82: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-8282

1.8 Special Graphs1.8 Special Graphs

Def 1.Def 1.

Complete graph (Complete graph (KKpp)) : : pp vertices, vertices, pp 1 , 1 , u~vu~v, , u,vu,v V V ((KKpp))

Note. Note.

(1) (1) KKpp is ( is (pp1) regular1) regular

(2) (2) KKpp has edges. has edges.

2

p

K5

Page 83: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-8383

Def 2.Def 2.

AA path path of order of order nn (denoted by (denoted by PPnn) :) :a path of a path of nn vertices. vertices.

(length (length nn1)1)

Def 3.Def 3.

nn-cycle-cycle (denoted by (denoted by CCnn) : ) : a cycle of a cycle of nn vertices, vertices, nn 3. 3. even cycleeven cycle : : a cycle of even verticesa cycle of even vertices odd cycleodd cycle : : a cycle of odd verticesa cycle of odd vertices

P4

C5

Page 84: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-8484

Def 4. Def 4.

A graph A graph GG is is bipartitebipartite if if VV((GG)=)=VV11 VV22

s. t. every edge of s. t. every edge of GG joins a vertex of joins a vertex of VV11

and a vertex of and a vertex of VV22..

( ( ((VV11, , VV22)) is called a is called a bipartitionbipartition of of G.G. ) )

e.g.G: v1 v6

v4 v5 v3 v2

redrawn of G

V1

V2

disjoint union

v1v2

v4

v3

v6v5

+∪

Page 85: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-8585

Def 5. (Def 5. ( 先補充先補充 )) If If u-vu-v path in path in GG , the , the distancedistance between between uu and and vv, denoted by , denoted by dd((uu, , vv)),, is the length of shortest is the length of shortest u-vu-v path. path. If If u-vu-v path in path in GG, , dd((uu, , vv) = ∞.) = ∞.e.g.

上圖 G 中 d(v1, v4) = 1 d(v1, v6) = 2 d(v4, v6) = 3

v1v2

v4

v3

v6v5

Page 86: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-8686

Thm 1.6 Thm 1.6 A nontrivial graph A nontrivial graph GG is bipartite iff is bipartite iff GG has has no odd cycles.no odd cycles.

Pf:Pf: )) Assume Assume G G is a bipartite graph with is a bipartite graph with

bipartition bipartition ((VV11,,VV22).).

If If CCnn : : vv11,,vv22,…,,…,vvnn,,vv11 is any cycle of is any cycle of GG. (. (nn3) 3)

Suppose Suppose vv11VV11, , then then vv22VV22, , vv33VV11, , vv44VV22, …, , …, vvnnVV22

Hence Hence nn must be even, must be even, GG has no odd has no odd cycles. cycles.

Page 87: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-8787

)) It clearly suffices to prove It clearly suffices to prove the converse of connect graphs. the converse of connect graphs.

Let Let GG be a connected graph without be a connected graph without odd odd

cycles.cycles.

Choose any vertex Choose any vertex uuVV((GG),), define define

VV1 1 = { = { wwVV((GG) | ) | dd((uu, , ww) is even}) is even}

VV2 2 = { = { wwVV((GG) | ) | dd((uu, , ww) is odd}) is odd}

(Show that ((Show that (VV11, , VV22) is a bipartition of ) is a bipartition of GG).).

Page 88: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-8888

Choose any two vertices Choose any two vertices vv,,wwVV11 (or (or vv,,wwVV22 ). ).

Let Let PP be a be a shortestshortest u-vu-v path and path and QQ be a be a shortestshortest

u-wu-w path. ( path. (PP,,Q Q may have several common vertices.)may have several common vertices.)

Let Let uu11 be the last vertex common to be the last vertex common to PP and and QQ..

Let Let PP’’ be the subpath of be the subpath of P P connecting connecting uu1 1 andand v,v,

QQ’’ be the subpath of be the subpath of QQ connecting connecting uu11 and and ww..

lengthlength((P-P’P-P’) ) = length= length((Q-Q’Q-Q’)) d d((uu11,,vv)+)+dd((uu11,,ww)) is even. is even.

If If vwvwEE((GG),), then then PP’∪’∪QQ’ {∪’ {∪ vwvw}} is a cycle of odd length. is a cycle of odd length.

Q

P vu

u1

w∴ ∴ vwvwEE((GG),), vv,,wwVV11 or or vv,,wwVV22

GG is bipartite. is bipartite.

Page 89: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-8989

Def 6.Def 6. Complete bipartite graphComplete bipartite graph KKm,nm,n : :

VV((KKm,nm,n)) = V = V11∪∪VV22 , where , where ||VV11|=|=mm , , ||VV22|=|=nn..

uuVV11 and and vvVV22 , , uvuvEE((KKm,nm,n).).

Note :Note :

||VV((KKm,nm,n)| = )| = m+nm+n

||E((KKm,nm,n)| = )| = mnmn..

K3,2

Page 90: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-9090

Def 7.Def 7.

The graph The graph KK1,1,nn (or (or KKnn,1,1) is called a ) is called a starstar..

e.g.

K1,1 K2 K1,2 P3 K2,2 C4

Page 91: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-9191

Def 7.Def 7. ( (nn-partite graph) (-partite graph) (nn2)2)

A graph A graph GG is an is an nn-partite graph-partite graph if if VV((GG)) can be partitioned into can be partitioned into nn nonempty subsets nonempty subsets VV11,,VV22,,……,,VVnn such such that no edge of that no edge of GG joins vertices in joins vertices in the same set.the same set.

((VV11,,VV22,,……,,VVnn are called the are called the partite partite setssets of of GG))

3-partite graph

V1

V3

V2

Page 92: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-9292

Def 8.Def 8.

Complete Complete nn-partite graph-partite graph KKpp11,p,p

22,…,p,…,p

nn : :

VV((KKpp11,p,p

22,…,p,…,p

nn) = ) = VV11 ∪ ∪ VV22 …∪ ∪…∪ ∪VVnn

where | where |VVii|=|=PPii , , ii

EE((KKpp11,p,p

22,…,p,…,p

nn) = {) = {uvuv | | uuVVii , v , vVVjj with with ii≠≠j j }}

+ + +

K1,1,1,1 K4

e.g.

Page 93: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-9393

K1,2,2

v1 v4

v6 v5

v2 v3

K2,2,2

v1

v3v2v4

v5v6

Page 94: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-9494

Def 9.Def 9.

Let Let GG11,,GG22 be vertex-disjoint graphs. be vertex-disjoint graphs.

The The unionunion of of GG11,,GG22 is the graph is the graph GG11∪∪GG22 havinghaving

V(V(GG11∪∪GG22) = V() = V(GG11)∪V()∪V(GG22))

E(E(GG11∪∪GG22) = E() = E(GG11)∪E()∪E(GG22))

If If GG1 1 GG2 2 GG then we write then we write 22GG for for GG11∪∪GG22..

Page 95: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-9595

(2) The (2) The joinjoin of of GG11, , GG22 is the graph is the graph GG11++GG22

havinghaving

VV((GG11++GG22) = ) = VV((GG11)∪)∪VV((GG22))

EE((GG11++GG22))

= = EE((GG11)∪)∪EE((GG22)) {∪{∪ vv11vv22 : : vv11VV((GG11), ), vv22VV((GG22)})}

e.g.P3 :

K2 :

P3+K2 :

Page 96: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-9696

(3) For graphs (3) For graphs GG11 and and GG22, the , the productproduct GG11 × × GG22

has vertex set has vertex set

VV((GG11××GG22)= )= VV((GG11) × ) × VV((GG22))

={ (={ (uu11, , uu22) : ) : uu11VV((GG11) , ) , uu22VV((GG22)})}

and and ((uu11, , uu22) ) ~ ~ ((vv11, , vv22) ) iff iff uu1 1 = = vv11 and and uu2 2 vv22 EE((GG22))

or or uu22= = vv22 and and uu1 1 vv11 EE((GG11))

Page 97: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-9797

直覺的想法:直覺的想法:GG11GG22 可視為在可視為在 GG1 1 中每個點的位置放一個中每個點的位置放一個 GG22

及在及在 GG2 2 中每個點的位置放一個中每個點的位置放一個 GG11

e.g.

P3 :

K3 : a1

a2 a3

b1

b2

b3

K3P3:(a1, b1)

(a2, b1) (a3, b1)(a1,b2)

(a2, b2) (a3, b2)(a1,b3)

(a2, b3) (a3, b3)

Page 98: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-9898

Definition 10.Definition 10.在考慮在考慮 productproduct 時時 , , 有一類圖形常被提到:有一類圖形常被提到:The The hypercubehypercube or or n-cuben-cube QQnn is defined as is defined as

QQ11= = KK22

QQnn= = QQnn-1-1KK22 if if nn 2

0

1

(0,0)

(0,1)

(1,1)

(1,0)

Q1 : Q2 :

Page 99: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-9999

QQ33 :: (0,0,1) (0,1,1

)

(1,1,1)

(1,1,0)

(0,1,0)

(1,0,0)

(0,0,0)

(1,0,1)

Note.Note. VV((QQnn) ) can be written ascan be written as {({(aa11, , aa22, …, , …, aann) | ) | aaii=0 or 1}=0 or 1}

Page 100: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-100100

HomeworkHomework

Exercise 1.8:Exercise 1.8:

all, except 10(b)(c) , 11all, except 10(b)(c) , 11

Page 101: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-101101

HW4HW4 Let Let GG be a graph. The be a graph. The subdivision subdivision graphgraph SS((GG)) of of GG is the graph obtained is the graph obtained by replacing each edge by replacing each edge ee==uvuv of of GG by a by a new vertex new vertex vvee, and joining , and joining vvee to to uu and and vv..

a

b

c v

u

e.g.e.g.

每條邊上多加一點

u

vc

b

a

Page 102: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-102102

HW4HW4 (continued)(continued)ShowShow that if that if GG is any nontrivial graph, is any nontrivial graph,

then then SS((GG)) is bipartite. is bipartite.

Proof.Let V(S(G)) = V(G) D, where D={ve : eEE((GG))}Then u, vVV((GG), ), u u ~ ~ vv in in SS((GG)) and and w, xDD, , w ~ xw ~ x in in SS((GG)) So So ((VV((GG), ), DD)) is a bipartition of is a bipartition of SS((GG). ). ##

\\

Page 103: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-103103

HW9 HW9 Let Let GG be a graph with the property be a graph with the property that every edge joins an even vertex that every edge joins an even vertex and an odd vertex. Prove that and an odd vertex. Prove that GG is is bipartite.bipartite.

Proof.Proof.(Method 1) If not, (Method 1) If not, GG has an odd cycle has an odd cycle

contradiction

odd

odd

even

Page 104: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-104104

((method 2) method 2)

Let Let VV((GG)=)=VV11 VV22, ,

where where VV11 = {all even vertices}= {all even vertices}

VV22 = {all odd vertices}= {all odd vertices}

then (then (VV11, , VV22) is a bipartition of ) is a bipartition of GG..

+

Page 105: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-105105

OutlineOutline

1.1 What is a graph?1.1 What is a graph?1.2 The Degree of a Vertex1.2 The Degree of a Vertex1.3 Isomorphic Graphs1.3 Isomorphic Graphs1.4 Subgraphs1.4 Subgraphs1.5 Degree Sequences1.5 Degree Sequences1.6 Connected Graphs1.6 Connected Graphs1.7 Cut-Vertices and Bridges1.7 Cut-Vertices and Bridges1.8 Special graphs1.8 Special graphs1.9 Digraphs1.9 Digraphs

Page 106: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-106106

1.9 Digraphs1.9 Digraphs

Definition 1:Definition 1:A A digraphdigraph (or directed graph) (or directed graph) DD is a is a

finite, nonempty set finite, nonempty set VV((DD) of vertices ) of vertices and a set and a set EE((DD) of ) of ordered pairsordered pairs of of distinct vertices .distinct vertices .

The elements of The elements of EE((DD) are called ) are called arcs .arcs .

v

u

x

w

e.g.e.g.

D :D :EE((DD) ={(v,u),(u,w),) ={(v,u),(u,w), (v,w),(x,w),(w,x)} (v,w),(x,w),(w,x)}

Page 107: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-107107

Definition 2:Definition 2: The The underlying graphunderlying graph of a diagraph of a diagraph DD:: 去掉邊的方向性後得到的去掉邊的方向性後得到的 simple graphsimple graph.. (Note: becomes (Note: becomes

) )

u v

x

w

u is u is adjacent toadjacent to v vv is v is adjacent fromadjacent from u u(u,v) is (u,v) is incident fromincident from u u

and and incident toincident to v. v.

Definition 3:Definition 3:

x w

Page 108: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-108108

Definition 4:Definition 4:

v

v

outdegree of v : od v (textbook) , deg+(v)

indegree of v : id v, deg (v)

Thm 1.7: Let D be a digraph, then

|)(| )(deg )(deg)()(

DEvvDVv

-

DVv

※ Many properties are similar with simple graphs, but the length of a cycle can be 2.

Thm 1.7: Let D be a digraph, then

Page 109: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-109109

Definition 5:Definition 5:

semiwalksemiwalk : : 不管邊之方向性的不管邊之方向性的 walkwalk

W: v0 v1 v2 v3 v4 vn

…e1e2 e3 e4

(ei = (vi-1,vi) or (vi,vi-1) )

Definition 6:Definition 6:

Two vertices u and v in a digraph D Two vertices u and v in a digraph D are are connectedconnected if D contains a u-v if D contains a u-v semiwalksemiwalk..

Page 110: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-110110

Definition 7:Definition 7:① ① A diagraph D is A diagraph D is connectedconnected if every two if every two

vertices of D are connected. (also called vertices of D are connected. (also called weakly connectedweakly connected))

② ② A diagraph is (A diagraph is (單方向的單方向的 ) ) unilaterally unilaterally connectedconnected if for every two distinct if for every two distinct vertices u and v there is a u-v path or a vertices u and v there is a u-v path or a v-u path.v-u path.

③ ③ A diagraph is A diagraph is strongly connectedstrongly connected if for if for every two distinct vertices u and v there every two distinct vertices u and v there is a u-v path and a v-u path.is a u-v path and a v-u path.

Definition 8:Definition 8:

G is G is symmetricsymmetric if if

G is G is asymmetricasymmetric if if

u v v u

u vv u

Page 111: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-111111

Definition 9:Definition 9:

multidigraph : allowed multidigraph : allowed

pseudodigraph: pseudodigraph:

allowed allowed

Definition 10:Definition 10:

A digraph D in which

either

is called a tournament.

u

v

u

v

and

u v u vor

u,v V(D)(not both)

Page 112: Graph Theory Chapter 1  An Introduction to Graphs

Copyright Copyright 黃鈴玲黃鈴玲Ch1-Ch1-112112

HomeworkHomework

Exercise 1.9:Exercise 1.9:

3, 8, 10, 113, 8, 10, 11

HW3:HW3:Show that a strong (strongly Show that a strong (strongly

connected) digraph of orderconnected) digraph of order p p 2 2 contains a cycle of length contains a cycle of length nn for for some some nn 2 . 2 .