- Original research
- Open access
- Published:
New algorithm for calculating chromatic index of graphs and its applications
Journal of the Egyptian Mathematical Society volume 27, Article number: 18 (2019)
Abstract
The problem of edge coloring is one of the fundamental problems in the graph theory. Graph coloring problem arises in several ways like to allocate scheduling and assignments. To follow this line of investigation, we design a new algorithm called “RF algorithm” to color the edges of a graph. In addition, we reinstate some classical results by applying the RF algorithm.
Introduction
The problem of edge coloring appeared with the four-color problem. In 1880, Tait wrote the first paper dealing with the problem of edge coloring. Tait proved that only three colors are used to color the edges of every 3-connected planar graph. An s-edge coloring, s is a positive integer, is a way to color edges with s colors. The chromatic index χ ΄ (x) is the minimum number of different colors needed to color edges such that any two adjacent edges are colored by different colors (for more details, see [1, 3,4,5, 7–9, 11,12,13,14]). Kӧnig has proved, in 1916, that χ ΄ (x) = ∆(x) for every bipartite graph. \( \frac{3\Delta (x)}{2} \) is the most number of colors that any graph can be edge-colored with, this was given by Shannon. Moreover, Vizing obtained for any simple graph ∆(x) + 1 ≥ χ ΄ (x). Omai et al. [10] determined the AVD-chromatic index for the powers of paths. Further, Lehner [6] established a result state that if every non-trivial automorphism of a countable graph G with distinguishing index D ΄ (G) moves infinitely many edges, then D ΄ (G) ≤ 2. Grzesik and Khachatrian [2] proved that k1, m, n is interval colorable iff gcd(m + 1, n + 1) = 1.
The above discussions motivate us to design a new algorithm to calculate the chromatic index of the graph. The main objective of our algorithm is to find a coloring that uses the smallest possible number of distinct colors. Some examples are given in support of our algorithm.
The main results
In this article, a new algorithm, RF coloring algorithm, will be designed to evaluate chromatic index of loopness graph. RF coloring algorithm is introduced as follows:
Consider a graph G of order n and size m. List its vertices as v1, v2, v3, … , vn and its edges as e1, e2, e3, … , em.
-
Step1. Write the incidence matrix of the graph G
-
Step2. In this step, we constitute the RF coloring matrix from the incidence matrix as follows:
-
(a)
In the first row of the RF matrix, put
-
(a)
After that put
In the same way, for entry \( {a}_{1j}^{\ast } \), where 1 < j ≤ m, put
-
(b)
Any column k has the entry \( {a}_{1k}^{\ast }=h \) put
where 1 < i ≤ n and 1 < k ≤ m.
-
(c)
Now start from the second row put
where 1 ≤ l ≤ m, 1 ≤ j ≤ m and 1 ≤ s ≤ n.
-
(d)
Any column l has the entry \( {a}_{2l}^{\ast }=f \) put
-
(e)
Again repeat steps (c) and (d) to complete the RF coloring matrix
-
Step3. The greatest number in the RF coloring matrix is the chromatic index of the graph G and the value of entry \( {a}_{ij}^{\ast } \) is the color of the edge \( {e}_j\ \mathrm{where}\ {a}_{ij}^{\ast}\boldsymbol{\ne}0 \).
In the following, we give examples solved by the new algorithm:
Example1. Let G be a graph shown below (Fig. 1).
The chromatic index of the graph G will be calculated by using the RF coloring algorithm as follows:
Then, the RF coloring matrix is given by
From the above matrix, we find the chromatic index χ ΄ (G) of the graph G is equal to 3.
Example2. Given a graph G, shown in Fig. 2.
Applying the RF coloring algorithm step by step to evaluate the colors of edges and chromatic index as shown in the sequence of matrices below:

