You are on page 1of 41

CIRCUITS AND GRAPH COLOURING

GROUP MEMBERS:
1. Irdina Huda bt. Zailan
2. Muhammad Izmaluddin b. Muhamad
3. NurulAin bt. Zaini
4. Shahida Aziera bt. Ruslan
5. Khor Jing Ying
BUT FIRST,
LET WE LEARN WHAT IS
VERTEX, EDGES & DEGREE 
A vertex (plural : vertices) is a point where two or more line segments meet.

An edge is also called as a


line.
Degree of 2 Degree of 3 Degree of 4

Degree The number of edges that lead to vertex.


EXAMPLE
S:

5 vertices: A, B, C, D, E
8 edges: AB, BC, CD, DE, EA, EB,
BD, EC
Vertices B and E have 4 edges
Vertices C and D have 3 edges
Vertices A has 2 edges
DEFINITION
EULER PATH EULER
CIRCUIT
A walk through the graph which An Euler path which starts and
uses every edge exactly once. stops at the same vertex

Starts & ends at Starts & ends at same


different vertices vertices
HOW TO KNOW THE GRAPH CONTAIN AN EULER PATH?

• For every vertex v other than the starting and ending vertices,
the path P enters v the same number of times than it leaves v
(say s times).

• Therefore, there are 2s edges having v as an endpoint.

• Therefore, all vertices other than the two endpoints of P


must be even vertices.

If a graph has an Euler Path, then it


must have exactly 2 odd vertices
HOW TO KNOW THE GRAPH CONTAIN AN EULER
CIRCUIT?
• Suppose that a graph G has an Euler circuit C.

• For every vertex v in G, each edge having v as an endpoint


shows up exactly once in C.

• The circuit C enters v the same number of times that it leaves v


(say s times), so v has degree 2s.

• That is, v must be an even vertex.

If a graph G has an Euler circuit, then all of its vertices


must be even vertices.
HOW MANY ODD
VERTICES?
6 8 6

2
Euler
4 8
Path
IS THERE AN EULER PATH?

Start

• Yes
End • There are 2 odd vertices, at B
and C
• Can start and end at either B or
C

Path: BBADEBCDC
End

Start

Path: CDCBADEBB
IS THERE AN EULER
CIRCUIT?
Find either all vertices are even or not

2 odd 4 odd
vertices vertices All vertices are even

4 odd
vertices
Euler circuit
A B

F G C

E D Path:
ABCDEGBDGGGAEFA
HAMILTON CIRCUITS,
PATHS AND GRAPH
DEFINITION OF HAMILTON CIRCUIT
Hamilton circuit is a circuit that visits every vertex exactly
once with no repeats.Being a circuit, it must start and end at
the same vertex.

A B

C
C

E D

Hamilton circuit is ABCDEA or it can also be


CDEAB as well.
DEFINITION OF HAMILTON PATH

Hamilton path is an undirected graph and also visits


every vertex once with no repeats, but does not have to
start and end at the same vertex.

A B

C Hamilton path is ABCDE or it can also be CBAED


and there are also many ways to do the
hamiltonian path as long as it visits every vertex
E once with no repeats.

D
CONDITIONS FOR HAMILTON CIRCUITS

➔ To determine if a graph is Hamiltonian is much more


difficult compare to Eulerian graph. Dirac’s and Ore’s
Theorem provide a suitable condition though.

DIREC’S THEOREM ORE’S THEOREM

A graph with n vertices (where n ≥ 3) is A graph with n vertices (where n ≥ 3) is


Hamiltonian circuit if the degree of Hamiltonian circuit if the sum of the
every vertex is greater and equal to degrees of every pair of non-adjacent
n/2. vertices is greater and equal n.
HAMILTON GRAPH ➔ Any connected graph that contains a
Hamiltonian circuit.

● This graph has hamiltonian circuit ABCDEFA.


● It visits every vertex of the graph exactly once.
● The edges are not repeated.
● Therefore, it is a Hamiltonian graph.

● This graph did not contain hamiltonian circuit or


hamiltonian path.
● Therefore, it is not a Hamiltonian graph.
Travelling Salesman Problem
Given a list of cities and the distances between each pair of cities, what is the
shortest possible route that visits each city exactly once and returns to the origin
city ?

Alandur A to C to B to D to A
2 + 13 + 9 + 1 = 25

