SlideShare a Scribd company logo
Graph Theory
Ch. 1. Fundamental Concept
1
Chapter 1
Fundamental Concept
1.1 What Is a Graph?
1.2 Paths, Cycles, and Trails
1.3 Vertex Degree and Counting
1.4 Directed Graphs
Graph Theory
Ch. 1. Fundamental Concept
2
The KÖnigsberg Bridge Problem
 Königsber is a city on the Pregel river in Prussia
 The city occupied two islands plus areas on both
banks
 Problem:
Whether they could leave home, cross every
bridge exactly once, and return home.
X
Y
Z
W
Graph Theory
Ch. 1. Fundamental Concept
3
A Model
 A vertex : a region
 An edge : a path(bridge) between two
regions
e1
e2
e3
e4
e6
e5
e7
Z
Y
X
W
X
Y
Z
W
Graph Theory
Ch. 1. Fundamental Concept
4
General Model
 A vertex : an object
 An edge : a relation between two objects
common
member
Committee 1 Committee 2
Graph Theory
Ch. 1. Fundamental Concept
5
What Is a Graph?
 A graph G is a triple consisting of:
– A vertex set V(G )
– An edge set E(G )
– A relation between an edge and a pair of
vertices
e1
e2
e3
e4
e6
e5
e7
Z
Y
X
W
Graph Theory
Ch. 1. Fundamental Concept
6
Loop, Multiple edges
 Loop : An edge whose endpoints are equal
 Multiple edges : Edges have the same pair of
endpoints
loop
Multiple
edges
Graph Theory
Ch. 1. Fundamental Concept
7
Simple Graph
 Simple graph : A graph has no loops or multiple
edges
loop
Multiple
edges
It is not simple. It is a simple graph.
Graph Theory
Ch. 1. Fundamental Concept
8
Adjacent, neighbors
 Two vertices are adjacent and are neighbors
if they are the endpoints of an edge
 Example:
– A and B are adjacent
– A and D are not adjacent
A B
C D
Graph Theory
Ch. 1. Fundamental Concept
9
Finite Graph, Null Graph
 Finite graph : an graph whose vertex set and
edge set are finite
 Null graph : the graph whose vertex set and
edges are empty
Graph Theory
Ch. 1. Fundamental Concept
10
Complement
 Complement of G: The complement G’ of a
simple graph G :
– A simple graph
– V(G’) = V(G)
– E(G’) = { uv | uv ∉E(G) }
G
u
v
w
x
y
G’
u
v
wx
y
Graph Theory
Ch. 1. Fundamental Concept
11
Clique and Independent set
 A Clique in a graph: a set of pairwise
adjacent vertices (a complete subgraph)
 An independent set in a graph: a set of
pairwise nonadjacent vertices
 Example:
– {x, y, u} is a clique in G
– {u, w} is an independent set G
u
v
wx
y
Graph Theory
Ch. 1. Fundamental Concept
12
Bipartite Graphs
 A graph G is bipartite if V(G) is the union of
two disjoint independent sets called partite
sets of G
 Also: The vertices can be partitioned into two
sets such that each set is independent
 Matching Problem
 Job Assignment Problem
Workers
Jobs
Boys
Girls
Graph Theory
Ch. 1. Fundamental Concept
13
Chromatic Number
 The chromatic number of a graph G,
written x(G), is the minimum number of colors
needed to label the vertices so that adjacent
vertices receive different colors
Red
Green
Blue
Blue
x(G) = 3
Graph Theory
Ch. 1. Fundamental Concept
14
Maps and coloring
 A map is a partition of the plane into
connected regions
 Can we color the regions of every map using
at most four colors so that neighboring
regions have different colors?
 Map Coloring → graph coloring
– A region → A vertex
– Adjacency → An edge
Graph Theory
Ch. 1. Fundamental Concept
15
Scheduling and graph Coloring 1
 Two committees can not hold meetings at the
same time if two committees have common
member
common
member
Committee 1 Committee 2
Graph Theory
Ch. 1. Fundamental Concept
16
Scheduling and graph Coloring 1
 Model:
– One committee being represented by a
vertex
– An edge between two vertices if two
corresponding committees have common
member
– Two adjacent vertices can not receive the
same color
common
member
Committee 1 Committee 2
Graph Theory
Ch. 1. Fundamental Concept
17
Scheduling and graph Coloring 2
 Scheduling problem is equivalent to graph
coloring problem
Common
MemberCommittee 1
Committee 2
Committee 3
Common Member
Different Color
No Common Member
Same Color OK
Same time slot OK
Graph Theory
Ch. 1. Fundamental Concept
18
Path and Cycle
 Path : a sequence of distinct vertices such
that two consecutive vertices are adjacent
– Example: (a, d, c, b, e) is a path
– (a, b, e, d, c, b, e, d) is not a path; it is a walk
 Cycle : a closed Path
– Example: (a, d, c, b, e, a) is a cycle
a b
c
de
Graph Theory
Ch. 1. Fundamental Concept
19
Subgraphs
 A subgraph of a graph G is a graph H such
that:
– V(H) ⊆ V(G) and E(H) ⊆ E(G) and
– The assignment of endpoints to edges in H is
the same as in G.
Graph Theory
Ch. 1. Fundamental Concept
20
Subgraphs
 Example: H1, H2, and H3 are subgraphs of G
c
d
a b
de
a b
c
de
H1
G
H3
H2
a b
c
de
Graph Theory
Ch. 1. Fundamental Concept
21
Connected and Disconnected
 Connected : There exists at least one path
between two vertices
 Disconnected : Otherwise
 Example:
– H1 and H2 are connected
– H3 is disconnected
c
d
a b
de
a b
c
d
eH1
H3H2
Graph Theory
Ch. 1. Fundamental Concept
22
Adjacency, Incidence, and Degree
 Assume ei is an edge whose endpoints are
(vj,vk)
 The vertices vj and vk are said to be adjacent
 The edge ei is said to be incident upon vj
 Degree of a vertex vkis the number of edges
incident upon vk. It is denoted as d(vk)
ei
vj
vk
Graph Theory
Ch. 1. Fundamental Concept
23
Adjacency matrix
 Let G = (V, E), |V| = n and |E|=m
 The adjacency matrix of G written A(G), is
the n-by-n matrix in which entry ai,j is the
number of edges in G with endpoints {vi, vj}.
a
b
c
d
e
w
x
y z
w x y z
0 1 1 0
1 0 2 0
1 2 0 1
0 0 1 0
w
x
y
z
Graph Theory
Ch. 1. Fundamental Concept
24
Incidence Matrix
 Let G = (V, E), |V| = n and |E|=m
 The incidence matrix M(G) is the n-by-m
matrix in which entry mi,j is 1 if vi is an endpoint
of ei and otherwise is 0.
a
b
c
d
e
w
x
y
z
a b c d e
1 1 0 0 0
1 0 1 1 0
0 1 1 1 1
0 0 0 0 1
w
x
y
z
Graph Theory
Ch. 1. Fundamental Concept
25
Isomorphism
 An isomorphism from a simple graph G to a
simple graph H is a bijection f:V(G)→V(H) such
that uv ∈E(G) if and only if f(u)f(v) ∈ E(H)
– We say “G is isomorphic to H”, written G ≅
H
HG
w
x z
y c d
ba
f1: w x y z
c b d a
f2: w x y z
a d b c
Graph Theory
Ch. 1. Fundamental Concept
26
Complete Graph
 Complete Graph : a simple graph whose
vertices are pairwise adjacent
Complete Graph
Graph Theory
Ch. 1. Fundamental Concept
27
Complete Bipartite Graph or Biclique
 Complete bipartite graph (biclique) is a
simple bipartite graph such that two vertices are
adjacent if and only if they are in different partite
sets.
Complete Bipartite Graph
Graph Theory
Ch. 1. Fundamental Concept
28
Petersen Graph 1.1.36
 The petersen graph is the simple graph
whose vertices are the 2-element subsets of a
5-element set and whose edges are pairs of
disjoint 2-element subsets
Graph Theory
Ch. 1. Fundamental Concept
29
Petersen Graph 1.1.37
 Assume: the set of 5-element be (1, 2, 3, 4, 5)
– Then, 2-element subsets:
(1,2) (1,3) (1,4) (1,5) (2,3) (2,4) (2,5) (3,4) (3,5)
(4,5)
Disjoint, so
connected
45: (4, 5)
12
34
15
23
45
35
13
14
24
25
Graph Theory
Ch. 1. Fundamental Concept
30
Petersen Graph 1.1.36
 Three drawings
Graph Theory
Ch. 1. Fundamental Concept
31
Theorem: If two vertices are non-adjacent in the
Petersen Graph, then they have exactly one common
neighbor. 1.1.38
Proof:
x, zx, y
No connection,
Joint, One common element.
u, v Since 5 elements totally,
5-3 elements left.
Hence, exactly one of this
kind.
3 elements in these vertices
totally
Graph Theory
Ch. 1. Fundamental Concept
32
Girth 1.1.39, 1.1.40
 Girth : the length of its shortest cycle.
– If no cycles, girth is infinite
Graph Theory
Ch. 1. Fundamental Concept
33
Girth and Petersen graph 1.1.39, 1.1.40
 Theorem: The Petersen Graph has girth 5.
Proof:
– Simple → no loop → no 1-cycle (cycle of length
1)
– Simple → no multiple → no 2-cycle
– 5 elements →no three pair-disjoint 2-sets → no
3-cycle
– By previous theorem, two nonadjacent vertices
has exactly one common neighbor → no 4-cycle
– 12-34-51-23-45-12 is a 5-cycle.
Graph Theory
Ch. 1. Fundamental Concept
34
Walks, Trails1.2.2
 A walk : a list of vertices and edges v0, e1, v1,
…., ek, vk such that, for 1 ≤ i ≤ k, the edge ei
has endpoints vi-1 and vi.
 A trail : a walk with no repeated edge.
Graph Theory
Ch. 1. Fundamental Concept
35
Paths 1.2.2
 A u,v-walk or u,v-trail has first vertex u and last
vertex v; these are its endpoints.
 A u,v-path: a u,v-trail with no repeated vertex.
 The length of a walk, trail, path, or cycle is its
number of edges.
 A walk or trail is closed if its endpoints are
the same.
Graph Theory
Ch. 1. Fundamental Concept
36
Lemma: Every u,v-walk contains a u,v-path 1.2.5
Proof:
 Use induction on the length of a u, v-walk W.
 Basis step: l = 0.
– Having no edge, W consists of a single vertex
(u=v).
– This vertex is a u,v-path of length 0.
to be continued
Graph Theory
Ch. 1. Fundamental Concept
37
Lemma: Every u,v-walk contains a u,v-path 1.2.5
Proof: Continue
 Induction step : l ≥ 1.
– Suppose that the claim holds for walks of
length less than l.
– If W has no repeated vertex, then its vertices
and edges form a u,v-path.
Graph Theory
Ch. 1. Fundamental Concept
38
Lemma: Every u,v-walk contains a u,v-path 1.2.5
Proof: Continue
 Induction step : l ≥ 1. Continue
– If W has a repeated vertex w, then deleting the
edges and vertices between appearances of w
(leaving one copy of w) yields a shorter u,v-
walk W’ contained in W.
– By the induction hypothesis, W ’ contains a
u,v-path P,and this path P is contained in W.
u
v
W
P
Delete
Graph Theory
Ch. 1. Fundamental Concept
39
Components 1.2.8
 The components of a graph G are its
maximal connected subgraphs
 A component (or graph) is trivial if it has no
edges; otherwise it is nontrivial
 An isolated vertex is a vertex of degree 0
r
q
s u v w
t p x
y z
Graph Theory
Ch. 1. Fundamental Concept
40
Proof:
– An n-vertex graph with no edges has n
components
– Each edge added reduces this by at most 1
– If k edges are added, then the number of
components is at least n - k
Theorem: Every graph with n vertices and k
edges has at least n-k components 1.2.11
Graph Theory
Ch. 1. Fundamental Concept
41
Theorem: Every graph with n vertices and k edges
has at least n-k components 1.2.11
 Examples:
n =2, k =1,
1 component
n =3, k =2,
1 component
n =6, k =3,
3 components
n =6, k =3,
4 components
Graph Theory
Ch. 1. Fundamental Concept
42
Cut-edge, Cut-vertex 1.2.12
 A cut-edge or cut-vertex of a graph is an
edge or vertex whose deletion increases the
number of components
Not a Cut-vertexCut-edge
Cut-edge
Cut-vertex
Graph Theory
Ch. 1. Fundamental Concept
43
Cut-edge, Cut-vertex 1.2.12
 G-e or G-M : The subgraph obtained by
deleting an edge e or set of edges M
 G-v or G-S : The subgraph obtained by
deleting a vertex v or set of vertices S
e
G-eG
Graph Theory
Ch. 1. Fundamental Concept
44
Induced subgraph 1.2.12
 An induced subgraph :
– A subgraph obtained by deleting a set of
vertices
– We write G[T] for G-T’, where T’ =V(G)-T
– G[T] is the subgraph of G induced by T
 Example:
– Assume T:{A, B, C, D}
BA
C D
E
BA
C D
G[T]
G
Graph Theory
Ch. 1. Fundamental Concept
45
Induced subgraph 1.2.12
 More Examples:
– G2 is the subgraph of G1 induced by
(A, B, C, D)
– G3 is the subgraph of G1 induced by (B, C)
– G4 is not the subgraph induced by (A, B, C, D)
BA
C D
E
BA
C D
B
C
BA
C D
G1 G2
G3 G4
Graph Theory
Ch. 1. Fundamental Concept
46
Induced subgraph 1.2.12
 A set S of vertices is an independent set if and
only if the subgraph induced by it has no edges.
– G3 is an example.
BA
C D
E
B
C
G1
G3
Graph Theory
Ch. 1. Fundamental Concept
47
Theorem: An edge e is a cut-edge if and only if e
belongs to no cycles. 1.2.14
Proof :1/2
 Let e= (x, y) be an edge in a graph G and H be the
component containing e.
– Since deletion of e effects no other component,
it suffices to prove that H-e is connected if and
only if e belongs to a cycle.
 First suppose that H-e is connected.
– This implies that H-e contains an x, y-path,
– This path completes a cycle with e.
Graph Theory
Ch. 1. Fundamental Concept
48
Theorem: An edge e is a cut-edge if and only if e
belongs to no cycles. 1.2.14
Proof :2/2
 Now suppose that e lies in a cycle C.