Hence, the RF coloring matrix is given by
It is clear from the RF coloring matrix that the chromatic index of the graph G is 5, i.e., χ ΄ (G) = 5 and the color of e1, e7, e10 is 1, the color of e3, e4, e12 is 2, the color of e2, e5 is 3, the color of e6, e9 is 4, and the color of e8, e11 is 5.
In the following section, we reprove some theorems by using RF coloring algorithm
Theorem 1 Let Sn be a star graph of order n. Then, χ ΄ (Sn) = n − 1, where χ ΄ (Sn) is the chromatic index of Sn.
Proof Let Sn be a star graph of order n as shown in Fig. 3.
By applying the RF coloring algorithm, we found the RF coloring matrix is given by
The greatest number in the RF coloring matrix is n − 1, then the chromatic index of Sn equals n − 1.
Theorem 2 Let Cn be a cycle graph of order n. Then \( \chi \prime \left({C}_n\right)=\left\{\begin{array}{c}2\kern1em if\kern0.75em n\ is\ even\\ {}\ \\ {}3\kern1em if\kern1em n\ is\ odd\end{array}\right. \), where χ ΄ (Cn) is the chromatic index of Cn.
Proof Let Cn be a cycle graph of order n. Applying the RF coloring algorithm, we will stop when the RF coloring matrix will become
Now we want to evaluate the values of l and m and we have two cases:
Case 1. When n is even then l is the entry in \( {a}_{\left(n-1\right)\left(n-2\right)}^{\ast } \), i.e., l = 2. Since \( {a}_{\left(n-1\right)\left(n-2\right)}^{\ast }=2 \) and \( {a}_{nm}^{\ast }=2 \) then m = 1; hence, the RF coloring matrix is
and the chromatic index of Cn from the RF coloring matrix is 2, i.e., χ ΄ (Cn) = 2.
Case 2. When n is odd then l is the entry in \( {a}_{\left(n-1\right)\left(n-2\right)}^{\ast } \), i.e., l = 1. So, m = 3 because \( {a}_{\left(n-1\right)\left(n-2\right)}^{\ast }=1 \) and \( {a}_{\mathrm{nm}}^{\ast }=2 \); hence, the RF coloring matrix in this case is given by
and the chromatic index of Cn equals 3, i.e., χ ΄ (Cn) = 3.
One of the most famous applications on edge coloring of a graph is the timetable; let us give an example and solve it by our new algorithm as follows:
In a particular faculty of science, the Mathematics department has five teachers t1, t2, t3, t4, t5. The teaching assignments of the five teachers are given by the array:
I Year | II Year | III Year | IV Year | |
Y 1 | Y 2 | Y 3 | Y 4 | |
t 1 | 1 | 2 | __ | __ |
t 2 | 1 | 1 | 1 | __ |
t 3 | 1 | __ | __ | 2 |
t 4 | __ | __ | 1 | __ |
t 5 | __ | __ | 1 | 1 |
We want to find the minimum period timetable. To solve this problem, first we draw the graph corresponding to this problem, see Fig. 4
By applying the RF coloring algorithm, we find the RF coloring matrix is given by:
It is clear from the RF coloring matrix above that we have a 3-period timetable given by:
Period I | Period II | Period III | |
t 1 | Y 1 | Y 2 | Y 2 |
t 2 | Y 2 | Y 3 | Y 1 |
t 3 | Y 4 | Y 1 | Y 4 |
t 4 | __ | __ | Y 3 |
t 5 | Y 3 | Y 4 | __ |
Conclusion
In the present manuscript, we have designed a new algorithm to find the chromatic index to color the edges of a graph. It has been found that some classical results are successfully established by our new algorithm. The new introduced algorithm has been successfully applied to a real-life example where a correct result has been obtained. It has a great scope for further research in the field of graph theory, computer programming, and algebraic-specific structures.
References
Bondy, J.A., Murty, U.S.R.: Graph Theory, Graduate Texts in Mathematics Series, Elsevier Science Publishing Co. Inc., (2008)
Grzesik, A., Khachatrian, H.: Interval edge-colorings of k 1,m,n. Discret. Appl. Math. 174, 140–145 (2014) Elsevier
Harris, J.M., Hirst, J.L., Mossinghoff, M.J.: Combinatorial and Graph Theory. Springer science +Business Media, USA (2008)
Hermann, F., Hertz, A.: Finding the chromatic number by means of critical graphs. Electron. Nin. Discret. Math. 5, 174–176 (2000) Elsevier
Kandel, A., Bunke, H., Last, M.: Applied Graph Theory in Computer Vision and Pattern Recognition. Springer-Verlag, Berlin Heidelberg (2007)
Lehner, F.: Breaking graph symmetries by edge colourings. J. Combinatorial Theory, Series B. 127, 205–214 (2017) Elsevier
Liu, C., Zhu, E.: General vertex-distinguishing total coloring of graphs. J. Appl. Math. 2014, 7 (2014) Hindawi Publishing Corporation. https://doi.org/10.1155/2014/849748.
Luna, G., Romero, J.R.M., Moyao, Y.: An approximate algorithm for the chromatic number of graphs. Electron. Notes Discret. Math. 46, 89–96 (2014) Elsevier
Molloy, M., Reed, B.: Colouring graphs when the number of colours is almost the maximum degree. J. Combinatorial Theory, Series B. 109, 134–195 (2014) Elsevier
Omai, M.M., de Almeida, S.M., Sasaki, D.: AVD-edge coloring on powers of paths. Electron. Notes Discret. Math. 62, 273–278 (2017) Elsevier
Salama, F.: 1-mother vertex graphs. Int. J. Math. Comb. 1, 123–132 (2011)
Salama, F., Rafat, H., El-Zawy, M.: General-graph and inverse-graph. Appl. Math. 3, 346–349 (2012)
Salama, F., Rafat, H.: General-graph and inverse-graph. Appl. Math. 3, 346–349 (2012)
Tomon, I.: On the chromatic number of regular graphs of matrix algebras. Linear Algebra Appl. 475, 154–162 (2015) Elsevier
Acknowledgements
I am so grateful to the reviewers for their many valuable suggestions and comments that significantly improved the paper.
Funding
Department of Mathematics, Faculty of Science, Tanta University, Tanta, Egypt.
Availability of data and materials
Not applicable.
Author information
Authors and Affiliations
Contributions
The author worked on the results and also read and approved the final manuscript.
Corresponding author
Ethics declarations
Competing interests
The author declares that she has no competing interests.
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
About this article
Cite this article
Salama, F. New algorithm for calculating chromatic index of graphs and its applications. J Egypt Math Soc 27, 18 (2019). https://doi.org/10.1186/s42787-019-0018-9
Received:
Accepted:
Published:
DOI: https://doi.org/10.1186/s42787-019-0018-9