0% found this document useful (0 votes)
30 views26 pages

Chap3 RO ThéorieDesGraphes

The document discusses graph theory concepts including defining graphs, paths, cycles, degrees, adjacency matrices, isomorphisms, and specific graph types like complete graphs and the Petersen graph. Graphs can model relationships and be used to solve problems like scheduling and matching.

Uploaded by

djalalmarwa7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views26 pages

Chap3 RO ThéorieDesGraphes

The document discusses graph theory concepts including defining graphs, paths, cycles, degrees, adjacency matrices, isomorphisms, and specific graph types like complete graphs and the Petersen graph. Graphs can model relationships and be used to solve problems like scheduling and matching.

Uploaded by

djalalmarwa7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Chapter 3 : Graph Theory

1
Topics

3.1 What Is a Graph?


3.2 Paths, Cycles, and Trails
3.3 Vertex Degree and Counting

2
3.1 What Is a Graph?

 A graph G is a triple consisting of:


X
– A vertex set V(G) e1 e6
e2
– An edge set E(G) W Y
e5
– A relation between an edge and a pair of vertices e4
e3 e7
Z

Definitions

 Loop: An edge whose endpoints are equal

 Multiple edges: Edges have the same pair of endpoints

Multiple
edges
loop 3
 Simple graph: A graph has no loops or multiple edges

Multiple
edges
loop

It is not simple. It is a simple graph.

 Two vertices are adjacent and are neighbors if


they are the endpoints of an edge. A B
 Example:
A and B are adjacent.
A and D are not adjacent. C D
4
 Finite graph: an graph whose vertex set and edge set are
finite.
 Null graph: the graph whose vertex set and edges are empty.

 Complement of G: The complement G’ of a simple graph G :


u
u
• A simple graph
v y
• V(G’) = V(G) y v

• E(G’) = { uv | uv E(G) }
w x w
x
G G’
 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. u
G
 Example:
y v
• {x, y, u} is a clique in G. 5
• {u, w} is an independent set. x w
 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
Boys Workers

Girls
Jobs

6
 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
Blue Green
x(G) = 3

Blue
Red

Example: Scheduling and graph Coloring

 Two committees can not hold meetings at the same


time if two committees have common member
Committee 1 Committee 2

common
member

7
 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
Committee 1 Committee 2

common
member

 Scheduling problem is equivalent to graph coloring problem.


Committee 2
common Common Member
member Different Color
Committee 1
Committee 3

No Common Member
Same Color OK 8
Same time slot OK
 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

e d
 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.
9
 Example: H1, H2, and H3 are subgraphs of G
a b

G c

e d
a b b
c a 10
H1 H2 H3 c
d
e d e d
 Connected Graph: There exists at least one path between two
vertices.
 Disconnected Graph : Otherwise
• Example:
 H1 and H2 are connected.
 H3 is disconnected.
a b b
c a
H1 d H2 H3 c
e d d
10
e
 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 vk is the number of edges incident upon vk .
It is denoted as d(vk)
ei
vj vk

 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}. w w x y z
b w 0 1 1 0
y z x
a c 1 0 2 0
e y 1 2 0 1
x d
z 0 0 1 0 11
 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.
w a b c d e
b w 1 1 0 0 0
y
a c z x 1 0 1 1 0
e
d
y 0 1 1 1 1
x
z 0 0 0 0 1
 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
w y c f1: w x y z
d
c b d a
G H f2: w x y z 12

x z a b a d b c
 Complete Graph: a simple graph whose vertices are pairwise
adjacent.

 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 Graph Complete Bipartite Graph

 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 13
 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)
12

45: (4, 5)
35
45 25 34
13 Disjoint, so
connected
24
14
15
23
 Three drawings

14
Theorem: If two vertices are non-adjacent in the Petersen Graph,
then they have exactly one common neighbor. 1.1.38

3 elements in these vertices totally

x, y x, z

u, v Since 5 elements totally,


5-3 elements left.
Hence, exactly one of this kind.
 Girth: the length of its shortest cycle.
• If no cycles, girth is infinite

Theorem: The Petersen Graph has girth 5.


15
 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.


 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.

16
 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.


Lemma: Every u,v-walk contains a u,v-path
Example:
Delete

W
u
P
v 17
 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 s u v w y z

q t p x

Theorem: Every graph with n vertices and k edges has at least n-k components.

n=2, k=1, n=3, k=2, n=6, k=3, n=6, k=3,


1 1 3 4 18
component component components components
 A cut-edge or cut-vertex of a graph is an edge or vertex
whose deletion increases the number of components.
Cut-edge Not a Cut-vertex

Cut-edge

Cut-vertex

 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.
G G-e

19
 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}

A B A B

E
C D C D
G G[T]
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)

20
A B B
A B B A

C
E
C D C D
C D
G1 G2 G3 G4

 A set S of vertices is an independent set if and only if the subgraph


induced by it has no edges.
B B
• G3 is an example. A

C
E
C D

G1 G3
Theorem: An edge e is a cut-edge if and only if e belongs to no cycles.
C
Example:
x e y
u v
P 21
Lemma: Every closed odd walk contains an odd cycle
Odd = Odd + Even

v
Odd
Even

Theorem: A graph is bipartite if and only if it has no odd cycle.


A B
Examples: A B
F C

E D

D C
A B
A B
C D
22
C D
E F
 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.
 An even graph is a graph with vertex degrees all even.
 A vertex is odd [even] when its degree is odd [even].
 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.

Lemma: If every vertex of graph G has degree at least 2, then G contains


a cycle.
Theorem: A graph G is Eulerian if and only if it has at most one
nontrivial component and its vertices all have even degree. 23
Proposition: Every even graph decomposes into cycles

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.

 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)
G A B
d(B) = 3, d(C) = 2
F C
Δ(G) = 3, δ(G) = 2
E D

24
 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

 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}.
25
Proposition: (Degree-Sum Formula)
If G is a graph, then vV(G)d(v) = 2e(G)

Theorem: If k>0, then a k-regular bipartite graph has the same


number of vertices in each partite set.
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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy