0% found this document useful (0 votes)
28 views18 pages

Lecture 19

The document defines key graph theory concepts such as walks, paths, circuits, connectedness, adjacency matrices, and Euler circuits. It provides examples of writing walks between vertices in a graph, determining if a sequence of vertices and edges is a path or other graph structure, and checking for connectivity in graphs. Matrix representations of graphs are introduced through adjacency matrices. Examples demonstrate drawing graphs based on given adjacency matrices and writing the adjacency matrix of a graph.

Uploaded by

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

Lecture 19

The document defines key graph theory concepts such as walks, paths, circuits, connectedness, adjacency matrices, and Euler circuits. It provides examples of writing walks between vertices in a graph, determining if a sequence of vertices and edges is a path or other graph structure, and checking for connectivity in graphs. Matrix representations of graphs are introduced through adjacency matrices. Examples demonstrate drawing graphs based on given adjacency matrices and writing the adjacency matrix of a graph.

Uploaded by

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

Ex: Find all possible subgraph for the following G graph

e3
e1
V1 ᴏ ᴏ V2

e2

deg (V1)= , deg (V2)= , deg (G)=


e2
e1
Aᴏ ᴏB
e3
Fᴏ e4
e6 ᴏC
Eᴏ
e7 e5
ᴏD

A walk from D to A can be written as following De5Ce3 Be1 A


Write the following walks
E to B:
A to E:
A to A:
C to F:
Def: let G be a graph of n-vertices then:
1- A walk from V to W is a finite sequence of vertices and edges of the form:
V0 e1V1e2V2 ...enVn
where V0=V and Vn=W
2- The trivial walk on V consists only V.
3- A path from V to W is a walk with no repeated edges. i.e. V0 e1V1e2V2 ...enVn s.t. ei  e j i, j
4- A simple path, is a path with no repeated vertices. i.e. V0 e1V1e2V2 ...enVn s.t. Vi  V j i, j
5- A closed walk is a walk that starts and ends at same vertex.
6- A circuit is a closed walk which has no repeated edge.
Ex:
e4
e2
V1ᴏ e1
ᴏ V2 ᴏ V3
e3

V1e1V2 e3V3 is a walk from to


is it path?
V1e1V2 e2V3e4V3e2V2 is it walk? Is it path?
write a path from V3 to V1
write a simple path from V1 to V3
write a walk that is not path from V1 to V3
write a walk that is path but not simple path from V2 to V3
write a close walk from V2
write a circuit from V3
Ex: Draw the graph for the following walk
Ae1Ce2 Be5 Ee4Ce3 D

Write 5 different close walk from C.


Def: A simple circuit is a circuit with no repeated vertices.
Ex: determine path, simple path, close, circuit or simple circuit.
e4
e5
e3 ᴏ V3 ᴏ V4
e2 e6
e7 e10
V1 ᴏ ᴏ V2
e1 e8 ᴏ V5
ᴏ V6 e9

V1e1V2 e3V3e4V3e5V4
V1e1V2 e3V3e5V4 e5V3e6V5 Path: no repeated edge
Simple path: no repeated vertex
V2V3V4V5V3V6V2 Close: start and end with same vertex
Circuit: no repeated edge
V2V3V4V5V6V2 Simple circuit: no repeated vertex

V2V3V4V5V6V3V2
V1
Def: let G be a graph. Two vertices V and W are connected, if  a walk between V and W. the
graph G is called connected, if for any two vertices,  a walk.
i.e. G connected  V , W  V (G ) a walk between V and W.
Ex: For the following G, determine the connectivity
ᴏV4
V2 ᴏ ᴏ
V3
ᴏV5
V1 ᴏ

V6 ᴏ

V2 and V3
V2 and V6
The graph G
Ex: determine the connectivity V4
V3
V1 and V3
G

A B V1 V2 V5

F ᴏH C

E D

B D

A F

C E
Def: Let G be a graph an Euler circuit for G is a circuit which contain all vertices and every
edge (only once).
i.e. Euler circuit
1- Circuit (close not repeated edge)
2- Use every vertex at least once
3- Use every edge exactly one time.
Ex: is it an Euler circuit?
ᴏV4
V2 ᴏ ᴏ
V3
ᴏV5
V1 ᴏ

V6 ᴏ
Ex: Konigsberg bridges problem.

Aᴏ

Dᴏ ᴏB

ᴏC
Theorem: If G is a graph having an Euler circuit, then every vertex is of even degree.
Ex: Does G have en Euler circuit? ᴏV 4

V2 ᴏ ᴏ
V3
ᴏV5
V1 ᴏ

V6 ᴏ

A B
Ex: Does G have en Euler circuit?

D C
Does every G contains even degree for all vertices an Euler circuit?
Theorem: If G is connected and the degrees of all vertices are even, then G ha san Euler
circuit.
i.e. Euler circuit  G connected + deg(Vi) is even  i.

Ex: check the Euler circuit

A D E

B C J H F
K
Matrix representation of a graph
Def: Let G be a graph of n-vertices. The matrix adjacency of G (or adjacent matrix of G) is a
matrix A of size n×n whose entries ai j
ai j : is the number of edges connected vertices V and V
i j
ai j could be either 0 or positive integers.
Ex:

B F
I
A

K
C D H
A B C D F H I K
0 
 
1 
1 
 
1 
A 
0 
0 
 
0 
0 
 
Ex: Let
1 2 0 1
 
2 0 0 1
A
1 1 1 0
 
1 2 0 1 

Draw a graph G having A as its adjacent matrix.


Remark: the adjacent matrix of a graph G is symmetric as ai  a j
j i

Ex: Draw the graph G having

1 2 
A   
 2 1

Ex: Draw the graph G having

1 2 1
 
A  2 1 3
1 2 1 

Ex: Draw the identity matric I 33

You might also like