Graph Theory - PowerPoint PPT Presentation

About This Presentation
Title:

Graph Theory

Description:

Slides developed at the University of Florida for course COT3100, Applications of Discrete Structures, Spring 2001 & 2003. – PowerPoint PPT presentation

Number of Views:83
Avg rating:3.0/5.0
Slides: 55
Provided by: Mich171
Category:

less

Transcript and Presenter's Notes

Title: Graph Theory


1
Graph Theory
2
Simple Graphs
  • ??????????????????????????????????????????????????
    ??????????????????????????????????????????????????
    ???????? ???????????????????????????????????????
    ????????????? ??????????????????? ???????????????
    ???
  • ??????????????????????????????(simple graph)
    ??????????????? ??????????????????????????(symm
    etric),
  • ????????????(irreflexive)
  • ????????????? G(V,E)??????????
  • ?????????(vertices)??????? V
  • ??????????(edges)??????? E ?????????????????????
    ?????????? u,v ? V

Visual Representationof a Simple Graph
2
Department of Computer Science, Burapha University
3
Multigraphs
  • ????????????????????? ????????????????????????????
    ???????????????????
  • ????????????(multigraph) G(V, E, f )
    ??????????????????? V ,?????????? E
    ????????????fE?u,vu,v?V ? u?v
  • ???????? ???? ???????????
  • ?????????????????????????????????

???? e1 ??? e2 ??????????????????(multiple)????
parallel ??? f(e1)f(e2)
Paralleledges
3
Department of Computer Science, Burapha University
4
Pseudographs
  • ???????????????????? ?????????????????????????????
    ??????? (R ????????????????????)
  • ?????????(pseudograph) G(V, E, f )
    ??????fE?u,vu,v?V ???? e?E ???????
  • ??? f(e)u,uu
  • ???????? ???? ?????? ?????????????
  • ???????????????????????????????
  • ???????????????????????????

4
Department of Computer Science, Burapha University
5
Directed Graphs
  • ???????????????????????? R ???????????????????????
    ????
  • ???????????????(directed graph) (V,E)
    ??????????????????? V ????????????????????? E
    ????? V
  • ???????? ???? V ?????????????,E(x,y) x
    ??? y

5
Department of Computer Science, Burapha University
6
Directed Multigraphs
  • ???????????????????? ?????????????????????????????
    ???????????????????????????????????
  • ???????????????????????(directed multigraph)
    G(V, E, f ) ??????????????????? V ?????????? E
    ???????????? fE?V?V
  • ???????? ????., V???????,E???????????? WWW
    ?????????? ???????????????????????

6
Department of Computer Science, Burapha University
7
Types of Graphs Summary
7
Department of Computer Science, Burapha University
8
Graph Terminology
  • ??? G ????????????????????????????????????????? E
    ??? e?E ?????? u,v ??????? ??????????????
  • u, v ?????????(adjacent) ?????????????????(neighbo
    rs) ????????????(connected)
  • ???? e ?????????????????(incident)
    ????????????????? u ?????? v
  • ???? e ??????(connects) u ??? v ??????
  • ??? u ?????? v ???????????(endpoints) ??????? e

8
Department of Computer Science, Burapha University
9
Example
Edge incidentwith b,d
e
g
a
b
d
f
AdjacentVertices
c
9
Department of Computer Science, Burapha University
10
Degree of a Vertex
  • ??? G ?????????????????????, ??? v?V
  • ?????(degree) ??? v ???????????? deg(v),
    ?????????????????????(incident)??????????
    (?????????????????????????????????)
  • ????????????????? 0 ???????? ??????(isolated)
  • ????????????????? 1 ???????? pendant

10
Department of Computer Science, Burapha University
11
Graph Terminology
  • Example ?????????????????????????????? ?????????
    pendant ????????????????????????
    ?????????????????????????????????

Solution ??? f ????????????? ?????? a, d ??? j
???? pendant ???????????????????????????? g ????
deg(g) 5 ???????????????????
?????????(pseudograph) (??????????? ???????????)
11
Department of Computer Science, Burapha University
12
Graph Terminology
  • ???????????????????????????? ?????????????????????
    ???????????????????????????????????????????????

Result ??????????? 9 ???? ????????????????????
18 ?????????????????? ????????????????????????????
??????? ??????????????????????????????????????????
????????
12
Department of Computer Science, Burapha University
13
Handshaking Theorem
  • ??? G ????????????????????? ????????????? V
    ????????????? E ???????
  • Corollary ?????????????????????
    ????????????????????????????????????
  • ???????? ???? ???????????????? 10 ???
    ??????????????? 6 ???????????????????????????
  • ??? ????????????????????????????????? 6?10 60
    ??? Handshaking Theorem ???????? 2e 60 ???????
    ?????????????????? 30 ????

13
Department of Computer Science, Burapha University
14
Directed Degree
  • ??? G ???????????????????, v ????????????? G
  • ?????????(in-degree) ??? v, deg?(v),
    ??????????????????????????? v
  • ????????(out-degree) ??? v, deg?(v),
    ?????????????????????????? v
  • ?????(degree) ??? v, deg(v)?deg?(v)deg?(v),
    ?????????????????????????????????? v
  • Directed Handshaking Theorem ??? G
    ????????????????????????????????????? V
    ????????????????? E ???????

14
Department of Computer Science, Burapha University
15
Directed Degree
  • Example ?????????????????????????????? a, b, c,
    d ??????????????

deg-(b) 4 deg(b) 2
deg-(a) 1 deg(a) 2
deg-(d) 2 deg(d) 1
deg-(c) 0 deg(c) 2
15
Department of Computer Science, Burapha University
16
Special Graph Structures
  • ????????????????????????????????
  • Complete graphs Kn
  • Cycles Cn
  • Wheels Wn
  • n-Cubes Qn
  • Bipartite graphs
  • Complete bipartite graphs Km,n

16
Department of Computer Science, Burapha University
17
Complete Graphs
  • ????????????????? n?N, ???????????(complete
    graph) ????? n ???, Kn, ????????????????????? n
    ??? ???????????????????????????????????? ?u,v?V
    u?v?u,v?E

K1
K4
K3
K2
K5
K6
????????? Kn ?? ????
17
Department of Computer Science, Burapha University
18
Cycles
  • ?????????????? n?3, ???????????????(cycle)????? n
    ???, Cn, ???????????????????? Vv1,v2, ,vn ???
    Ev1,v2,v2,v3,,vn?1,vn,vn,v1

C3
C4
C5
C6
C8
C7
??????????????????????????? Cn?
18
Department of Computer Science, Burapha University
19
Wheels
  • ?????????????? n?3, ?????(wheel) Wn,
    ????????????????????????????????? Cn
    ?????????????? vhub ?????????? n ???? vhub,v1,
    vhub,v2,,vhub,vn

W3
W4
W5
W6
W8
W7
??????????????????????????? Wn?
19
Department of Computer Science, Burapha University
20
Bipartite Graphs
  • ????? ???? G(V,E) ???????????????(bipartite)
    ?????????? V V1 ? V2 ?????? V1nV2? ??? ?e?E
    ?v1?V1,v2?V2 ev1,v2
  • ?????????????????????????????????
  • ????????????????????????????????????????????????
  • ????????????????????????????????????????????????

V2
V1
20
Department of Computer Science, Burapha University
21
Bipartite Graphs
  • Example I ???? C3 ???????????????(bipartite)?????
    ???

No, ?????????????????????????????
??????????????????????????????????????????????????
?????
Example II ???? C6 ???????????????(bipartite)????
????
Yes, ???????????????????? C6 ?????????????????????
????????
22
Complete Bipartite Graphs
  • ?????? m,n?N, ??????????????????(complete
    bipartite graph) Km,n ?????????????????? V1
    m, V2 n, ??? E v1,v2v1?V1 ? v2?V2
  • ????????? m ???????????????? ???
  • n ??????????????? ???
  • ???????????????????????????????
  • ???????????????????????

K4,3
Km,n ?? _____ ?????? _____ ????
23
Subgraphs
  • ????????(subgraph) ??????? G(V,E) ???????
    H(W,F) ?????? W?V ??? F?E

K5
??????????? K5
24
Graph Unions
  • ??????(union) G1?G2 ???????????????? G1(V1, E1)
    ??? G2(V2,E2) ???????????????? (V1?V2, E1?E2)

?
25
Graph Representations Isomorphism
  • ??????????(Graph representations)
  • Adjacency lists
  • Adjacency matrices
  • Incidence matrices
  • ?????????????????(Graph isomorphism)
  • ?????????????????????(isomorphic) ??????????
    ?????????????????????????????????????
    ???????????????????????????????