– Choose u, v∈V(H)
• Since H is connected, H has a u, v-path P
– If P does not contain e
• Then P exists in H-e
– Otherwise (P contains e)
• Suppose by symmetry that x is between u and y
on P
• Since H-e contains a u, x-path along P,
the transitivity of the connection relation implies
that H-e has a u, v-path
– We did this for all u, v ∈ V(H), so H-e is
connected.
Graph Theory
Ch. 1. Fundamental Concept
49
Theorem: An edge e is a cut-edge if and only
if e belongs to no cycles. 1.2.14
 An Example:
u
x y
e
P
C
v
Graph Theory
Ch. 1. Fundamental Concept
50
Lemma: Every closed odd walk contains an odd cycle
Proof:1/3
 Use induction on the length l of a closed odd walk W.
 l=1. A closed walk of length 1 traverses a cycle of
length 1.
 We need to prove the claim holds if it holds for
closed odd walks shorter than W.
Graph Theory
Ch. 1. Fundamental Concept
51
Lemma: Every closed odd walk contains an odd cycle
Proof: 2/3
 Suppose that the claim holds for closed odd walks shorter
than W.
 If W has no repeated vertex (other than first = last),
then W itself forms a cycle of odd length.
 Otherwise, (W has repeated vertex )
– Need to prove: If repeated, W includes a
shorter closed odd walk. By induction, the
theorem hold
Graph Theory
Ch. 1. Fundamental Concept
52
Lemma: Every closed odd walk contains an odd cycle
Proof: 3/3
– If W has a repeated vertex v, then we view W
as starting at v and break W into two v,v-walks
• Since W has odd length, one of these is odd and
the other is even. (see the next page)
• The odd one is shorter than W, by induction
hypothesis, it contains an odd cycle, and this
cycle appears in order in W
Even
v
Odd
Odd = Odd + Even
Graph Theory
Ch. 1. Fundamental Concept
53
Theorem: A graph is bipartite if and only if it has
no odd cycle. 1.2.18
 Examples:
BA
D C
A
C
B
D
A
C
B
D
F
E
A
C
B
D
E F
Graph Theory
Ch. 1. Fundamental Concept
54
Theorem: A graph is bipartite if it has no odd cycle. 1.2.18
Proof: (sufficiency1/3)
 Let G be a graph with no odd cycle.
 We prove that G is bipartite by constructing a bipartition
of each nontrivial component H.
 For each v ∈ V (H ), let f (v ) be the minimum length of a
u, v -path. Since H is connected, f (v ) is defined for
each v ∈ V (H ) .
u
v
'v
( ')f v
( )f v
Graph Theory
Ch. 1. Fundamental Concept
55
Theorem: A graph is bipartite if it has no odd cycle. 1.2.18
Proof: (sufficiency2/3)
 Let X={v ∈ V (H ): f (v ) is even} and Y={v ∈ V(H ): f (v )
is odd}
 An edge v, v’ within X (or Y ) would create a closed odd
walk using a shortest u, v-path, the edge v, v’ within X (or
Y ) and the reverse of a shortest u, v’-path.
u
v
'v
A closed odd walk using
1) a shortest u, v-path,
2) the edge v, v’ within X (or Y) , and
3) the reverse of a shortest u, v’-
path.
Graph Theory
Ch. 1. Fundamental Concept
56
Theorem: A graph is bipartite if it has no odd cycle. 1.2.18
Proof: (sufficiency3/3)
 By Lemma 1.2.15, such a walk must contain an odd
cycle, which contradicts our hypothesis
 Hence X and Y are independent sets. Also X∪Y = V(H),
so H is an X, Y-bipartite graph
u
v
'v
Even (or Odd)
Even (or Odd)
Odd Cycle
Because:
even (or odd) + even (or odd) = even
even + 1 = odd
Since no odd cycles, vv’ doesn’t
exist.
We have:
X and Y are independent sets
Graph Theory
Ch. 1. Fundamental Concept
57
Theorem: A graph is bipartite only if it has no
odd cycle. 1.2.18
Proof: (necessity)
 Let G be a bipartite graph.
 Every walk alternates between the two sets of a
bipartition
 So every return to the original partite set
happens after an even number of steps
 Hence G has no odd cycle
Graph Theory
Ch. 1. Fundamental Concept
58
Eulerian Circuits 1.2.24
 A graph is Eulerian if it has a closed trail
containing all edges.
 We call a closed trail a circuit when we do
not specify the first vertex but keep the list in
cyclic order.
 An Eulerian circuit or Eulerian trail in a
graph is a circuit or trail containing all the
edges.
Graph Theory
Ch. 1. Fundamental Concept
59
Even Graph, Even Vertex1.2.24
 An even graph is a graph with vertex
degrees all even.
 A vertex is odd [even] when its degree is odd
[even].
Graph Theory
Ch. 1. Fundamental Concept
60
Maximal Path1.2.24
 A maximal path in a graph G is a path P in
G that is not contained in a longer path.
– When a graph is finite, no path can extend
forever , so maximal (non-extendible) paths
exist.
Graph Theory
Ch. 1. Fundamental Concept
61
Lemma: If every vertex of graph G has degree at
least 2, then G contains a cycle. 1.2.25
Proof:
 Let P be a maximal path in G, and let u be an endpoint of P
 Since P cannot be extended, every neighbor of u must
already be a vertex of P
 Since u has degree at least 2, it has a neighbor v in V (P )
via an edge not in P
 The edge uv completes a cycle with the portion of P from v
to u
uP
Impossible
v
P
u
Must
Graph Theory
Ch. 1. Fundamental Concept
62
Theorem: A graph G is Eulerian if and only if it has at most one
nontrivial component and its vertices all have even degree. 1.2.26
Proof: (Necessity)
 Suppose that G has an Eulerian circuit C
 Each passage of C through a vertex uses two
incident edges
 And the first edge is paired with the last at the first
vertex
 Hence every vertex has even degree
In
Out
Start (The 1st
)
End (The last)
Graph Theory
Ch. 1. Fundamental Concept
63
Theorem: A graph G is Eulerian if and only if it has at most one
nontrivial component and its vertices all have even degree. 1.2.26
Proof: (Necessity)
 Also, two edges can be in the same trail only
when they lie in the same component, so there
is at most one nontrivial component.
Component 1 Component 2
If more than one components,
can’t walk across the graph
Graph Theory
Ch. 1. Fundamental Concept
64
Theorem: A graph G is Eulerian if and only if it has at most
one nontrivial component and its vertices all have even
degree 1.2.26
Proof: (Sufficiency 1/3)
 Assuming that the condition holds, we obtain an
Eulerian circuit using induction on the number
of edges, m
 Basis step: m= 0. A closed trail consisting of
one vertex suffices →
Graph Theory
Ch. 1. Fundamental Concept
65
Theorem: A graph G is Eulerian if and only if it has at most one
nontrivial component and its vertices all have even degree. 1.2.26
Proof: (Sufficiency 2/3)
 Induction step: m>0.
– When even degrees, each vertex in the nontrivial
component of G has degree at least 2.
– By Lemma 1.2.25, the nontrivial component has a
cycle C.
– Let G’ be the graph obtained from G by deleting
E(C).
– Since C has 0 or 2 edges at each vertex, each
component of G’ is also an even graph.
– Since each component is also connected and has
fewer than m edges, we can apply the induction
hypothesis to conclude that each component of G’
has an Eulerian circuit. →
Graph Theory
Ch. 1. Fundamental Concept
66
Theorem: A graph G is Eulerian if and only if it has at most one
nontrivial component and its vertices all have even degree. 1.2.26
Proof: (Sufficiency 3/3)
 Induction step: m>0. (continued)
– To combine these into an Eulerian circuit of G,
we traverse C, but when a component of G’ is
entered for the first time we detour along an
Eulerian circuit of that component.
– This circuit ends at the vertex where we
began the detour. When we complete the
traversal of C, we have completed an Eulerian
circuit of G.
Graph Theory
Ch. 1. Fundamental Concept
67
Proposition: Every even graph decomposes into cycles1.2.27
Proof:
 In the proof of Theorem 1.2.26
– It is noted that every even nontrivial graph
has a cycle
– The deletion of a cycle leaves an even
graph
 Thus this proposition follows by induction on
the number of edges
Graph Theory
Ch. 1. Fundamental Concept
68
Proposition: If G is a simple graph in which every vertex has
degree at least k, then G contains a path of length at least k.
If k≥2, then G also contains a cycle of length at least k+1.
1.2.28
Proof: (1/2)
 Let u be an endpoint of a maximal path P in G.
 Since P does not extend, every neighbor of u
is in V(P).
 Since u has at least k neighbors and G is
simple, P therefore has at least k vertices
other than u and has length at least k.
Graph Theory
Ch. 1. Fundamental Concept
69
Proposition: If G is a simple graph in which every vertex has
degree at least k, then G contains a path of length at least k.
If k≥2, then G also contains a cycle of length at least k+1.
1.2.28
Proof: (2/2)
 If k ≥ 2, then the edge from u to its farthest
neighbor v along P completes a sufficiently
long cycle with the portion of P from v to u.
u
v
d(u) ≥ k
At least k+1 vertices
Length ≥ k
Graph Theory
Ch. 1. Fundamental Concept
70
Degree1.3.1
 The degree of vertex v in a graph G, written
or d (v ), is the number of edges incident
to v, except that each loop at v counts twice
 The maximal degree is ∆(G )
 The minimum degree is δ (G )
A
C
B
D
F
E
d(B) = 3, d(C) = 2
Δ(G) = 3, δ(G) = 2
G
Graph Theory
Ch. 1. Fundamental Concept
71
Regular 1.3.1
 G is regular if ∆(G ) = δ (G )
 G is k-regular if the common degree is k.
 The neighborhood of v, written Ng (v ) or N (v )
is the set of vertices adjacent to v.
3-regular
Graph Theory
Ch. 1. Fundamental Concept
72
Order and size 1.3.2
 The order of a graph G, written n (G ), is the
number of vertices in G.
 An n-vertex graph is a graph of order n.
 The size of a graph G, written e (G ), is the
number of edges in G.
 For n∈N, the notation [n ] indicates the set
{1,…, n }.
Graph Theory
Ch. 1. Fundamental Concept
73
Proposition: (Degree-Sum Formula)
If G is a graph, then Σv∈V(G)d(v) = 2e(G) 1.3.3
Proof:
 Summing the degrees counts each edge twice,
– Because each edge has two ends and
contributes to the degree at each endpoint.
Graph Theory
Ch. 1. Fundamental Concept
74
Theorem: If k>0, then a k-regular bipartite graph has
the same number of vertices in each partite set. 1.3.9
Proof:
 Let G be an X,Y - bigraph.
 Counting the edges according to their
endpoints in X yields e (G ) = k |X |.
d (x) = k
x
Graph Theory
Ch. 1. Fundamental Concept
75
Theorem: If k>0, then a k-regular bipartite graph has
the same number of vertices in each partite set. 1.3.9
Proof:
 Counting them by their endpoints in Y yields
e (G )=k |Y |
 Thus k |X | = k |Y |, which yields |X |=|Y | when
k > 0
d (x) = k
x
d (y) = ky
Graph Theory
Ch. 1. Fundamental Concept
76
A technique for counting a set 1/3 1.3.10
 Example: The Petersen graph has ten 6-cycles
– Let G be the Petersen graph.
– Being 3-regular, G has ten copies of K1,3(claw). We
establish a one-to-one correspondence between the
6-cycles and the claws.
– Since G has girth 5, every 6-cycle F is an induced
subgraph.
• see below
– Each vertex of F has one neighbor outside F.
• d(v)= 3, v ∈V(G)
If Existing, Girth =3.
But Girth=5 so no such an edge
Graph Theory
Ch. 1. Fundamental Concept
77
A technique for counting a set 2/3 1.3.10
– Since nonadjacent vertices have exactly one
common neighbor (Proposition 1.1.38), opposite
vertices on F have a common neighbor outside F.
– Since G is 3-regular, the resulting three vertices
outside F are distinct.
– Thus deleting V(F) leaves a subgraph with three
vertices of degree 1 and one vertex of degree 3; it
is a claw.
Common neighbor
of opposite vertices
If the neighbors are
not distinct, d(v)>3
Graph Theory
Ch. 1. Fundamental Concept
78
A technique for counting a set 3/3 3.10
– It is shown that each claw H in G arises exactly
once in this way.
– Let S be the set of vertices with degree 1 in H; S is
an independent set.
– The central vertex of H is already a common
neighbor, so the six other edges from S reach
distinct vertices.
– Thus G-V(H) is 2-regular. Since G has girth 5, G-
V(H) must be a 6-cycle. This 6-cycle yields H when
its vertices are deleted.
Graph Theory
Ch. 1. Fundamental Concept
79
Proposition: The minimum number of edges in a connected
graph with n vertices is n-1. 3.13
Proof:
 By proposition 1.2.11, every graph with n
vertices and k edges has at least n-k
components.
 Hence every n-vertex graph with fewer than n-1
edges has at least two components and is
disconnected.
 The contrapositive of this is that every
connected n-vertex graph has at least n-1
edges. This lower bound is achieved by the
path Pn.
Graph Theory
Ch. 1. Fundamental Concept
80
Theorem: If G is simple n-vertex graph with
δ(G)≥(n-1)/2, then G is connected. 1.3.15
Proof: 1/2
 Choose u,v ∈ V (G ).
 It suffices to show that u,v have a common
neighbor if they are not adjacent.
 Since G is simple, we have
|N(u) | ≥ δ (G ) ≥ (n-1)/2,
and similarly for v.
– Recall: δ (G ) is the minimum degree,
|N(u)| = d(u) Hence: |N(u) | ≥ δ (G )
Graph Theory
Ch. 1. Fundamental Concept
81
Theorem: If G is simple n-vertex graph with
δ(G)≥(n-1)/2, then G is connected. 1.3.15
Proof: 2/2
 When u and v are not connected, we have |N(u
) ∪N(v )| ≤ n - 2
– since u and v are not in the union
 Using Remark A.13 of Appendix A, we thus
compute
| ( ) ( )| | ( )| | ( )| | ( ) ( )|
1 1 ( 2) 1.
2 2
N u N v N u N v N u N v
n n n
∩ = + − ∪
− −≥ + − − =
Graph Theory
Ch. 1. Fundamental Concept
82
Theorem: Every loopless graph G has a bipartite
subgraph with at least e(G)/2 edges. 1.3.19
Proof:
 Partition V(G) into two sets X, Y.
 Using the edges having one endpoint in each set yields
a bipartite subgraph H with bipartition X, Y.
 If H contains fewer than half the edges of G incident to
a vertex v, then v has more edges to vertices in its own
class than in the other class, as illustrated bellow.
Graph Theory
Ch. 1. Fundamental Concept
83
Proof: 2/2
 Moving v to the other class gains more edges of
G than it loses.
 Using Iterative improvement approach
 When it terminates, we have dH(v) ≥ dG(v)/2 for
every v∈V(G) .
 Summing this and applying the degree-sum
formula yields e(H) ≥ e(G)/2.
Theorem: Every loopless graph G has a bipartite
subgraph with at least e(G)/2 edges. 1.3.19
Graph Theory
Ch. 1. Fundamental Concept
84
Example1 1.3.20
 The algorithm in Theorem 1.3.19 need not
produce a bipartite subgraph with the most
edges, merely one with at least half the edges
– Local Maximum
Graph Theory
Ch. 1. Fundamental Concept
85
Example2 1.3.20
 Consider the graph in the next page.
– It is 5-regular with 8 vertices and hence has
20 edges.
– The bipartition X={a,b,c,d} and Y={e,f,g,h}
yields a 3-regular bipartite subgraph with 12
edges.
– The algorithm terminates here:
• switching one vertex would pick up two
edges but lose three .
Graph Theory
Ch. 1. Fundamental Concept
86
Example(Cont.) 1.3.20
a
b
c
de
f
g
h switching a would pick
up two edges but lose
three
Graph Theory
Ch. 1. Fundamental Concept
87
Example 1.3.20
 Nevertheless, the bipartition X={a,b,g,h} and
Y={c,d,e,f} yields a 4-regular bipartite subgraph
with 16 edges.
 An algorithm seeking the maximal by local
changes may get stuck in a local maximum.
a
b
c
de
f
g
h a
b
c
de
f
g
hLocal
Maximum
Global
Maximum
Graph Theory
Ch. 1. Fundamental Concept
88
Theorem: The maximum number of edges in an n-
vertex triangle free simple graph is  n2
/4  1.3.23
Proof : 1/6
– Let G be an n-vertex triangle-free simple graph.
– Let x be a vertex of maximum degree and d(x)=k.
– Since G has no triangles, there are no edges
among neighbors of x.
No edges between
neighbors of x
Graph Theory
Ch. 1. Fundamental Concept
89
Theorem: The maximum number of edges in an n-
vertex triangle free simple graph is  n2
/4  1.3.23
Proof : 2/6
– Hence summing the degrees of x and its
nonneighbors counts at least one endpoint
of every edge: Σv∉N(x)d(v) ≥ e(G).
– We sum over n-k vertices, each having
degree at most k, so e(G) ≤ (n-k)k
Graph Theory
Ch. 1. Fundamental Concept
90
)(xN
x x
)(xN
Doesn’t exist
• Σv∉N(x) d(v) counts at least
one endpoint of every edge
At most k vertices
At least n-k vertices
No edges exist
Theorem: The maximum number of edges in an n-
vertex triangle free simple graph is  n2
/4  1.3.23
Proof: 3/6
Graph Theory
Ch. 1. Fundamental Concept
91
Proof: 4/6
– Since (n-k)k counts the edges in Kn-k, k, we have
now proved that e(G) is bounded by the size
of some biclique with n vertices.
• i.e. e(G) ≤ (n-k)k = |the edges in Kn-k,k|
Theorem: The maximum number of edges in an n-
vertex triangle free simple graph is  n2
/4  1.3.23
n-k k
Graph Theory
Ch. 1. Fundamental Concept
92
Proof: 5/6
– Moving a vertex of Kn-k,k from the set of size k
to the set of size n-k gains k-1 edges and
loses n-k edges.
– The net gain is 2k-1-n, which is positive for
2k>n+1 and negative for 2k<n+1.
– Thus e(Kn-k, k) is maximized when k is n/2  or
n/2 .
Theorem: The maximum number of edges in an n-
vertex triangle free simple graph is  n2
/4  1.3.23
n-k k
Graph Theory
Ch. 1. Fundamental Concept
93
Proof: 6/6
– The product is then n2
/4 for even n and (n2
-1)/4
for odd n. Thus e(G) ≤ n2
/4 .
– The bound is best possible.
• It is seen that a triangle-free graph with n2
/4
edges is: Kn/2,n/2.
Theorem: The maximum number of edges in an n-
vertex triangle free simple graph is  n2
/4  1.3.23
Graph Theory
Ch. 1. Fundamental Concept
94
Degree sequence 1.3.27
 The Degree Sequence of a graph is the list of
vertex degrees, usually written in non-
increasing order, as d1≥ …. ≥ dn .
 Example:
z
y
x
w
v
Degree sequence:
d(w), d(x), d(y), d(z), d(v)
Graph Theory
Ch. 1. Fundamental Concept
95
Proposition: The nonnegative integers d1 ,…, dn are the
vertex degrees of some graph if and only if ∑di is even.
1.3.28
Proof: ½ Necessity
 When some graph G has these numbers as its
vertex degrees, the degree-sum formula implies
that ∑di = 2e (G), which is even.
Graph Theory
Ch. 1. Fundamental Concept
96
Proof: 2/2 Sufficiency
 Suppose that ∑ di is even.
 We construct a graph with vertex set v1,…,vn and d(vi) = di
for all i.
 Since ∑ di is even, the number of odd values is even.
 First form an arbitrary pairing of the vertices in {vi : di is
odd}.
 For each resulting pair, form an edge having these two
vertices as its endpoints
 The remaining degree needed at each vertex is even and
nonnegative; satisfy this for each i by placing [di /2] loops
at vi
Proposition: The nonnegative integers d1 ,…, dn are the
vertex degrees of some graph if and only if ∑di is even.
1.3.28
Graph Theory
Ch. 1. Fundamental Concept
97
Graphic Sequence 1.3.29
 A graphic sequence is a list of nonnegative
numbers that is the degree sequence of
some simple graph.
 A simple graph “realizes” d.
– means: A simple graph with degree
sequence d.
Graph Theory
Ch. 1. Fundamental Concept
98
Recursive condition 1.3.30
 The lists (2, 2, 1, 1) and (1, 0, 1) are graphic. The graphic
K2+K1 realizes 1, 0, 1.
 Adding a new vertex adjacent to vertices of degrees 1
and 0 yields a graph with degree sequence 2, 2, 1, 1, as
shown below.
 Conversely, if a graph realizing 2, 2, 1, 1 has a vertex w
with neighbors of degrees 2 and 1, then deleting w
yields a graph with degrees 1, 0, 1.
w
K2
K1
1
1
0
1 1
2
2
Graph Theory
Ch. 1. Fundamental Concept
99
Recursive condition 1.3.30
 Similarly, to test 33333221, we seek a
realization with a vertex w of degree 3 having
three neighbors of degree 3.
3 3 3 3 3 2 2 1
2 2 2 3 2 2 1
Delete this
Vertex
A new
degree sequence
Graph Theory
Ch. 1. Fundamental Concept
100
Recursive condition 1.3.30
This exists if and only if 2223221 is graphic. (See next page)
– We reorder this and test 3222221.
– We continue deleting and reordering until we can
tell whether the remaining list is realizable.
– If it is, then we insert vertices with the desired
neighbors to walk back to a realization of the
original list.
– The realization is not unique.
 The next theorem implies that this recursive test works.
Graph Theory
Ch. 1. Fundamental Concept
101
Recursive condition 1.3.30
33333221 3222221 221111
11100
2223221 111221 10111
wv
u u
v
u
Graph Theory
Ch. 1. Fundamental Concept
102
Theorem. For n>1, an integer list d of size n is graphic if and
only if d’ is graphic, where d’ is obtained from d by deleting
its largest element ∆ and subtracting 1 from its ∆ next largest
elements. The only 1-element graphic sequence is d1=0. 1.3.31
Proof: 1/6
 For n =1, the statement is trivial.
 For n >1, we first prove that the condition is sufficient.
– Give d with d1≥…..≥dn and a simple graph G’ with
degree sequence d’
For Example:
We have: 1) d = 33333221
2) G’ with d’ = 2223221
We show: d is graphic
G’
Graph Theory
Ch. 1. Fundamental Concept
103
Theorem. For n>1, an integer list d of size n is graphic if and
only if d’ is graphic, where d’ is obtained from d by deleting
its largest element ∆ and subtracting 1 from its ∆ next largest
elements. The only 1-element graphic sequence is d1=0. 1.3.31
Proof: 2/6
– We add a new vertex adjacent to vertices in G’ with
degrees d2-1,…..,d∆+1-1.
– These di are the ∆ largest elements of d after (one
copy of) ∆ itself,
– Note : d2-1,…..,d∆+1-1 need not be the ∆ largest
numbers in d’ (see example in previous page)
G’
New added
vertex
d : d1,d2,… dn
d’ : d2-1,…..,d∆+1-1,… dn
May not be the ∆
largest numbers
Graph Theory
Ch. 1. Fundamental Concept
104
Theorem 1.3.31 continue
 To prove necessity, 3/6
– Given a simple graph G realizing d , we produce a
simple graph G’ realizing d’
– Let w be a vertex of degree ∆ in G, and let S be a
set of ∆ vertices in G having the “desired degrees”
d2,…..,d∆+1
d : d1, d2, …d∆, d∆+1,… dn
S: ∆ verticesd1=∆
w
Graph Theory
Ch. 1. Fundamental Concept
105
Theorem 1.3.31
Proof: continue 4/6
– If N(w)=S, then we delete w to obtain G’.
d : d1, d2, …d∆, d∆+1,… dn
∆Vertices, N(w)=S
i.e. They are connected to w
d1=∆
w
Delete w than we have
d’ : d2-1,…..,d∆+1-1,… dn
Graph Theory
Ch. 1. Fundamental Concept
106
Theorem 1.3.31
Proof: continue 5/6
– Otherwise,
• Some vertex of S is missing from N(w).
• In this case, we modify G to increase |N(w)∩S| without
changing any vertex degree.
• Since |N(w)∩S| can increase at most ∆ times, repeating
this converts G into another graph G* that realizes d and
has S as the neighborhood of w.
• From G* we then delete w to obtain the desired graph
G’ realizing d’.
d : d1, d2, …d∆, d∆+1,… dn
∆Vertices, N(w)≠S
i.e. Some vertices are not connected to w.
- We make them become connected to w
without changing their degree.
d1=∆
w
Graph Theory
Ch. 1. Fundamental Concept
Theorem 1.3.31
Proof: continue 6/6
• To find the modification when N(w)≠S , we choose
x∈S and z∉S so that w z are connected and w x are
not.
• We want to add wx and delete wz, but we must
preserve vertex degrees. Since d(x)>d(z) and already
w is a neighbor of z but not x, there must be a vertex y
adjacent to x but not to z. Now we delete {wz,xy} and
add {wx,yz} to increase |N(w)∩S| .
w
z
x
y
This y must exist.
w
z
x
y⇒
It becomes connected w
Graph Theory
Ch. 1. Fundamental Concept
108
2-switch 1.3.32
 A 2-switch is the replacement of a pair of
edges xy and zw in a simple graph by the
edges yz and wx, given that yz and wx did not
appear in the graph originally.
wx
y z y z
wx
Graph Theory
Ch. 1. Fundamental Concept
109
Theorem: If G and H are two simple graphs with vertex set V,
then dG(v)=dH(v) for every v∈V if and only if there is a
sequence of 2-switches that transforms G into H. 1.3.33
Proof:
 Every 2-switch preserves vertex degrees, so
the condition is sufficient.
 Conversely, when dG(v)=dH(v) for all v∈V , we
obtain an appropriate sequence of 2-switches
by induction on the number of vertices, n.
 If n<3, then for each d1,…..,dn there is at most
one simple graph with d(vi)=di.
 Hence we can use n=3 as the basis step.
Graph Theory
Ch. 1. Fundamental Concept
110
Theorem. 1.3.33 (Continue)
 Consider n≥4 , and let w be a vertex of maximum
degree,∆
 Let S={v1,…..,v∆} be a fixed set of vertices with the ∆
highest degrees other than w
 As in the proof of Theorem 1.3.31, some sequence
of 2-switches transforms G to a graph G* such that
NG*(w)=S, and some such sequence transforms H to
a graph H* such that NH*(w)=S
 Since NG*(w)=NH*(w), deleting w leaves simple graphs
G’=G*-w and H’=H*-w with dG’(v)=dH’(v) for every
vertex v
Graph Theory
Ch. 1. Fundamental Concept
111
Theorem. 1.3.33 Continue
 By the induction hypothesis, some sequence of 2-
switches transforms G’ to H’. Since these do not
involve w, and w has the same neighbors in G* and
H*, applying this sequence transforms G* to H*.
 Hence we can transform G to H by transforming G to
G*, then G* to H*, then (in reverse order) the
transformation of H to H*.
Graph Theory
Ch. 1. Fundamental Concept
112
Directed Graph and Its edges 1.4.2
 A directed graph or digraph G is a triple:
– A vertex set V(G),
– An edge set E(G), and
– A function assigning each edge an ordered pair of
vertices.
• The first vertex of the ordered pair is the tail of the
edge
• The second is the head
• Together, they are the endpoints.
 An edge is said to be from its tail to its head.
– The terms “head” and “tail” come from the arrows
used to draw digraphs.
Graph Theory
Ch. 1. Fundamental Concept
113
Directed Graph and its edges 1.4.2
 As with graphs, we
– assign each vertex a point in the plane and
– each edge a curve joining its endpoints.
 When drawing a digraph, we give the curve a direction
from the tail to the head.
Graph Theory
Ch. 1. Fundamental Concept
114
Directed Graph and its edges 1.4.2
 When a digraph models a relation, each ordered pair is
the (head, tail) pair for at most one edge.
– In this setting as with simple graphs, we ignore the
technicality of a function assigning endpoints to edges
and simply treat an edge as an ordered pair of
vertices.
Graph Theory
Ch. 1. Fundamental Concept
115
Loop and multiple edges in directed graph 1.4.3
 In a graph, a loop is an edge whose endpoints are
equal.
 Multiple edges are edges having the same ordered
pair of endpoints.
 A digraph is simple if each ordered pair is the head
and tail of the most one edge; one loop may be present
at each vertex.
Loop
Multiple
edges
Graph Theory
Ch. 1. Fundamental Concept
116
Loop and multiple edges in directed graph 1.4.3
 In the simple digraph, we write uv for an edge
with tail u and head v.
– If there is an edge form u to v, then v is a
successor of u, and u is a predecessor of
v.
– We write u→v for “there is an edge from u to
v”.
Predecessor
Successor
Graph Theory
Ch. 1. Fundamental Concept
117
Path and Cycle in Digraph 1.4.6
 A digraph is a path if it is a simple digraph
whose vertices can be linearly ordered so that
there is an edge with tail u and head v if and
only if v immediately follows u in the vertex
ordering.
 A cycle is defined similarly using an ordering
of the vertices on the cycle.
Graph Theory
Ch. 1. Fundamental Concept
118
Underlying graph 1.4.9
 The underlying graph of a digraph D:
– the graph G obtained by treating the edges of
D as unordered pairs;
– the vertex set and edges set remain the
same, and the endpoints of an edge are the
same in G as in D,
– but in G they become an unordered pair.
The underlying GraphA digraph
Graph Theory
Ch. 1. Fundamental Concept
119
Underlying graph 1.4.9
 Most ideals and methods of graph theorem
arise in the study of ordinary graphs.
 Digraphs can be a useful additional tool,
especially in applications
 When comparing a digraph with a graph, we
usually use G for the graph and D for the
digraph. When discussing a single digraph, we
often use G.
Graph Theory
Ch. 1. Fundamental Concept
120
Adjacency Matrix and Incidence Matrix
of a Digraph 1.4.10
 In the adjacency matrix A(G) of a digraph
G, the entry in position i, j is the number of
edges from vi to vj.
 In the incidence matrix M(G) of a loopless
digraph G, we set mi,j=+1 if viis the tail of ejand
mi,j= -1 if viis the head of ej.
Graph Theory
Ch. 1. Fundamental Concept
121
Example of adjacency matrix 1.4.11
 The underlying graph of the digraph below is the
graph of Example 1.1.19; note the similarities and
differences in their matrices.












0000
1010
0101
0100












−
++−−
−++
+−
10000
11110
01101
00011
w x y z
w
x
y
z
w
x
y
z
a b c d e
)(GA G )(GM
a
b
ec
d
w
x
y z
Graph Theory
Ch. 1. Fundamental Concept
122
Connected Digraph 1.4.12
 To define connected digraphs, two options
come to mind. We could require only that
the underlying graph be connected.
 However, this does not capture the most
useful sense of connection for digraphs.
Graph Theory
Ch. 1. Fundamental Concept
123
Weakly and strongly connected digraphs 1.4.12
 A graph is weakly connected if its
underlying graph is connected.
 A digraph is strongly connected or
strong if for each ordered pair u,v of vertices,
there is a path from u to v.
Graph Theory
Ch. 1. Fundamental Concept
124
Eulerian Digraph 1.4.22
 An Eulerian trail in digraph (or graph) is a
trail containing all edges.
 An Eulerian circuit is a closed trail
containing all edges.
 A digraph is Eulerian if it has an Eulerian
circuit.
Graph Theory
Ch. 1. Fundamental Concept
125
Lemma. If G is a digraph with δ+
(G)≥1, then G
contains a cycle. The same conclusion holds
when δ-
(G) ≥1. 1.4.23
Proof.
 Let P be a maximal path in G, and u be the last
vertex of P.
 Since P cannot be extended, every successor of
u must already be a vertex of P.
 Since δ+
(G)≥1, u has a successor v on P.
 The edge uv completes a cycle with the portion
of P from v to u.
Graph Theory
Ch. 1. Fundamental Concept
126
Theorem: A digraph is Eulerian if and only if
d+
(v)=d-
(v) for each vertex v and the
underlying graph has at most one nontrivial
component. 1.4.24
Graph Theory
Ch. 1. Fundamental Concept
127
De Bruijn cycles 1.4.25
 Application:
– There are 2n
binary strings of length n.
– Is there a cyclic arrangement of 2n
binary digits such
that the 2n
strings of n consecutive digitals are all
distinct?
– Example: For n =4, (0000111101100101) works.
0000 0001 0011 0111 1111 1110 1101 1011 …
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
Graph Theory
Ch. 1. Fundamental Concept
128
De Bruijn cycles 1.4.25
 We can use such an arrangement to keep track of the
position of a rotating drum.
– One drum has 2n
rotational positions.
– A band around the circumference is split into 2n
portions that can be coded 0 or 1.
– Sensors read n consecutive portions.
– If the coding has the property specified above, then
the position of the drum is determined by the string
read by the sensors.
Graph Theory
Ch. 1. Fundamental Concept
129
De Bruijn cycles 1.4.25
 To obtain such a circular arrangement,
– define a digraph Dnwhose vertices are the
binary (n-1)-tuples.
– Put an edge from a to b if the last n-2 entries
of a agree with the first n-2 entries of b.
– Label the edge with the last entry of b.
Graph Theory
Ch. 1. Fundamental Concept
130
De Bruijn cycles 1.4.25
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
0 0
0
0
0
0
0
1
1
1
1
1 1
1
1
001
000
100
010 101
011
110
111
a b
Put an edge from a to b if the last n-2
entries of a agree with the first n-2
entries of b.
Label the edge with the last entry of
b.
 Below we show D4..
Graph Theory
Ch. 1. Fundamental Concept
131
De Bruijn cycles 1.4.25
 We next prove that Dn is Eulerian and show how
an Eulerian circuit yields the desired circular
arrangement.
Graph Theory
Ch. 1. Fundamental Concept
132
Theorem. The digraph Dn of Application 1.4.25 is Eulerian, and
the edge labels on the edges in any Eulerian circuit of Dn form
a cyclic arrangement in which the 2n
consecutive segments of
length n are distinct. 1.4.26
Proof:
 We show
– first that Dn is Eulerian.
– Then the labels on the edges in any
Eulerian circuit of Dn form a cyclic
arrangement in which the 2n
consecutive
segments of length n are distinct.
Graph Theory
Ch. 1. Fundamental Concept
133
Theorem. The digraph Dn is Eulerian 1.4.26
Proof: 1/2
 Every vertex has out-degree 2
– because we can append a 0 or a 1 to its name to obtain
the name of a successor vertex.
 Similarly, every vertex has in-degree 2,
– because the same argument applies when moving in
reverse and putting a 0 or a 1 on the front of the name.
001
101
011
110
111
Graph Theory
Ch. 1. Fundamental Concept
134
Theorem. The digraph Dn is Eulerian 1.4.26
Proof: 2/2
 Also, Dn is strongly connected,
– because we can reach the vertex b=(b1,…..,bn-1)
from any vertex by successively follows the
edges labeled b1,…..,bn-1.
 Thus Dn satisfies the hypotheses of Theorem
1.4.24 and is Eulerian.
0
0 0
0
0
0
0
0
1
1
1
1 1
1
1
001
000
100
010 101
011
110
111
a b1
1
Graph Theory
Ch. 1. Fundamental Concept
135
Theorem. The labels on the edges in any Eulerian circuit of Dn
form a cyclic arrangement in which the 2n
consecutive
segments of length n are distinct. 1.4.26
Proof: 1/4
 Let C be an Eulerian circuit of Dn. Arrival at vertex
a=(a1,…..,an-1) must be along an edge with label an-1
– because the label on an edge entering a vertex
agrees with the last entry of the name of the
vertex.
0
0 0
0
0
0
0
0
1
1
1
1
1 1
1
1
001
000
100
010 101
011
110
111
a b
Graph Theory
Ch. 1. Fundamental Concept
136
Theorem. The labels on the edges in any Eulerian circuit of Dn
form a cyclic arrangement in which the 2n
consecutive
segments of length n are distinct. 1.4.26
Proof: 2/4
 The successive earlier labels (looking backward)
must have been an-2,…..,a1 in order.
– because we delete the front and shift the reset
to obtain the reset of the name at the head
0
0 0
0
0
0
0
0
1
1
1
1
1 1
1
1
001
000
100
010 101
0 1 1
110
111
a b
Graph Theory
Ch. 1. Fundamental Concept
137
Theorem. The labels on the edges in any Eulerian circuit of Dn
form a cyclic arrangement in which the 2n
consecutive
segments of length n are distinct. 1.4.26
Proof: 2/4
 If C next uses an edge with label an, then the list
consisting of the n most recent edge labels at that
time is a1,…..an.
0
0
1
0
0
0
0
0
1
1
1
1
1 1
1
1
001
000
100
010 101
011
110
111
a b
0
1
Graph Theory
Ch. 1. Fundamental Concept
138
Theorem. The labels on the edges in any Eulerian circuit of
Dn form a cyclic arrangement in which the 2n
consecutive
segments of length n are distinct. 1.4.26
Proof: 3/4
 Since
– the 2n-1
vertex labels are distinct, and
– the two out-going edges have distinct labels,
and
– we traverse each edge exactly once
011 0
011 1
Distinct
vertex label
Distinct labels on
out-going edges
Graph Theory
Ch. 1. Fundamental Concept
139
Theorem. The labels on the edges in any Eulerian circuit of
Dn form a cyclic arrangement in which the 2n
consecutive
segments of length n are distinct. 1.4.26
Proof: 4/4
 We have shown that the 2n
strings of length n in
the circular arrangement given by the edge
labels along C are distinct.

More Related Content

What's hot

Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph Theory
Premsankar Chakkingal
 
Graph isomorphism
Graph isomorphismGraph isomorphism
Graph isomorphismCore Condor
 
Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph Theory
Yosuke Mizutani
 
Graph theory
Graph theoryGraph theory
Graph theory
AparnaKumari31
 
Graph theory
Graph theoryGraph theory
Graph theoryKumar
 
Ring
RingRing
Graph
GraphGraph
Ppt of graph theory
Ppt of graph theoryPpt of graph theory
Ppt of graph theory
ArvindBorge
 
Interesting applications of graph theory
Interesting applications of graph theoryInteresting applications of graph theory
Interesting applications of graph theoryTech_MX
 
Chapter 1
Chapter   1Chapter   1
Chapter 1
MeeraMeghpara
 
Graph theory and its applications
Graph theory and its applicationsGraph theory and its applications
Graph theory and its applications
Manikanta satyala
 
Graph Theory: Trees
Graph Theory: TreesGraph Theory: Trees
Graph Theory: Trees
Ashikur Rahman
 
Graph Theory: Cut-Set and Cut-Vertices
Graph Theory: Cut-Set and Cut-VerticesGraph Theory: Cut-Set and Cut-Vertices
Graph Theory: Cut-Set and Cut-Vertices
Ashikur Rahman
 
Graphs - Discrete Math
Graphs - Discrete MathGraphs - Discrete Math
Graphs - Discrete Math
Sikder Tahsin Al-Amin
 
Basics on Graph Theory
Basics on Graph TheoryBasics on Graph Theory
Basics on Graph Theory
Guillaume Guérard
 
MATCHING GRAPH THEORY
MATCHING GRAPH THEORYMATCHING GRAPH THEORY
MATCHING GRAPH THEORY
garishma bhatia
 
Chapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).pptChapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).ppt
ishan743441
 
Graph terminologies & special type graphs
Graph terminologies & special type graphsGraph terminologies & special type graphs
Graph terminologies & special type graphs
Nabeel Ahsen
 

What's hot (20)

graph theory
graph theory graph theory
graph theory
 
Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph Theory
 
Graph isomorphism
Graph isomorphismGraph isomorphism
Graph isomorphism
 
Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph Theory
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Ring
RingRing
Ring
 
Graph
GraphGraph
Graph
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Ppt of graph theory
Ppt of graph theoryPpt of graph theory
Ppt of graph theory
 
Interesting applications of graph theory
Interesting applications of graph theoryInteresting applications of graph theory
Interesting applications of graph theory
 
Chapter 1
Chapter   1Chapter   1
Chapter 1
 
Graph theory and its applications
Graph theory and its applicationsGraph theory and its applications
Graph theory and its applications
 
Graph Theory: Trees
Graph Theory: TreesGraph Theory: Trees
Graph Theory: Trees
 
Graph Theory: Cut-Set and Cut-Vertices
Graph Theory: Cut-Set and Cut-VerticesGraph Theory: Cut-Set and Cut-Vertices
Graph Theory: Cut-Set and Cut-Vertices
 
Graphs - Discrete Math
Graphs - Discrete MathGraphs - Discrete Math
Graphs - Discrete Math
 
Basics on Graph Theory
Basics on Graph TheoryBasics on Graph Theory
Basics on Graph Theory
 
MATCHING GRAPH THEORY
MATCHING GRAPH THEORYMATCHING GRAPH THEORY
MATCHING GRAPH THEORY
 
Chapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).pptChapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).ppt
 
Graph terminologies & special type graphs
Graph terminologies & special type graphsGraph terminologies & special type graphs
Graph terminologies & special type graphs
 

Viewers also liked

Graph
GraphGraph
CS6702 graph theory and applications notes pdf book
CS6702 graph theory and applications notes pdf bookCS6702 graph theory and applications notes pdf book
CS6702 graph theory and applications notes pdf book
appasami
 
Graph applications chapter
Graph applications chapterGraph applications chapter
Graph applications chapter
Savit Chandra
 
Learn Python Programming
Learn Python ProgrammingLearn Python Programming
Learn Python Programming
Kindle Books
 
Differential geometry three dimensional space
Differential geometry   three dimensional spaceDifferential geometry   three dimensional space
Differential geometry three dimensional space
Solo Hermelin
 
2.5 dfs & bfs
2.5 dfs & bfs2.5 dfs & bfs
2.5 dfs & bfs
Krish_ver2
 
Graph Traversal Algorithm
Graph Traversal AlgorithmGraph Traversal Algorithm
Graph Traversal Algorithm
jyothimonc
 
Quantum Mechanics as a Measure Theory: The Theory of Quantum Measure
Quantum Mechanics as a Measure Theory: The Theory of Quantum MeasureQuantum Mechanics as a Measure Theory: The Theory of Quantum Measure
Quantum Mechanics as a Measure Theory: The Theory of Quantum Measure
Vasil Penchev
 
Chapter 6 Probability
Chapter 6  ProbabilityChapter 6  Probability
Connected components and shortest path
Connected components and shortest pathConnected components and shortest path
Connected components and shortest path
Kaushik Koneru
 
Graph Traversal Algorithms - Depth First Search Traversal
Graph Traversal Algorithms - Depth First Search TraversalGraph Traversal Algorithms - Depth First Search Traversal
Graph Traversal Algorithms - Depth First Search Traversal
Amrinder Arora
 
Fundamentals Probability 08072009
Fundamentals Probability 08072009Fundamentals Probability 08072009
Fundamentals Probability 08072009
Sri Harsha gadiraju
 
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph ColouringGraph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Saurabh Kaushik
 
Game theory and its applications
Game theory and its applicationsGame theory and its applications
Game theory and its applicationsEranga Weerasekara
 
Introduction to islamic law
Introduction to islamic lawIntroduction to islamic law
Introduction to islamic law
Hùssâîn Mîrzã
 
An introduction to Game Theory
An introduction to Game TheoryAn introduction to Game Theory
An introduction to Game Theory
Paul Trafford
 
