Chapitre 2 - Modeling by Graphs
Chapitre 2 - Modeling by Graphs
Introduction
Graphs are used to model various situations, enabling easier manipulation of
objects and their relationships through a natural graphical representation. The
set of mathematical tools developed in graph theory allows for the
demonstration of properties, the derivation of solution methods, algorithms,
and more. For example:
What is the shortest path (in terms of distance or time) to travel from one
city to another?
How can we minimize the total length of connections in a circuit?
Is it possible to make a street one-way without making city travel
impossible?
How can we organize a scheduling system?
3
Example:
The representation of a communication network, where vertices represent the
centers or nodes of the network and edges represent the links.
Does this network allow all nodes to communicate with each other, i.e.,
can one go from any given node to any other, either directly or via
intermediate nodes?
Given two nodes, find the paths connecting them, particularly the
"shortest path" in terms of the number of intermediate links.
4
Formally
Let G=(V,E) where the set of vertices V={1,2,3,4,5,6,7,8,9} represents the
different teams, and the set of edges
E={12,13,18,19,23,24,28,34,39,45,46,56,57,59,67,68,78,79} represents the
different matches.
The order of graph G is G =9, representing the number of teams (vertices).
The size of G is G =18, which is the number of matches (edges). To identify
which teams each team must face in the championship, we simply look for
the neighborhood of each vertex.
N(1)={2,3,8,9}, N(2)={1,3,4,8}, N(3)={1,2,4,9}, N(4)={2,3,5,6},
N(5)={4,6,7,9}, N(6)={4,5,7,8}, N(7)={5,6,8,9}, N(8)={1,2,6,7},
N(9)={1,3,5,7},
9
2) The first match in the championship is between team 1 and team 8. Using
the graph, we can determine which matches can take place on the same day,
given that each team plays only one match per day.
3) Example Variation: If each team must play only three matches, can
such a situation be modeled with a graph?
d
9
i 1
G (x i )
=
i 1
3 = 3 9 = 27
According to the Handshake Lemma, the sum of the degrees of a graph must
be an even number (2m), which contradicts the above result (27 is an odd
number).
Therefore, such a situation cannot be modeled using a graph.
12
What is the minimum number of colors required to color each Wilaya of the
map of Algeria (Figure 4) in such a way that no two neighboring Wilayas
share the same color?
Example
(a) Graph G colored with 5 colors (a) Graph G colored with 3 colors
Remarks
The structure of a graph imposes certain constraints on its chromatic number:
More formally, we aim to find a minimal partition of the vertex set into
independent sets (i.e., a minimal vertex coloring), which leads us to
determine the chromatic number of the graph.
We have the independent set S1={P1,P3,P5}, which can be colored the same
color, say red.