25
Department of Computer Science, Burapha University
26
Adjacency Lists
  • ?????????? 1 ?????????????? ??????????????????????
    ?????????????????

b
a
d
c
e
f
26
Department of Computer Science, Burapha University
27
Adjacency Lists
27
Department of Computer Science, Burapha University
28
Adjacency Matrices
  • ???????? Aaij, ?????? aij ???? 1 ??? vi, vj
    ??????????????? G, ??????? 0 ?????????????????????
    ????????
  • ?????????????????? ???????????????????????????????
    1 ???????????????????????????????????????? 1 ????

28
Department of Computer Science, Burapha University
29
Adjacency Matrices
c
d
e
a
b
  • ????????? ??????????????(Adjacency matrices)
    ????????????????????? ????????????????????????

29
Department of Computer Science, Burapha University
30
30
Department of Computer Science, Burapha University
31
Incidence Matrices
  • ????? ??? G (V, E) ??????????????????????
    ?????? V n ????????????????????????? G ??????
    v1, v2, , vn ??? e1, e2, , em
  • ??????????????(incidence matrix) ??? G
    ???????????????????????????????
    ?????????????????????? 0-1 ???? n?m ???????? 1
    ?????????? (i, j) ????????? ej ????????? vi, ???
    0 ??????????????????????????
  • ??????????????? ?????????????? M mij,
  • mij 1 ????????? ej ???????????? vi mij
    0 ???????????? ej ???????????? vi

32
Incidence Matrices
e1 e2 e3 e4 e5 e6
a b c d e
e1
e6
e3
e5
e2
e4
33
Incidence Matrices
  • Example ????????????????????? M ??????? G
    ???????????????? a, b, c, d ??????? 1, 2, 3, 4,
    5, 6?

Solution
  • ????????? ???????????????????????????????????
    ?????????????????? 1?????? ???????????????????????
    ??????????????????????? ??????????????????????????
    ????????? 1 ?????????????

34
Connectivity
  • ????(path)???????????? n ?????? u ???????? v
    ????????????????????????????????? u ???????? v
  • ????????????????????????????????(circuit) ??? uv
  • ???????????????????????????????
    ?????????????(connected) ??????????
    ??????????????????????????????????????????????????
    ?
  • Yes
  • No
  • No

34
Department of Computer Science, Burapha University
35
Euler Hamilton Paths
  • ????????????(Euler circuit) ?????? G
    ???????????????????????????????????????????? G
  • ???????????????(Euler path) ?????? G
    ??????????(????)??????????????????????????????????
    ??? G
  • ????????????(Hamilton circuit) ???????????????????
    ????????????????? G ??????????????????????????
  • ???????????????(Hamilton path) ??????????(????)???
    ?????????????????????????? G ?????????????????????
    ?????

36
Euler circuit Euler path
  • ??????? ????????????(Euler path) ??????
    ??????????????????????????????????????????????????
  • ??????? ???????????? (Euler circuit) ?????? ???
    ??????????????????????????????????????????
  • ??????????????????????????????????? ????????????
    (Eulerian graph)
  • ???????? ???? G1 ??????????????( Euler path) a,
    c, d, e, b, d, a, b

a
b
c
d
e
36
Department of Computer Science, Burapha University
37
Example
  • abcdefgehia ???????? ??????????????????????
    ??????????????????????????????? bd, hd, hc ??? ci
  • ??????????????? G ???????????????? ?????????????
    G ?????????????????
  • abicbdchdefgehia

37
Department of Computer Science, Burapha University
38
Bridges of Königsberg Problem
  • ????????????????????????????????(A,B,C,D)
    ???????????????????????????????????????????
    ?????????????????????????????????????????

A
D
B
C
????????????
???????????????????????????
39
Euler Path Theorems
  • Theorem ????????????????????????(connected
    multigraph) ???????????????? ??????????
    ??????????????????????
  • Theorem ????????????????????????
    ??????????????????? (????????????????????)
    ????????????????????????? 2 ??????????????????????
    ??????
  • ??????????????????????, ??????????????????????????
    ?
  • ?????????????????????????????(Euler Circuit
    Algorithm)
  • ?????????????????
  • ???????????????????????????????
    ???????????????????????????????????????????
  • ??????????????????????????
  • ??????????????????????????????????????????????

