Cyclomatic number µ(G)
Let µ(G) is number of elements in such a basis of cycles. we consider graph G with n nodes
, m arcs and p is number of connect components so :
µ(G) = m − n + p
3.11 Planar graph
A planar graph is a graph that has the characteristic of being able to be represented on a
plane without any edges (or arcs for a directed graph) crossing each other.
3.12 Face
Region on the plane that is enclosed by edges of the graph + face infinity.
16
3.13 Euler’s Formula for Planar Graphs
For any connected planar graph with vertices n, edges m and faces f , we have
n−m+f =2
4 Coloring Graph
4.1 Definition
A coloring of vertices of G is said to be proper if no two adjacent vertices of G have the same
color.
17
4.2 Chromatic numberγ(G)
γ(G) = minimum number of colors of graph(G)
Example: Let consider with K5
18
4.3 Chromatic number properties
• Let Ord(G) = size of cliques maximum of G then γ(G) ≥ Ord(G)
• Brooks theorems: Let dmax (G) is a maximum degree in graph G then γ(G) ≤
dmax (G) + 1
4.4 Welsh Powell’s Algorithms
Algorithm 5 Welsh Powell’s Algorithms G = (V, E) , Output: upper bound color number
1. G′ ←− G :
2. Sort the vertices in descending order of their degrees
3. While not all vertices of G′ are colored Do
i. Choose a color k different from the colors already used
ii. Consider the first vertex not yet colored in the descending order of degrees and
assign it the color k
iii. Consider the other vertices not yet colored in the descending order of degrees
• If it is adjacent to a vertex already colored with k Then: Do not assign any
color to it
• Else assign it the color k
4. End While
19
Example1: Let G = (V, E) in figure below :
1. Applied Welsh Powell’s Algorithms to determine color of graph G:
2. Is the solution is optimize the color number?
Solution
20
Example2: Let G = (V, E) in figure below :
1. Applied Welsh Powell’s Algorithms to determine color of graph G:
2. Is the solution is optimize the color number?
Solution
21
4.5 Contraction
The contraction of a graph G is the graph obtained by identifying the vertices u and v, and
removing any edges between them.
Link - contract
• To color a complete graph (clique) containing n vertices, you need n colors.
• Take two unconnected vertices, u and v.
– If they have the same color, contract them
– If they have different colors, add an edge between them.
• Continue until the graph becomes a complete graph (clique)
Result:
22
4.6 Fundamental problem in product planning
Planning n tasks on k process in minimum time, with some tasks not being able to be exe-
cuted in parallel.
When all tasks have the same execution time =⇒ planning = graph coloring such that
each color appears no more than k times
4.7 Edge coloring
• Definition: The color the edges of G if no two adjacent edges have the same color.
′
• Chromatic index γ (G) is smallest number of colors needed to color the edges of G
without having two neighboring edges with the same color.
′
Figure 12: γ (G) = 4
4.8 Line Graph
Let graph L(G) = (Y, B) associated with G = (X, A)
• Y = A (a vertex per edge of G)
• [a, b] is an edge of L if and only if a and b have a common endpoint in G.
23
Note: Chromatic index of G is equal to Chromatic number of L(G)
24