Game Theory Presentation
Game Theory PresentationGame Theory Presentation
Game Theory PresentationMehdi Ghotbi
 

Viewers also liked (20)

Graph
GraphGraph
Graph
 
Graph theory
Graph theoryGraph theory
Graph theory
 
CS6702 graph theory and applications notes pdf book
CS6702 graph theory and applications notes pdf bookCS6702 graph theory and applications notes pdf book
CS6702 graph theory and applications notes pdf book
 
Graph applications chapter
Graph applications chapterGraph applications chapter
Graph applications chapter
 
Graphs Algorithms
Graphs AlgorithmsGraphs Algorithms
Graphs Algorithms
 
Learn Python Programming
Learn Python ProgrammingLearn Python Programming
Learn Python Programming
 
Differential geometry three dimensional space
Differential geometry   three dimensional spaceDifferential geometry   three dimensional space
Differential geometry three dimensional space
 
2.5 dfs & bfs
2.5 dfs & bfs2.5 dfs & bfs
2.5 dfs & bfs
 
Graph Traversal Algorithm
Graph Traversal AlgorithmGraph Traversal Algorithm
Graph Traversal Algorithm
 
Quantum Mechanics as a Measure Theory: The Theory of Quantum Measure
Quantum Mechanics as a Measure Theory: The Theory of Quantum MeasureQuantum Mechanics as a Measure Theory: The Theory of Quantum Measure
Quantum Mechanics as a Measure Theory: The Theory of Quantum Measure
 
Chapter 6 Probability
Chapter 6  ProbabilityChapter 6  Probability
Chapter 6 Probability
 
Connected components and shortest path
Connected components and shortest pathConnected components and shortest path
Connected components and shortest path
 
Graph Traversal Algorithms - Depth First Search Traversal
Graph Traversal Algorithms - Depth First Search TraversalGraph Traversal Algorithms - Depth First Search Traversal
Graph Traversal Algorithms - Depth First Search Traversal
 
Fundamentals Probability 08072009
Fundamentals Probability 08072009Fundamentals Probability 08072009
Fundamentals Probability 08072009
 
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph ColouringGraph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
 
Game theory and its applications
Game theory and its applicationsGame theory and its applications
Game theory and its applications
 
Introduction to islamic law
Introduction to islamic lawIntroduction to islamic law
Introduction to islamic law
 
Game theory
Game theoryGame theory
Game theory
 
An introduction to Game Theory
An introduction to Game TheoryAn introduction to Game Theory
An introduction to Game Theory
 
Game Theory Presentation
Game Theory PresentationGame Theory Presentation
Game Theory Presentation
 

Similar to Graph theory

Elements of Graph Theory for IS.pptx
Elements of Graph Theory for IS.pptxElements of Graph Theory for IS.pptx
Elements of Graph Theory for IS.pptx
miki304759
 
Cs6702 2marks rejinpaul
Cs6702 2marks rejinpaulCs6702 2marks rejinpaul
Cs6702 2marks rejinpaul
stalinjothi
 
Cs6702 GCC
Cs6702 GCCCs6702 GCC
Cs6702 GCC
stalinjothi
 
1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx
swapnilbs2728
 
Graph theory concepts complex networks presents-rouhollah nabati
Graph theory concepts   complex networks presents-rouhollah nabatiGraph theory concepts   complex networks presents-rouhollah nabati
Graph theory concepts complex networks presents-rouhollah nabati
nabati
 
Graph ASS DBATU.pptx
Graph ASS DBATU.pptxGraph ASS DBATU.pptx
Graph ASS DBATU.pptx
ARVIND SARDAR
 
DIGITAL TEXT BOOK
DIGITAL TEXT BOOKDIGITAL TEXT BOOK
DIGITAL TEXT BOOK
shinyvarghese1991
 
Graphs.pdf
Graphs.pdfGraphs.pdf
Graphs.pdf
pubggaming58982
 
graph ASS (1).ppt
graph ASS (1).pptgraph ASS (1).ppt
graph ASS (1).ppt
ARVIND SARDAR
 
graph.ppt
graph.pptgraph.ppt
6. Graphs
6. Graphs6. Graphs
6. Graphs
Mandeep Singh
 
graph theory
graph theorygraph theory
graph theory
Shashank Singh
 
Graph
GraphGraph
Graph
ssnetvnr
 
Graph
GraphGraph
Unit 2: All
Unit 2: AllUnit 2: All
Unit 2: All
Hector Zenil
 
graph.ppt
graph.pptgraph.ppt
graph.ppt
SumitSamanta16
 
graph_theory_1-11.pdf___________________
graph_theory_1-11.pdf___________________graph_theory_1-11.pdf___________________
graph_theory_1-11.pdf___________________
ssuser1989da
 
Stochastic Processes Homework Help
Stochastic Processes Homework Help Stochastic Processes Homework Help
Stochastic Processes Homework Help
Statistics Assignment Help
 
Graph-Basics.pptx
Graph-Basics.pptxGraph-Basics.pptx
Graph-Basics.pptx
warningman101
 

Similar to Graph theory (20)

Elements of Graph Theory for IS.pptx
Elements of Graph Theory for IS.pptxElements of Graph Theory for IS.pptx
Elements of Graph Theory for IS.pptx
 
Cs6702 2marks rejinpaul
Cs6702 2marks rejinpaulCs6702 2marks rejinpaul
Cs6702 2marks rejinpaul
 
Cs6702 GCC
Cs6702 GCCCs6702 GCC
Cs6702 GCC
 
1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx
 
Graph theory concepts complex networks presents-rouhollah nabati
Graph theory concepts   complex networks presents-rouhollah nabatiGraph theory concepts   complex networks presents-rouhollah nabati
Graph theory concepts complex networks presents-rouhollah nabati
 
Graph ASS DBATU.pptx
Graph ASS DBATU.pptxGraph ASS DBATU.pptx
Graph ASS DBATU.pptx
 
DIGITAL TEXT BOOK
DIGITAL TEXT BOOKDIGITAL TEXT BOOK
DIGITAL TEXT BOOK
 
Graphs.pdf
Graphs.pdfGraphs.pdf
Graphs.pdf
 
graph ASS (1).ppt
graph ASS (1).pptgraph ASS (1).ppt
graph ASS (1).ppt
 
graph.ppt
graph.pptgraph.ppt
graph.ppt
 
6. Graphs
6. Graphs6. Graphs
6. Graphs
 
graph theory
graph theorygraph theory
graph theory
 
Graph
GraphGraph
Graph
 
Graph
GraphGraph
Graph
 
Unit 2: All
Unit 2: AllUnit 2: All
Unit 2: All
 
graph.ppt
graph.pptgraph.ppt
graph.ppt
 
graph_theory_1-11.pdf___________________
graph_theory_1-11.pdf___________________graph_theory_1-11.pdf___________________
graph_theory_1-11.pdf___________________
 
Stochastic Processes Homework Help
Stochastic Processes Homework Help Stochastic Processes Homework Help
Stochastic Processes Homework Help
 
Graphs-LeX2-given
Graphs-LeX2-givenGraphs-LeX2-given
Graphs-LeX2-given
 
Graph-Basics.pptx
Graph-Basics.pptxGraph-Basics.pptx
Graph-Basics.pptx
 

Recently uploaded

Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
aqil azizi
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
Steel & Timber Design according to British Standard
Steel & Timber Design according to British StandardSteel & Timber Design according to British Standard
Steel & Timber Design according to British Standard
AkolbilaEmmanuel1
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
top1002
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
veerababupersonal22
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABSDESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
itech2017
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
ClaraZara1
 

Recently uploaded (20)

Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
Steel & Timber Design according to British Standard
Steel & Timber Design according to British StandardSteel & Timber Design according to British Standard
Steel & Timber Design according to British Standard
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABSDESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
 

Graph theory

  • 1. Graph Theory Ch. 1. Fundamental Concept 1 Chapter 1 Fundamental Concept 1.1 What Is a Graph? 1.2 Paths, Cycles, and Trails 1.3 Vertex Degree and Counting 1.4 Directed Graphs
  • 2. Graph Theory Ch. 1. Fundamental Concept 2 The KÖnigsberg Bridge Problem  Königsber is a city on the Pregel river in Prussia  The city occupied two islands plus areas on both banks  Problem: Whether they could leave home, cross every bridge exactly once, and return home. X Y Z W
  • 3. Graph Theory Ch. 1. Fundamental Concept 3 A Model  A vertex : a region  An edge : a path(bridge) between two regions e1 e2 e3 e4 e6 e5 e7 Z Y X W X Y Z W
  • 4. Graph Theory Ch. 1. Fundamental Concept 4 General Model  A vertex : an object  An edge : a relation between two objects common member Committee 1 Committee 2
  • 5. Graph Theory Ch. 1. Fundamental Concept 5 What Is a Graph?  A graph G is a triple consisting of: – A vertex set V(G ) – An edge set E(G ) – A relation between an edge and a pair of vertices e1 e2 e3 e4 e6 e5 e7 Z Y X W
  • 6. Graph Theory Ch. 1. Fundamental Concept 6 Loop, Multiple edges  Loop : An edge whose endpoints are equal  Multiple edges : Edges have the same pair of endpoints loop Multiple edges
  • 7. Graph Theory Ch. 1. Fundamental Concept 7 Simple Graph  Simple graph : A graph has no loops or multiple edges loop Multiple edges It is not simple. It is a simple graph.
  • 8. Graph Theory Ch. 1. Fundamental Concept 8 Adjacent, neighbors  Two vertices are adjacent and are neighbors if they are the endpoints of an edge  Example: – A and B are adjacent – A and D are not adjacent A B C D
  • 9. Graph Theory Ch. 1. Fundamental Concept 9 Finite Graph, Null Graph  Finite graph : an graph whose vertex set and edge set are finite  Null graph : the graph whose vertex set and edges are empty
  • 10. Graph Theory Ch. 1. Fundamental Concept 10 Complement  Complement of G: The complement G’ of a simple graph G : – A simple graph – V(G’) = V(G) – E(G’) = { uv | uv ∉E(G) } G u v w x y G’ u v wx y
  • 11. Graph Theory Ch. 1. Fundamental Concept 11 Clique and Independent set  A Clique in a graph: a set of pairwise adjacent vertices (a complete subgraph)  An independent set in a graph: a set of pairwise nonadjacent vertices  Example: – {x, y, u} is a clique in G – {u, w} is an independent set G u v wx y
  • 12. Graph Theory Ch. 1. Fundamental Concept 12 Bipartite Graphs  A graph G is bipartite if V(G) is the union of two disjoint independent sets called partite sets of G  Also: The vertices can be partitioned into two sets such that each set is independent  Matching Problem  Job Assignment Problem Workers Jobs Boys Girls
  • 13. Graph Theory Ch. 1. Fundamental Concept 13 Chromatic Number  The chromatic number of a graph G, written x(G), is the minimum number of colors needed to label the vertices so that adjacent vertices receive different colors Red Green Blue Blue x(G) = 3
  • 14. Graph Theory Ch. 1. Fundamental Concept 14 Maps and coloring  A map is a partition of the plane into connected regions  Can we color the regions of every map using at most four colors so that neighboring regions have different colors?  Map Coloring → graph coloring – A region → A vertex – Adjacency → An edge
  • 15. Graph Theory Ch. 1. Fundamental Concept 15 Scheduling and graph Coloring 1  Two committees can not hold meetings at the same time if two committees have common member common member Committee 1 Committee 2
  • 16. Graph Theory Ch. 1. Fundamental Concept 16 Scheduling and graph Coloring 1  Model: – One committee being represented by a vertex – An edge between two vertices if two corresponding committees have common member – Two adjacent vertices can not receive the same color common member Committee 1 Committee 2
  • 17. Graph Theory Ch. 1. Fundamental Concept 17 Scheduling and graph Coloring 2  Scheduling problem is equivalent to graph coloring problem Common MemberCommittee 1 Committee 2 Committee 3 Common Member Different Color No Common Member Same Color OK Same time slot OK
  • 18. Graph Theory Ch. 1. Fundamental Concept 18 Path and Cycle  Path : a sequence of distinct vertices such that two consecutive vertices are adjacent – Example: (a, d, c, b, e) is a path – (a, b, e, d, c, b, e, d) is not a path; it is a walk  Cycle : a closed Path – Example: (a, d, c, b, e, a) is a cycle a b c de
  • 19. Graph Theory Ch. 1. Fundamental Concept 19 Subgraphs  A subgraph of a graph G is a graph H such that: – V(H) ⊆ V(G) and E(H) ⊆ E(G) and – The assignment of endpoints to edges in H is the same as in G.
  • 20. Graph Theory Ch. 1. Fundamental Concept 20 Subgraphs  Example: H1, H2, and H3 are subgraphs of G c d a b de a b c de H1 G H3 H2 a b c de
  • 21. Graph Theory Ch. 1. Fundamental Concept 21 Connected and Disconnected  Connected : There exists at least one path between two vertices  Disconnected : Otherwise  Example: – H1 and H2 are connected – H3 is disconnected c d a b de a b c d eH1 H3H2
  • 22. Graph Theory Ch. 1. Fundamental Concept 22 Adjacency, Incidence, and Degree  Assume ei is an edge whose endpoints are (vj,vk)  The vertices vj and vk are said to be adjacent  The edge ei is said to be incident upon vj  Degree of a vertex vkis the number of edges incident upon vk. It is denoted as d(vk) ei vj vk
  • 23. Graph Theory Ch. 1. Fundamental Concept 23 Adjacency matrix  Let G = (V, E), |V| = n and |E|=m  The adjacency matrix of G written A(G), is the n-by-n matrix in which entry ai,j is the number of edges in G with endpoints {vi, vj}. a b c d e w x y z w x y z 0 1 1 0 1 0 2 0 1 2 0 1 0 0 1 0 w x y z
  • 24. Graph Theory Ch. 1. Fundamental Concept 24 Incidence Matrix  Let G = (V, E), |V| = n and |E|=m  The incidence matrix M(G) is the n-by-m matrix in which entry mi,j is 1 if vi is an endpoint of ei and otherwise is 0. a b c d e w x y z a b c d e 1 1 0 0 0 1 0 1 1 0 0 1 1 1 1 0 0 0 0 1 w x y z
  • 25. Graph Theory Ch. 1. Fundamental Concept 25 Isomorphism  An isomorphism from a simple graph G to a simple graph H is a bijection f:V(G)→V(H) such that uv ∈E(G) if and only if f(u)f(v) ∈ E(H) – We say “G is isomorphic to H”, written G ≅ H HG w x z y c d ba f1: w x y z c b d a f2: w x y z a d b c
  • 26. Graph Theory Ch. 1. Fundamental Concept 26 Complete Graph  Complete Graph : a simple graph whose vertices are pairwise adjacent Complete Graph
  • 27. Graph Theory Ch. 1. Fundamental Concept 27 Complete Bipartite Graph or Biclique  Complete bipartite graph (biclique) is a simple bipartite graph such that two vertices are adjacent if and only if they are in different partite sets. Complete Bipartite Graph
  • 28. Graph Theory Ch. 1. Fundamental Concept 28 Petersen Graph 1.1.36  The petersen graph is the simple graph whose vertices are the 2-element subsets of a 5-element set and whose edges are pairs of disjoint 2-element subsets
  • 29. Graph Theory Ch. 1. Fundamental Concept 29 Petersen Graph 1.1.37  Assume: the set of 5-element be (1, 2, 3, 4, 5) – Then, 2-element subsets: (1,2) (1,3) (1,4) (1,5) (2,3) (2,4) (2,5) (3,4) (3,5) (4,5) Disjoint, so connected 45: (4, 5) 12 34 15 23 45 35 13 14 24 25
  • 30. Graph Theory Ch. 1. Fundamental Concept 30 Petersen Graph 1.1.36  Three drawings
  • 31. Graph Theory Ch. 1. Fundamental Concept 31 Theorem: If two vertices are non-adjacent in the Petersen Graph, then they have exactly one common neighbor. 1.1.38 Proof: x, zx, y No connection, Joint, One common element. u, v Since 5 elements totally, 5-3 elements left. Hence, exactly one of this kind. 3 elements in these vertices totally
  • 32. Graph Theory Ch. 1. Fundamental Concept 32 Girth 1.1.39, 1.1.40  Girth : the length of its shortest cycle. – If no cycles, girth is infinite
  • 33. Graph Theory Ch. 1. Fundamental Concept 33 Girth and Petersen graph 1.1.39, 1.1.40  Theorem: The Petersen Graph has girth 5. Proof: – Simple → no loop → no 1-cycle (cycle of length 1) – Simple → no multiple → no 2-cycle – 5 elements →no three pair-disjoint 2-sets → no 3-cycle – By previous theorem, two nonadjacent vertices has exactly one common neighbor → no 4-cycle – 12-34-51-23-45-12 is a 5-cycle.
  • 34. Graph Theory Ch. 1. Fundamental Concept 34 Walks, Trails1.2.2  A walk : a list of vertices and edges v0, e1, v1, …., ek, vk such that, for 1 ≤ i ≤ k, the edge ei has endpoints vi-1 and vi.  A trail : a walk with no repeated edge.
  • 35. Graph Theory Ch. 1. Fundamental Concept 35 Paths 1.2.2  A u,v-walk or u,v-trail has first vertex u and last vertex v; these are its endpoints.  A u,v-path: a u,v-trail with no repeated vertex.  The length of a walk, trail, path, or cycle is its number of edges.  A walk or trail is closed if its endpoints are the same.
  • 36. Graph Theory Ch. 1. Fundamental Concept 36 Lemma: Every u,v-walk contains a u,v-path 1.2.5 Proof:  Use induction on the length of a u, v-walk W.  Basis step: l = 0. – Having no edge, W consists of a single vertex (u=v). – This vertex is a u,v-path of length 0. to be continued
  • 37. Graph Theory Ch. 1. Fundamental Concept 37 Lemma: Every u,v-walk contains a u,v-path 1.2.5 Proof: Continue  Induction step : l ≥ 1. – Suppose that the claim holds for walks of length less than l. – If W has no repeated vertex, then its vertices and edges form a u,v-path.
  • 38. Graph Theory Ch. 1. Fundamental Concept 38 Lemma: Every u,v-walk contains a u,v-path 1.2.5 Proof: Continue  Induction step : l ≥ 1. Continue – If W has a repeated vertex w, then deleting the edges and vertices between appearances of w (leaving one copy of w) yields a shorter u,v- walk W’ contained in W. – By the induction hypothesis, W ’ contains a u,v-path P,and this path P is contained in W. u v W P Delete
  • 39. Graph Theory Ch. 1. Fundamental Concept 39 Components 1.2.8  The components of a graph G are its maximal connected subgraphs  A component (or graph) is trivial if it has no edges; otherwise it is nontrivial  An isolated vertex is a vertex of degree 0 r q s u v w t p x y z
  • 40. Graph Theory Ch. 1. Fundamental Concept 40 Proof: – An n-vertex graph with no edges has n components – Each edge added reduces this by at most 1 – If k edges are added, then the number of components is at least n - k Theorem: Every graph with n vertices and k edges has at least n-k components 1.2.11
  • 41. Graph Theory Ch. 1. Fundamental Concept 41 Theorem: Every graph with n vertices and k edges has at least n-k components 1.2.11  Examples: n =2, k =1, 1 component n =3, k =2, 1 component n =6, k =3, 3 components n =6, k =3, 4 components
  • 42. Graph Theory Ch. 1. Fundamental Concept 42 Cut-edge, Cut-vertex 1.2.12  A cut-edge or cut-vertex of a graph is an edge or vertex whose deletion increases the number of components Not a Cut-vertexCut-edge Cut-edge Cut-vertex
  • 43. Graph Theory Ch. 1. Fundamental Concept 43 Cut-edge, Cut-vertex 1.2.12  G-e or G-M : The subgraph obtained by deleting an edge e or set of edges M  G-v or G-S : The subgraph obtained by deleting a vertex v or set of vertices S e G-eG
  • 44. Graph Theory Ch. 1. Fundamental Concept 44 Induced subgraph 1.2.12  An induced subgraph : – A subgraph obtained by deleting a set of vertices – We write G[T] for G-T’, where T’ =V(G)-T – G[T] is the subgraph of G induced by T  Example: – Assume T:{A, B, C, D} BA C D E BA C D G[T] G
  • 45. Graph Theory Ch. 1. Fundamental Concept 45 Induced subgraph 1.2.12  More Examples: – G2 is the subgraph of G1 induced by (A, B, C, D) – G3 is the subgraph of G1 induced by (B, C) – G4 is not the subgraph induced by (A, B, C, D) BA C D E BA C D B C BA C D G1 G2 G3 G4
  • 46. Graph Theory Ch. 1. Fundamental Concept 46 Induced subgraph 1.2.12  A set S of vertices is an independent set if and only if the subgraph induced by it has no edges. – G3 is an example. BA C D E B C G1 G3
  • 47. Graph Theory Ch. 1. Fundamental Concept 47 Theorem: An edge e is a cut-edge if and only if e belongs to no cycles. 1.2.14 Proof :1/2  Let e= (x, y) be an edge in a graph G and H be the component containing e. – Since deletion of e effects no other component, it suffices to prove that H-e is connected if and only if e belongs to a cycle.  First suppose that H-e is connected. – This implies that H-e contains an x, y-path, – This path completes a cycle with e.
  • 48. Graph Theory Ch. 1. Fundamental Concept 48 Theorem: An edge e is a cut-edge if and only if e belongs to no cycles. 1.2.14 Proof :2/2  Now suppose that e lies in a cycle C. – Choose u, v∈V(H) • Since H is connected, H has a u, v-path P – If P does not contain e • Then P exists in H-e – Otherwise (P contains e) • Suppose by symmetry that x is between u and y on P • Since H-e contains a u, x-path along P, the transitivity of the connection relation implies that H-e has a u, v-path – We did this for all u, v ∈ V(H), so H-e is connected.
  • 49. Graph Theory Ch. 1. Fundamental Concept 49 Theorem: An edge e is a cut-edge if and only if e belongs to no cycles. 1.2.14  An Example: u x y e P C v
  • 50. Graph Theory Ch. 1. Fundamental Concept 50 Lemma: Every closed odd walk contains an odd cycle Proof:1/3  Use induction on the length l of a closed odd walk W.  l=1. A closed walk of length 1 traverses a cycle of length 1.  We need to prove the claim holds if it holds for closed odd walks shorter than W.
  • 51. Graph Theory Ch. 1. Fundamental Concept 51 Lemma: Every closed odd walk contains an odd cycle Proof: 2/3  Suppose that the claim holds for closed odd walks shorter than W.  If W has no repeated vertex (other than first = last), then W itself forms a cycle of odd length.  Otherwise, (W has repeated vertex ) – Need to prove: If repeated, W includes a shorter closed odd walk. By induction, the theorem hold
  • 52. Graph Theory Ch. 1. Fundamental Concept 52 Lemma: Every closed odd walk contains an odd cycle Proof: 3/3 – If W has a repeated vertex v, then we view W as starting at v and break W into two v,v-walks • Since W has odd length, one of these is odd and the other is even. (see the next page) • The odd one is shorter than W, by induction hypothesis, it contains an odd cycle, and this cycle appears in order in W Even v Odd Odd = Odd + Even
  • 53. Graph Theory Ch. 1. Fundamental Concept 53 Theorem: A graph is bipartite if and only if it has no odd cycle. 1.2.18  Examples: BA D C A C B D A C B D F E A C B D E F
  • 54. Graph Theory Ch. 1. Fundamental Concept 54 Theorem: A graph is bipartite if it has no odd cycle. 1.2.18 Proof: (sufficiency1/3)  Let G be a graph with no odd cycle.  We prove that G is bipartite by constructing a bipartition of each nontrivial component H.  For each v ∈ V (H ), let f (v ) be the minimum length of a u, v -path. Since H is connected, f (v ) is defined for each v ∈ V (H ) . u v 'v ( ')f v ( )f v
  • 55. Graph Theory Ch. 1. Fundamental Concept 55 Theorem: A graph is bipartite if it has no odd cycle. 1.2.18 Proof: (sufficiency2/3)  Let X={v ∈ V (H ): f (v ) is even} and Y={v ∈ V(H ): f (v ) is odd}  An edge v, v’ within X (or Y ) would create a closed odd walk using a shortest u, v-path, the edge v, v’ within X (or Y ) and the reverse of a shortest u, v’-path. u v 'v A closed odd walk using 1) a shortest u, v-path, 2) the edge v, v’ within X (or Y) , and 3) the reverse of a shortest u, v’- path.
  • 56. Graph Theory Ch. 1. Fundamental Concept 56 Theorem: A graph is bipartite if it has no odd cycle. 1.2.18 Proof: (sufficiency3/3)  By Lemma 1.2.15, such a walk must contain an odd cycle, which contradicts our hypothesis  Hence X and Y are independent sets. Also X∪Y = V(H), so H is an X, Y-bipartite graph u v 'v Even (or Odd) Even (or Odd) Odd Cycle Because: even (or odd) + even (or odd) = even even + 1 = odd Since no odd cycles, vv’ doesn’t exist. We have: X and Y are independent sets
  • 57. Graph Theory Ch. 1. Fundamental Concept 57 Theorem: A graph is bipartite only if it has no odd cycle. 1.2.18 Proof: (necessity)  Let G be a bipartite graph.  Every walk alternates between the two sets of a bipartition  So every return to the original partite set happens after an even number of steps  Hence G has no odd cycle
  • 58. Graph Theory Ch. 1. Fundamental Concept 58 Eulerian Circuits 1.2.24  A graph is Eulerian if it has a closed trail containing all edges.  We call a closed trail a circuit when we do not specify the first vertex but keep the list in cyclic order.  An Eulerian circuit or Eulerian trail in a graph is a circuit or trail containing all the edges.
  • 59. Graph Theory Ch. 1. Fundamental Concept 59 Even Graph, Even Vertex1.2.24  An even graph is a graph with vertex degrees all even.  A vertex is odd [even] when its degree is odd [even].
  • 60. Graph Theory Ch. 1. Fundamental Concept 60 Maximal Path1.2.24  A maximal path in a graph G is a path P in G that is not contained in a longer path. – When a graph is finite, no path can extend forever , so maximal (non-extendible) paths exist.
  • 61. Graph Theory Ch. 1. Fundamental Concept 61 Lemma: If every vertex of graph G has degree at least 2, then G contains a cycle. 1.2.25 Proof:  Let P be a maximal path in G, and let u be an endpoint of P  Since P cannot be extended, every neighbor of u must already be a vertex of P  Since u has degree at least 2, it has a neighbor v in V (P ) via an edge not in P  The edge uv completes a cycle with the portion of P from v to u uP Impossible v P u Must
  • 62. Graph Theory Ch. 1. Fundamental Concept 62 Theorem: A graph G is Eulerian if and only if it has at most one nontrivial component and its vertices all have even degree. 1.2.26 Proof: (Necessity)  Suppose that G has an Eulerian circuit C  Each passage of C through a vertex uses two incident edges  And the first edge is paired with the last at the first vertex  Hence every vertex has even degree In Out Start (The 1st ) End (The last)
  • 63. Graph Theory Ch. 1. Fundamental Concept 63 Theorem: A graph G is Eulerian if and only if it has at most one nontrivial component and its vertices all have even degree. 1.2.26 Proof: (Necessity)  Also, two edges can be in the same trail only when they lie in the same component, so there is at most one nontrivial component. Component 1 Component 2 If more than one components, can’t walk across the graph
  • 64. Graph Theory Ch. 1. Fundamental Concept 64 Theorem: A graph G is Eulerian if and only if it has at most one nontrivial component and its vertices all have even degree 1.2.26 Proof: (Sufficiency 1/3)  Assuming that the condition holds, we obtain an Eulerian circuit using induction on the number of edges, m  Basis step: m= 0. A closed trail consisting of one vertex suffices →
  • 65. Graph Theory Ch. 1. Fundamental Concept 65 Theorem: A graph G is Eulerian if and only if it has at most one nontrivial component and its vertices all have even degree. 1.2.26 Proof: (Sufficiency 2/3)  Induction step: m>0. – When even degrees, each vertex in the nontrivial component of G has degree at least 2. – By Lemma 1.2.25, the nontrivial component has a cycle C. – Let G’ be the graph obtained from G by deleting E(C). – Since C has 0 or 2 edges at each vertex, each component of G’ is also an even graph. – Since each component is also connected and has fewer than m edges, we can apply the induction hypothesis to conclude that each component of G’ has an Eulerian circuit. →
  • 66. Graph Theory Ch. 1. Fundamental Concept 66 Theorem: A graph G is Eulerian if and only if it has at most one nontrivial component and its vertices all have even degree. 1.2.26 Proof: (Sufficiency 3/3)  Induction step: m>0. (continued) – To combine these into an Eulerian circuit of G, we traverse C, but when a component of G’ is entered for the first time we detour along an Eulerian circuit of that component. – This circuit ends at the vertex where we began the detour. When we complete the traversal of C, we have completed an Eulerian circuit of G.
  • 67. Graph Theory Ch. 1. Fundamental Concept 67 Proposition: Every even graph decomposes into cycles1.2.27 Proof:  In the proof of Theorem 1.2.26 – It is noted that every even nontrivial graph has a cycle – The deletion of a cycle leaves an even graph  Thus this proposition follows by induction on the number of edges
  • 68. Graph Theory Ch. 1. Fundamental Concept 68 Proposition: If G is a simple graph in which every vertex has degree at least k, then G contains a path of length at least k. If k≥2, then G also contains a cycle of length at least k+1. 1.2.28 Proof: (1/2)  Let u be an endpoint of a maximal path P in G.  Since P does not extend, every neighbor of u is in V(P).  Since u has at least k neighbors and G is simple, P therefore has at least k vertices other than u and has length at least k.
  • 69. Graph Theory Ch. 1. Fundamental Concept 69 Proposition: If G is a simple graph in which every vertex has degree at least k, then G contains a path of length at least k. If k≥2, then G also contains a cycle of length at least k+1. 1.2.28 Proof: (2/2)  If k ≥ 2, then the edge from u to its farthest neighbor v along P completes a sufficiently long cycle with the portion of P from v to u. u v d(u) ≥ k At least k+1 vertices Length ≥ k
  • 70. Graph Theory Ch. 1. Fundamental Concept 70 Degree1.3.1  The degree of vertex v in a graph G, written or d (v ), is the number of edges incident to v, except that each loop at v counts twice  The maximal degree is ∆(G )  The minimum degree is δ (G ) A C B D F E d(B) = 3, d(C) = 2 Δ(G) = 3, δ(G) = 2 G
  • 71. Graph Theory Ch. 1. Fundamental Concept 71 Regular 1.3.1  G is regular if ∆(G ) = δ (G )  G is k-regular if the common degree is k.  The neighborhood of v, written Ng (v ) or N (v ) is the set of vertices adjacent to v. 3-regular
  • 72. Graph Theory Ch. 1. Fundamental Concept 72 Order and size 1.3.2  The order of a graph G, written n (G ), is the number of vertices in G.  An n-vertex graph is a graph of order n.  The size of a graph G, written e (G ), is the number of edges in G.  For n∈N, the notation [n ] indicates the set {1,…, n }.
  • 73. Graph Theory Ch. 1. Fundamental Concept 73 Proposition: (Degree-Sum Formula) If G is a graph, then Σv∈V(G)d(v) = 2e(G) 1.3.3 Proof:  Summing the degrees counts each edge twice, – Because each edge has two ends and contributes to the degree at each endpoint.
  • 74. Graph Theory Ch. 1. Fundamental Concept 74 Theorem: If k>0, then a k-regular bipartite graph has the same number of vertices in each partite set. 1.3.9 Proof:  Let G be an X,Y - bigraph.  Counting the edges according to their endpoints in X yields e (G ) = k |X |. d (x) = k x
  • 75. Graph Theory Ch. 1. Fundamental Concept 75 Theorem: If k>0, then a k-regular bipartite graph has the same number of vertices in each partite set. 1.3.9 Proof:  Counting them by their endpoints in Y yields e (G )=k |Y |  Thus k |X | = k |Y |, which yields |X |=|Y | when k > 0 d (x) = k x d (y) = ky
  • 76. Graph Theory Ch. 1. Fundamental Concept 76 A technique for counting a set 1/3 1.3.10  Example: The Petersen graph has ten 6-cycles – Let G be the Petersen graph. – Being 3-regular, G has ten copies of K1,3(claw). We establish a one-to-one correspondence between the 6-cycles and the claws. – Since G has girth 5, every 6-cycle F is an induced subgraph. • see below – Each vertex of F has one neighbor outside F. • d(v)= 3, v ∈V(G) If Existing, Girth =3. But Girth=5 so no such an edge
  • 77. Graph Theory Ch. 1. Fundamental Concept 77 A technique for counting a set 2/3 1.3.10 – Since nonadjacent vertices have exactly one common neighbor (Proposition 1.1.38), opposite vertices on F have a common neighbor outside F. – Since G is 3-regular, the resulting three vertices outside F are distinct. – Thus deleting V(F) leaves a subgraph with three vertices of degree 1 and one vertex of degree 3; it is a claw. Common neighbor of opposite vertices If the neighbors are not distinct, d(v)>3
  • 78. Graph Theory Ch. 1. Fundamental Concept 78 A technique for counting a set 3/3 3.10 – It is shown that each claw H in G arises exactly once in this way. – Let S be the set of vertices with degree 1 in H; S is an independent set. – The central vertex of H is already a common neighbor, so the six other edges from S reach distinct vertices. – Thus G-V(H) is 2-regular. Since G has girth 5, G- V(H) must be a 6-cycle. This 6-cycle yields H when its vertices are deleted.
  • 79. Graph Theory Ch. 1. Fundamental Concept 79 Proposition: The minimum number of edges in a connected graph with n vertices is n-1. 3.13 Proof:  By proposition 1.2.11, every graph with n vertices and k edges has at least n-k components.  Hence every n-vertex graph with fewer than n-1 edges has at least two components and is disconnected.  The contrapositive of this is that every connected n-vertex graph has at least n-1 edges. This lower bound is achieved by the path Pn.
  • 80. Graph Theory Ch. 1. Fundamental Concept 80 Theorem: If G is simple n-vertex graph with δ(G)≥(n-1)/2, then G is connected. 1.3.15 Proof: 1/2  Choose u,v ∈ V (G ).  It suffices to show that u,v have a common neighbor if they are not adjacent.  Since G is simple, we have |N(u) | ≥ δ (G ) ≥ (n-1)/2, and similarly for v. – Recall: δ (G ) is the minimum degree, |N(u)| = d(u) Hence: |N(u) | ≥ δ (G )
  • 81. Graph Theory Ch. 1. Fundamental Concept 81 Theorem: If G is simple n-vertex graph with δ(G)≥(n-1)/2, then G is connected. 1.3.15 Proof: 2/2  When u and v are not connected, we have |N(u ) ∪N(v )| ≤ n - 2 – since u and v are not in the union  Using Remark A.13 of Appendix A, we thus compute | ( ) ( )| | ( )| | ( )| | ( ) ( )| 1 1 ( 2) 1. 2 2 N u N v N u N v N u N v n n n ∩ = + − ∪ − −≥ + − − =
  • 82. Graph Theory Ch. 1. Fundamental Concept 82 Theorem: Every loopless graph G has a bipartite subgraph with at least e(G)/2 edges. 1.3.19 Proof:  Partition V(G) into two sets X, Y.  Using the edges having one endpoint in each set yields a bipartite subgraph H with bipartition X, Y.  If H contains fewer than half the edges of G incident to a vertex v, then v has more edges to vertices in its own class than in the other class, as illustrated bellow.
  • 83. Graph Theory Ch. 1. Fundamental Concept 83 Proof: 2/2  Moving v to the other class gains more edges of G than it loses.  Using Iterative improvement approach  When it terminates, we have dH(v) ≥ dG(v)/2 for every v∈V(G) .  Summing this and applying the degree-sum formula yields e(H) ≥ e(G)/2. Theorem: Every loopless graph G has a bipartite subgraph with at least e(G)/2 edges. 1.3.19
  • 84. Graph Theory Ch. 1. Fundamental Concept 84 Example1 1.3.20  The algorithm in Theorem 1.3.19 need not produce a bipartite subgraph with the most edges, merely one with at least half the edges – Local Maximum
  • 85. Graph Theory Ch. 1. Fundamental Concept 85 Example2 1.3.20  Consider the graph in the next page. – It is 5-regular with 8 vertices and hence has 20 edges. – The bipartition X={a,b,c,d} and Y={e,f,g,h} yields a 3-regular bipartite subgraph with 12 edges. – The algorithm terminates here: • switching one vertex would pick up two edges but lose three .
  • 86. Graph Theory Ch. 1. Fundamental Concept 86 Example(Cont.) 1.3.20 a b c de f g h switching a would pick up two edges but lose three
  • 87. Graph Theory Ch. 1. Fundamental Concept 87 Example 1.3.20  Nevertheless, the bipartition X={a,b,g,h} and Y={c,d,e,f} yields a 4-regular bipartite subgraph with 16 edges.  An algorithm seeking the maximal by local changes may get stuck in a local maximum. a b c de f g h a b c de f g hLocal Maximum Global Maximum
  • 88. Graph Theory Ch. 1. Fundamental Concept 88 Theorem: The maximum number of edges in an n- vertex triangle free simple graph is  n2 /4  1.3.23 Proof : 1/6 – Let G be an n-vertex triangle-free simple graph. – Let x be a vertex of maximum degree and d(x)=k. – Since G has no triangles, there are no edges among neighbors of x. No edges between neighbors of x
  • 89. Graph Theory Ch. 1. Fundamental Concept 89 Theorem: The maximum number of edges in an n- vertex triangle free simple graph is  n2 /4  1.3.23 Proof : 2/6 – Hence summing the degrees of x and its nonneighbors counts at least one endpoint of every edge: Σv∉N(x)d(v) ≥ e(G). – We sum over n-k vertices, each having degree at most k, so e(G) ≤ (n-k)k
  • 90. Graph Theory Ch. 1. Fundamental Concept 90 )(xN x x )(xN Doesn’t exist • Σv∉N(x) d(v) counts at least one endpoint of every edge At most k vertices At least n-k vertices No edges exist Theorem: The maximum number of edges in an n- vertex triangle free simple graph is  n2 /4  1.3.23 Proof: 3/6
  • 91. Graph Theory Ch. 1. Fundamental Concept 91 Proof: 4/6 – Since (n-k)k counts the edges in Kn-k, k, we have now proved that e(G) is bounded by the size of some biclique with n vertices. • i.e. e(G) ≤ (n-k)k = |the edges in Kn-k,k| Theorem: The maximum number of edges in an n- vertex triangle free simple graph is  n2 /4  1.3.23 n-k k
  • 92. Graph Theory Ch. 1. Fundamental Concept 92 Proof: 5/6 – Moving a vertex of Kn-k,k from the set of size k to the set of size n-k gains k-1 edges and loses n-k edges. – The net gain is 2k-1-n, which is positive for 2k>n+1 and negative for 2k<n+1. – Thus e(Kn-k, k) is maximized when k is n/2  or n/2 . Theorem: The maximum number of edges in an n- vertex triangle free simple graph is  n2 /4  1.3.23 n-k k
  • 93. Graph Theory Ch. 1. Fundamental Concept 93 Proof: 6/6 – The product is then n2 /4 for even n and (n2 -1)/4 for odd n. Thus e(G) ≤ n2 /4 . – The bound is best possible. • It is seen that a triangle-free graph with n2 /4 edges is: Kn/2,n/2. Theorem: The maximum number of edges in an n- vertex triangle free simple graph is  n2 /4  1.3.23
  • 94. Graph Theory Ch. 1. Fundamental Concept 94 Degree sequence 1.3.27  The Degree Sequence of a graph is the list of vertex degrees, usually written in non- increasing order, as d1≥ …. ≥ dn .  Example: z y x w v Degree sequence: d(w), d(x), d(y), d(z), d(v)
  • 95. Graph Theory Ch. 1. Fundamental Concept 95 Proposition: The nonnegative integers d1 ,…, dn are the vertex degrees of some graph if and only if ∑di is even. 1.3.28 Proof: ½ Necessity  When some graph G has these numbers as its vertex degrees, the degree-sum formula implies that ∑di = 2e (G), which is even.
  • 96. Graph Theory Ch. 1. Fundamental Concept 96 Proof: 2/2 Sufficiency  Suppose that ∑ di is even.  We construct a graph with vertex set v1,…,vn and d(vi) = di for all i.  Since ∑ di is even, the number of odd values is even.  First form an arbitrary pairing of the vertices in {vi : di is odd}.  For each resulting pair, form an edge having these two vertices as its endpoints  The remaining degree needed at each vertex is even and nonnegative; satisfy this for each i by placing [di /2] loops at vi Proposition: The nonnegative integers d1 ,…, dn are the vertex degrees of some graph if and only if ∑di is even. 1.3.28
  • 97. Graph Theory Ch. 1. Fundamental Concept 97 Graphic Sequence 1.3.29  A graphic sequence is a list of nonnegative numbers that is the degree sequence of some simple graph.  A simple graph “realizes” d. – means: A simple graph with degree sequence d.
  • 98. Graph Theory Ch. 1. Fundamental Concept 98 Recursive condition 1.3.30  The lists (2, 2, 1, 1) and (1, 0, 1) are graphic. The graphic K2+K1 realizes 1, 0, 1.  Adding a new vertex adjacent to vertices of degrees 1 and 0 yields a graph with degree sequence 2, 2, 1, 1, as shown below.  Conversely, if a graph realizing 2, 2, 1, 1 has a vertex w with neighbors of degrees 2 and 1, then deleting w yields a graph with degrees 1, 0, 1. w K2 K1 1 1 0 1 1 2 2
  • 99. Graph Theory Ch. 1. Fundamental Concept 99 Recursive condition 1.3.30  Similarly, to test 33333221, we seek a realization with a vertex w of degree 3 having three neighbors of degree 3. 3 3 3 3 3 2 2 1 2 2 2 3 2 2 1 Delete this Vertex A new degree sequence
  • 100. Graph Theory Ch. 1. Fundamental Concept 100 Recursive condition 1.3.30 This exists if and only if 2223221 is graphic. (See next page) – We reorder this and test 3222221. – We continue deleting and reordering until we can tell whether the remaining list is realizable. – If it is, then we insert vertices with the desired neighbors to walk back to a realization of the original list. – The realization is not unique.  The next theorem implies that this recursive test works.
  • 101. Graph Theory Ch. 1. Fundamental Concept 101 Recursive condition 1.3.30 33333221 3222221 221111 11100 2223221 111221 10111 wv u u v u
  • 102. Graph Theory Ch. 1. Fundamental Concept 102 Theorem. For n>1, an integer list d of size n is graphic if and only if d’ is graphic, where d’ is obtained from d by deleting its largest element ∆ and subtracting 1 from its ∆ next largest elements. The only 1-element graphic sequence is d1=0. 1.3.31 Proof: 1/6  For n =1, the statement is trivial.  For n >1, we first prove that the condition is sufficient. – Give d with d1≥…..≥dn and a simple graph G’ with degree sequence d’ For Example: We have: 1) d = 33333221 2) G’ with d’ = 2223221 We show: d is graphic G’
  • 103. Graph Theory Ch. 1. Fundamental Concept 103 Theorem. For n>1, an integer list d of size n is graphic if and only if d’ is graphic, where d’ is obtained from d by deleting its largest element ∆ and subtracting 1 from its ∆ next largest elements. The only 1-element graphic sequence is d1=0. 1.3.31 Proof: 2/6 – We add a new vertex adjacent to vertices in G’ with degrees d2-1,…..,d∆+1-1. – These di are the ∆ largest elements of d after (one copy of) ∆ itself, – Note : d2-1,…..,d∆+1-1 need not be the ∆ largest numbers in d’ (see example in previous page) G’ New added vertex d : d1,d2,… dn d’ : d2-1,…..,d∆+1-1,… dn May not be the ∆ largest numbers
  • 104. Graph Theory Ch. 1. Fundamental Concept 104 Theorem 1.3.31 continue  To prove necessity, 3/6 – Given a simple graph G realizing d , we produce a simple graph G’ realizing d’ – Let w be a vertex of degree ∆ in G, and let S be a set of ∆ vertices in G having the “desired degrees” d2,…..,d∆+1 d : d1, d2, …d∆, d∆+1,… dn S: ∆ verticesd1=∆ w
  • 105. Graph Theory Ch. 1. Fundamental Concept 105 Theorem 1.3.31 Proof: continue 4/6 – If N(w)=S, then we delete w to obtain G’. d : d1, d2, …d∆, d∆+1,… dn ∆Vertices, N(w)=S i.e. They are connected to w d1=∆ w Delete w than we have d’ : d2-1,…..,d∆+1-1,… dn
  • 106. Graph Theory Ch. 1. Fundamental Concept 106 Theorem 1.3.31 Proof: continue 5/6 – Otherwise, • Some vertex of S is missing from N(w). • In this case, we modify G to increase |N(w)∩S| without changing any vertex degree. • Since |N(w)∩S| can increase at most ∆ times, repeating this converts G into another graph G* that realizes d and has S as the neighborhood of w. • From G* we then delete w to obtain the desired graph G’ realizing d’. d : d1, d2, …d∆, d∆+1,… dn ∆Vertices, N(w)≠S i.e. Some vertices are not connected to w. - We make them become connected to w without changing their degree. d1=∆ w
  • 107. Graph Theory Ch. 1. Fundamental Concept Theorem 1.3.31 Proof: continue 6/6 • To find the modification when N(w)≠S , we choose x∈S and z∉S so that w z are connected and w x are not. • We want to add wx and delete wz, but we must preserve vertex degrees. Since d(x)>d(z) and already w is a neighbor of z but not x, there must be a vertex y adjacent to x but not to z. Now we delete {wz,xy} and add {wx,yz} to increase |N(w)∩S| . w z x y This y must exist. w z x y⇒ It becomes connected w
  • 108. Graph Theory Ch. 1. Fundamental Concept 108 2-switch 1.3.32  A 2-switch is the replacement of a pair of edges xy and zw in a simple graph by the edges yz and wx, given that yz and wx did not appear in the graph originally. wx y z y z wx
  • 109. Graph Theory Ch. 1. Fundamental Concept 109 Theorem: If G and H are two simple graphs with vertex set V, then dG(v)=dH(v) for every v∈V if and only if there is a sequence of 2-switches that transforms G into H. 1.3.33 Proof:  Every 2-switch preserves vertex degrees, so the condition is sufficient.  Conversely, when dG(v)=dH(v) for all v∈V , we obtain an appropriate sequence of 2-switches by induction on the number of vertices, n.  If n<3, then for each d1,…..,dn there is at most one simple graph with d(vi)=di.  Hence we can use n=3 as the basis step.
  • 110. Graph Theory Ch. 1. Fundamental Concept 110 Theorem. 1.3.33 (Continue)  Consider n≥4 , and let w be a vertex of maximum degree,∆  Let S={v1,…..,v∆} be a fixed set of vertices with the ∆ highest degrees other than w  As in the proof of Theorem 1.3.31, some sequence of 2-switches transforms G to a graph G* such that NG*(w)=S, and some such sequence transforms H to a graph H* such that NH*(w)=S  Since NG*(w)=NH*(w), deleting w leaves simple graphs G’=G*-w and H’=H*-w with dG’(v)=dH’(v) for every vertex v
  • 111. Graph Theory Ch. 1. Fundamental Concept 111 Theorem. 1.3.33 Continue  By the induction hypothesis, some sequence of 2- switches transforms G’ to H’. Since these do not involve w, and w has the same neighbors in G* and H*, applying this sequence transforms G* to H*.  Hence we can transform G to H by transforming G to G*, then G* to H*, then (in reverse order) the transformation of H to H*.
  • 112. Graph Theory Ch. 1. Fundamental Concept 112 Directed Graph and Its edges 1.4.2  A directed graph or digraph G is a triple: – A vertex set V(G), – An edge set E(G), and – A function assigning each edge an ordered pair of vertices. • The first vertex of the ordered pair is the tail of the edge • The second is the head • Together, they are the endpoints.  An edge is said to be from its tail to its head. – The terms “head” and “tail” come from the arrows used to draw digraphs.
  • 113. Graph Theory Ch. 1. Fundamental Concept 113 Directed Graph and its edges 1.4.2  As with graphs, we – assign each vertex a point in the plane and – each edge a curve joining its endpoints.  When drawing a digraph, we give the curve a direction from the tail to the head.
  • 114. Graph Theory Ch. 1. Fundamental Concept 114 Directed Graph and its edges 1.4.2  When a digraph models a relation, each ordered pair is the (head, tail) pair for at most one edge. – In this setting as with simple graphs, we ignore the technicality of a function assigning endpoints to edges and simply treat an edge as an ordered pair of vertices.
  • 115. Graph Theory Ch. 1. Fundamental Concept 115 Loop and multiple edges in directed graph 1.4.3  In a graph, a loop is an edge whose endpoints are equal.  Multiple edges are edges having the same ordered pair of endpoints.  A digraph is simple if each ordered pair is the head and tail of the most one edge; one loop may be present at each vertex. Loop Multiple edges
  • 116. Graph Theory Ch. 1. Fundamental Concept 116 Loop and multiple edges in directed graph 1.4.3  In the simple digraph, we write uv for an edge with tail u and head v. – If there is an edge form u to v, then v is a successor of u, and u is a predecessor of v. – We write u→v for “there is an edge from u to v”. Predecessor Successor
  • 117. Graph Theory Ch. 1. Fundamental Concept 117 Path and Cycle in Digraph 1.4.6  A digraph is a path if it is a simple digraph whose vertices can be linearly ordered so that there is an edge with tail u and head v if and only if v immediately follows u in the vertex ordering.  A cycle is defined similarly using an ordering of the vertices on the cycle.
  • 118. Graph Theory Ch. 1. Fundamental Concept 118 Underlying graph 1.4.9  The underlying graph of a digraph D: – the graph G obtained by treating the edges of D as unordered pairs; – the vertex set and edges set remain the same, and the endpoints of an edge are the same in G as in D, – but in G they become an unordered pair. The underlying GraphA digraph
  • 119. Graph Theory Ch. 1. Fundamental Concept 119 Underlying graph 1.4.9  Most ideals and methods of graph theorem arise in the study of ordinary graphs.  Digraphs can be a useful additional tool, especially in applications  When comparing a digraph with a graph, we usually use G for the graph and D for the digraph. When discussing a single digraph, we often use G.
  • 120. Graph Theory Ch. 1. Fundamental Concept 120 Adjacency Matrix and Incidence Matrix of a Digraph 1.4.10  In the adjacency matrix A(G) of a digraph G, the entry in position i, j is the number of edges from vi to vj.  In the incidence matrix M(G) of a loopless digraph G, we set mi,j=+1 if viis the tail of ejand mi,j= -1 if viis the head of ej.
  • 121. Graph Theory Ch. 1. Fundamental Concept 121 Example of adjacency matrix 1.4.11  The underlying graph of the digraph below is the graph of Example 1.1.19; note the similarities and differences in their matrices.             0000 1010 0101 0100             − ++−− −++ +− 10000 11110 01101 00011 w x y z w x y z w x y z a b c d e )(GA G )(GM a b ec d w x y z
  • 122. Graph Theory Ch. 1. Fundamental Concept 122 Connected Digraph 1.4.12  To define connected digraphs, two options come to mind. We could require only that the underlying graph be connected.  However, this does not capture the most useful sense of connection for digraphs.
  • 123. Graph Theory Ch. 1. Fundamental Concept 123 Weakly and strongly connected digraphs 1.4.12  A graph is weakly connected if its underlying graph is connected.  A digraph is strongly connected or strong if for each ordered pair u,v of vertices, there is a path from u to v.
  • 124. Graph Theory Ch. 1. Fundamental Concept 124 Eulerian Digraph 1.4.22  An Eulerian trail in digraph (or graph) is a trail containing all edges.  An Eulerian circuit is a closed trail containing all edges.  A digraph is Eulerian if it has an Eulerian circuit.
  • 125. Graph Theory Ch. 1. Fundamental Concept 125 Lemma. If G is a digraph with δ+ (G)≥1, then G contains a cycle. The same conclusion holds when δ- (G) ≥1. 1.4.23 Proof.  Let P be a maximal path in G, and u be the last vertex of P.  Since P cannot be extended, every successor of u must already be a vertex of P.  Since δ+ (G)≥1, u has a successor v on P.  The edge uv completes a cycle with the portion of P from v to u.
  • 126. Graph Theory Ch. 1. Fundamental Concept 126 Theorem: A digraph is Eulerian if and only if d+ (v)=d- (v) for each vertex v and the underlying graph has at most one nontrivial component. 1.4.24
  • 127. Graph Theory Ch. 1. Fundamental Concept 127 De Bruijn cycles 1.4.25  Application: – There are 2n binary strings of length n. – Is there a cyclic arrangement of 2n binary digits such that the 2n strings of n consecutive digitals are all distinct? – Example: For n =4, (0000111101100101) works. 0000 0001 0011 0111 1111 1110 1101 1011 … 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1
  • 128. Graph Theory Ch. 1. Fundamental Concept 128 De Bruijn cycles 1.4.25  We can use such an arrangement to keep track of the position of a rotating drum. – One drum has 2n rotational positions. – A band around the circumference is split into 2n portions that can be coded 0 or 1. – Sensors read n consecutive portions. – If the coding has the property specified above, then the position of the drum is determined by the string read by the sensors.
  • 129. Graph Theory Ch. 1. Fundamental Concept 129 De Bruijn cycles 1.4.25  To obtain such a circular arrangement, – define a digraph Dnwhose vertices are the binary (n-1)-tuples. – Put an edge from a to b if the last n-2 entries of a agree with the first n-2 entries of b. – Label the edge with the last entry of b.
  • 130. Graph Theory Ch. 1. Fundamental Concept 130 De Bruijn cycles 1.4.25 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 001 000 100 010 101 011 110 111 a b Put an edge from a to b if the last n-2 entries of a agree with the first n-2 entries of b. Label the edge with the last entry of b.  Below we show D4..
  • 131. Graph Theory Ch. 1. Fundamental Concept 131 De Bruijn cycles 1.4.25  We next prove that Dn is Eulerian and show how an Eulerian circuit yields the desired circular arrangement.
  • 132. Graph Theory Ch. 1. Fundamental Concept 132 Theorem. The digraph Dn of Application 1.4.25 is Eulerian, and the edge labels on the edges in any Eulerian circuit of Dn form a cyclic arrangement in which the 2n consecutive segments of length n are distinct. 1.4.26 Proof:  We show – first that Dn is Eulerian. – Then the labels on the edges in any Eulerian circuit of Dn form a cyclic arrangement in which the 2n consecutive segments of length n are distinct.
  • 133. Graph Theory Ch. 1. Fundamental Concept 133 Theorem. The digraph Dn is Eulerian 1.4.26 Proof: 1/2  Every vertex has out-degree 2 – because we can append a 0 or a 1 to its name to obtain the name of a successor vertex.  Similarly, every vertex has in-degree 2, – because the same argument applies when moving in reverse and putting a 0 or a 1 on the front of the name. 001 101 011 110 111
  • 134. Graph Theory Ch. 1. Fundamental Concept 134 Theorem. The digraph Dn is Eulerian 1.4.26 Proof: 2/2  Also, Dn is strongly connected, – because we can reach the vertex b=(b1,…..,bn-1) from any vertex by successively follows the edges labeled b1,…..,bn-1.  Thus Dn satisfies the hypotheses of Theorem 1.4.24 and is Eulerian. 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 001 000 100 010 101 011 110 111 a b1 1
  • 135. Graph Theory Ch. 1. Fundamental Concept 135 Theorem. The labels on the edges in any Eulerian circuit of Dn form a cyclic arrangement in which the 2n consecutive segments of length n are distinct. 1.4.26 Proof: 1/4  Let C be an Eulerian circuit of Dn. Arrival at vertex a=(a1,…..,an-1) must be along an edge with label an-1 – because the label on an edge entering a vertex agrees with the last entry of the name of the vertex. 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 001 000 100 010 101 011 110 111 a b
  • 136. Graph Theory Ch. 1. Fundamental Concept 136 Theorem. The labels on the edges in any Eulerian circuit of Dn form a cyclic arrangement in which the 2n consecutive segments of length n are distinct. 1.4.26 Proof: 2/4  The successive earlier labels (looking backward) must have been an-2,…..,a1 in order. – because we delete the front and shift the reset to obtain the reset of the name at the head 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 001 000 100 010 101 0 1 1 110 111 a b
  • 137. Graph Theory Ch. 1. Fundamental Concept 137 Theorem. The labels on the edges in any Eulerian circuit of Dn form a cyclic arrangement in which the 2n consecutive segments of length n are distinct. 1.4.26 Proof: 2/4  If C next uses an edge with label an, then the list consisting of the n most recent edge labels at that time is a1,…..an. 0 0 1 0 0 0 0 0 1 1 1 1 1 1 1 1 001 000 100 010 101 011 110 111 a b 0 1
  • 138. Graph Theory Ch. 1. Fundamental Concept 138 Theorem. The labels on the edges in any Eulerian circuit of Dn form a cyclic arrangement in which the 2n consecutive segments of length n are distinct. 1.4.26 Proof: 3/4  Since – the 2n-1 vertex labels are distinct, and – the two out-going edges have distinct labels, and – we traverse each edge exactly once 011 0 011 1 Distinct vertex label Distinct labels on out-going edges
  • 139. Graph Theory Ch. 1. Fundamental Concept 139 Theorem. The labels on the edges in any Eulerian circuit of Dn form a cyclic arrangement in which the 2n consecutive segments of length n are distinct. 1.4.26 Proof: 4/4  We have shown that the 2n strings of length n in the circular arrangement given by the edge labels along C are distinct.