40
Hamilton circuitHamilton path
  • ???????????? (Hamilton path) ???????
    ???????????????????????????????
    ??????????????????????????????????????
  • ???????????? (Hamilton circuit) ??????? ???
    ?????????????????????????????????
    ??????????????????????????????????????
  • ???????????? (Hamiltonian graph) ???
    ????????????????????????

40
Department of Computer Science, Burapha University
41
Hamiltonian Graph
????????????????????????????????????????????
42
Hamilton path
  • ??? G ?????????????????????????????????
  • ???? G ????????????????? abcde ???????????????????
    ????????????? G ????????????????? ??????????? de
    2 ????? ?????????????????????????????? G
    ????????????????? ??????? G ???????????????????

42
Department of Computer Science, Burapha University
43
Hamilton circuit
  • ??? G ????????????????????????????????? (?)
    ????????????????????????????????????????????????
    (?) ?????????????????????? ???????? G
    ????????????????

43
Department of Computer Science, Burapha University
44
Round-the-World Puzzle
  • ?????????????(traverse) ??????????????????????????
    ? 12 ??????????????????????????????????????????

?????????? 12 ????
?????????????????? 12 ????
45
Hamilton Paths
  • ???????????????????? ?????????????????????????????
    ??????? ??????????????????????????? ????
    ?????????????????????????? ???????????????????????
    ???????????????? ?????????????????????????????????
    ?(????)????????

46
Hamiltonian Path Theorems
  • Diracs theorem ??????? G ??????????????????????
    ???????(connected, simple)????????????? n?3 ???,
    ??????????v deg(v)?n/2, ???????? G ??????????????
  • Ores corollary ??????? G ???????????????????????
    ?????? ????????????? n3 ??? ??? deg(u)deg(v)n
    ????????????? ???u,v ???????????????????????? ,
    ???? ???? G ??????????????

46
Department of Computer Science, Burapha University
47
????????
  • ????????????? G ?????????????????????????
    ????????????????

?????? ????????????? G ??????????????????????? 5
?????????????????????????????? ??????????? 3 ????
3 5/2 ??????? G ?????????????????? ????????????
????? G ????????????????
48
Planar Graph
  • ??????? ??????????? G ??? ????????????? (planar
    graph) ????????????????????????????????? G
    ?????????????????????????????????????????????
  • ??????????????????????????????????????????????????
    ????????????????

48
49
Example
  • ????????? 3 ???? ??? ???????????3 ????
    ???????????????????????????????????????????????
    ???????? ?????? 3 ???? ???????????????????????????
    ????????????? 3 ???? ?????? ??? ????? ???????????
    ???????????????????????????????? ????????
    ???????????????? ?????????????????????????????????
    ????????????? ????????????????????????????????????
    ????????????

49
50
Graph Coloring
  • ????????????(graph coloring) ????????????????????
    ??????? ??????????????????????????????????????????
    ????????????????? ?????????????
  • Chromatic number ?????????????????????????????????
    ?????????????????????
  • ???? C5 ??????? Chromatic number ???? 3
  • ???? C4 ,C6 ??????? Chromatic number ???? 2
  • ???? ???? Cycle Cn ??????? Chromatic number ????
    3 ????? n ???????????? ?????????? Chromatic
    number ???? 2 ????? n ????????????

C6
C5
C4
50
51
Example
  • ????????????????????? Kn ???????????????????? n
    ?? ???????????????????????? K m, n ?????
    Chromatic number??? 2

51
52
The 4-color theorem
  • Chromatic number ?????????(planar graph) 4
  • The Four color theorem chromatic number
    ????????????????????????????????? 4
  • Example ???? G1 ?? chromatic number 3, ???? G2
    ?? chromatic number 4

G1
G2
52
53
Application of Graph Coloring
  • ????????????????????????????
  • ??????????????????????????????????????????????????
    ??????????????????????
  • ???????????? ?????????????????????????????????????
    ???????????????????????? 2 ???????????????????????
    ???
  • ???????????????????????????????????????????????

53
54
Example
  • ???????????????????????????????????????????????
    ???????????????????????????????????? 7 ????
    (????????????????? 1, 2,,7) ?????????????????????
    ???????????????????????? ?????????????????????????
    ??????????????????????????????????
  • 1-2, 1-3, 1-4, 1-7
  • 2-3,2-4,2-5,2-7
  • 3-4,3-6,3-7
  • 4-5,4-6
  • 5-6,5-7
  • 6-7

54
Write a Comment
User Comments (0)
About PowerShow.com