1
2 A to B to D to C to A
4
Dallas 4 + 9 + 8 + 2 = 23

9 8
A to B to C to D to A

Bangkok 1 Cardiff 4 + 1 + 8 + 1 = 14
GRAPH COLOURING
Graph
Graph colouring
colouring problem
problem ::

••Given
Given aa graph,colour
graph,colour all
all the
the vertices
vertices so
so that
that two
two adjacent
adjacent vertices
vertices have
have
get
get different
different colours.
colours.

••One
One of
of the
the most
most famous
famous problem
problem in
in the
the topic
topic of
of graphs
graphs theory.
theory.

Objective : We have to use minimum numbers of colours.


In Mathematics,graphs is a set of object in which some pairs of
object that are connected by links. The interconnected objects or
the nodes called vertices with edges which links all the connecting
pairs.

Edge
Vertices/
nodes
 There are a few colours that represent object in each vertices such as
classes,book and etc.
 Vertex coloring is the most common graph coloring problem. The problem is,
given m colors, find a way of coloring the vertices of a graph such that no two
adjacent vertices are colored using same color. The other graph coloring problems
like Edge Coloring (No vertex is incident to two edges of same color) and Face
Coloring (Geographical Map Coloring) can be transformed into vertex coloring.
Two criteria for colour the graph :-
 No two adjacent vertices are allocated the same colour
 The number of colours used is minimised.
Some types of graph are easy to colour optimally

GRAPH 1 GRAPH 2

The smallest number of colours required to colour of a graph G is called its chromatic number of that
graph.
For example, chromatic number for this graph 1 is 2.
The smallest number of colours required to colour of a graph G is called its chromatic number of that
graph.
For example, chromatic number for this graph 1 is 2.
ANY GIVEN DAY. THE VERTICES OF THE GRAPH BELOW SHOW THE COURSES THAT ARE BEING TAKEN BY
MORE THAN ONE STUDENT, WITH AN EDGE CONNECTING TWO VERTICES IF THERE IS A STUDENT IN BOTH
COURSES. FIND A WAY TO COLOUR THE VERTICES OF THE GRAPH WITH ONLY FOUR COLOURS SO THAT NO
TWO ADJACENT VERTICES HAVE THE SAME COLOUR AND EXPLAIN HOW TO USE THE RESULT TO SCHEDULE
THE FINAL EXAMS.

MCS101 MCS102

MCS100
MCS110

MCS135 MCS120

MCS130
RED ORANGE BLUE GREEN
MCS101 MCS110 MCS100 MCS135
MCS102 MCS130 MCS120
COLOURING THEOREMS
DEFINITIONS
FOUR COLOR THEOREM : a map can be coloured by
using not more than four colours and the two
adjacent regions will not have the same colour.

FIVE COLOR THEOREM : a map can be coloured by


using not more than five colours so that the two
adjacent regions will not have the same colour.
EXAMPLES
Four Color Theorem
- Every planar graph
is 4-colorable.
- Chromatic number
of a planar graph is
at most 4.
Five Color Theorem
To prove Five Color Theorem by Induction

Arg : Every planar graph contains a vertex with deg(v)≤5.


Base : Assume P(n ≤ 5), so the graph can be coloured by 5
colours. (n – number of vertices)
Induction step : Assume P(n) is true.
Let n = 4, deg(v) ≤ 4  is true.
For P(n+1), deg(v) ≤ 5,
Case 1 : No direct edge —> true
Case 2 : Direct edge between v2 and v5 —> true
Hence, P(n+1) is proven.
APPLICATIONS OF
EULER/HAMILTON CIRCUITS AND
GRAPH COLOURING
APPLICATIONS OF EULER/HAMILTON CIRCUITS
 Solve Konigsberg Bridge problem
APPLICATIONS OF EULER/HAMILTON CIRCUITS
 Road construction
APPLICATIONS OF EULER/HAMILTON CIRCUITS
 Mail Delivery
APPLICATIONS OF EULER/HAMILTON CIRCUITS
 GPS & Google Maps
APPLICATIONS OF EULER/HAMILTON CIRCUITS
 Public transport road
APPLICATIONS OF EULER/HAMILTON CIRCUITS
 Web designing
APPLICATIONS OF GRAPH
COLOURING
 Traffic Lights system at crossroads
APPLICATIONS OF GRAPH
COLOURING
 Sudoku

You might also like