Skip to main content

New algorithm for calculating chromatic index of graphs and its applications

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, 79, 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

$$ I(G)=\left[\begin{array}{ccc}{a}_{11}& {a}_{12}& \dots \kern0.5em {a}_{1m}\\ {}{a}_{21}& {a}_{22}& \dots \kern0.5em {a}_{2m}\\ {}\begin{array}{c}\vdots \\ {}{a}_{n1}\end{array}& \begin{array}{c}\vdots \\ {}{a}_{n2}\end{array}& \begin{array}{cc}\begin{array}{c}\ddots \\ {}\dots \end{array}& \begin{array}{c}\vdots \\ {}{a}_{nm}\end{array}\end{array}\end{array}\right]. $$
  • Step2. In this step, we constitute the RF coloring matrix from the incidence matrix as follows:

    1. (a)

      In the first row of the RF matrix, put

$$ {a}_{11}^{\ast }=\kern0.75em \left\{\begin{array}{c}0\kern0.5em \mathrm{if}\kern0.75em {a}_{11}=0\\ {}\ \\ {}1\ \mathrm{if}\kern0.75em {a}_{11}=1\end{array}\right.. $$

After that put

$$ {a}_{12}^{\ast }=\left\{\begin{array}{ccc}0& \mathrm{if}& {a}_{12}=0\ \\ {}1& \mathrm{if}& {a}_{12}=1,{a}_{11}=0\ \\ {}2& \mathrm{if}& {a}_{11}={a}_{12}=1\end{array}\right.. $$

In the same way, for entry \( {a}_{1j}^{\ast } \), where 1 < j ≤ m, put

$$ {a}_{1j}^{\ast }=\kern0.75em \left\{\begin{array}{c}\kern4.25em 0\kern10.50em \mathrm{if}\kern0.75em {a}_{1j}=0\\ {}\ \\ {}\max \left\{{a}_{11}^{\ast },{a}_{12}^{\ast },\dots, {a}_{1\left(j-1\right)}^{\ast}\right\}+1\kern1em \mathrm{if}\kern0.75em {a}_{1j}=1\end{array}\ \right.. $$
  1. (b)

    Any column k has the entry \( {a}_{1k}^{\ast }=h \) put

$$ {a}_{ik}^{\ast }=\kern0.75em \left\{\begin{array}{c}h\kern1em \mathrm{if}\kern0.75em {a}_{ik}=1\\ {}\ \\ {}0\kern1em \mathrm{if}\kern0.5em {a}_{ik}=0\end{array}\ \right.. $$

where 1 < i ≤ n  and 1 < k ≤ m.

  1. (c)

    Now start from the second row put

$$ \left\{\begin{array}{ccc}{a}_{2l}^{\ast }=0& \mathrm{if}& {a}_{2l}=0\\ {}\min \left(\left\{{a}_{1j}^{\ast }:{a}_{1j}^{\ast}\ne 0,\right\}\backslash \left\{{a}_{2j}^{\ast },{a}_{sj}^{\ast }:{a}_{2j}^{\ast}\ne 0,{a}_{sj}^{\ast}\ne 0\right\}\right)& \mathrm{if}& {a}_{2l}=1,{a}_{Sl}=1,\left\{{a}_{1j}^{\ast }:{a}_{1j}^{\ast}\ne 0\right\}\backslash \left\{{a}_{2j}^{\ast },{a}_{Sj}^{\ast }:{a}_{2j}^{\ast}\ne 0\ne {a}_{Sj}^{\ast}\right\}\ne \AE \\ {}\max \left(\left\{{a}_{1j}^{\ast },{a}_{2j}^{\ast },{a}_{sj}^{\ast }:{a}_{1j}^{\ast}\ne 0,{a}_{2j}^{\ast}\ne 0\ne {a}_{sj}^{\ast },\right\}\right)+1& \mathrm{if}& {a}_{2l}=1,{a}_{Sl}=1,\left\{{a}_{1j}^{\ast }:{a}_{1j}^{\ast}\ne 0\right\}\backslash \left\{{a}_{2j}^{\ast },{a}_{Sj}^{\ast }:{a}_{2j}^{\ast}\ne 0\ne {a}_{Sj}^{\ast}\right\}=\AE \end{array}\right. $$

where 1 ≤ l ≤ m, 1 ≤ j ≤ m and 1 ≤ s ≤ n.

  1. (d)

    Any column l has the entry \( {a}_{2l}^{\ast }=f \) put

$$ {a}_{il}^{\ast }=\kern0.75em \left\{\begin{array}{c}f\kern1em \mathrm{if}\kern0.75em {a}_{il}=1\\ {}\ \\ {}0\kern1em \mathrm{if}\kern0.5em {a}_{il}=0\end{array}\right. $$
  1. (e)

    Again repeat steps (c) and (d) to complete the RF coloring matrix

$$ \mathrm{RCI}(G)=\left[\begin{array}{ccc}{a}_{11}^{\ast }& {a}_{12}^{\ast }& \dots \kern0.5em {a}_{1m}^{\ast}\\ {}{a}_{21}^{\ast }& {a}_{22}^{\ast }& \begin{array}{cc}\dots & {a}_{2m}^{\ast}\end{array}\\ {}\begin{array}{c}\vdots \\ {}{a}_{n1}^{\ast}\end{array}& \begin{array}{c}\vdots \\ {}{a}_{n2}^{\ast}\end{array}& \begin{array}{cc}\begin{array}{c}\ddots \\ {}\dots \end{array}& \begin{array}{c}\vdots \\ {}{a}_{nm}^{\ast}\end{array}\end{array}\end{array}\right] $$
  • 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).

Fig. 1
figure1

The graph G

The chromatic index of the graph G will be calculated by using the RF coloring algorithm as follows:

$$ I(G)=\left[\begin{array}{ccc}1& 1& 1\kern0.5em 0\\ {}1& 1& \begin{array}{cc}0& 1\end{array}\\ {}\begin{array}{c}0\\ {}0\end{array}& \begin{array}{c}0\\ {}0\end{array}& \begin{array}{cc}\begin{array}{c}1\\ {}0\end{array}& \begin{array}{c}0\\ {}1\end{array}\end{array}\end{array}\right]\kern1.25em \overset{\begin{array}{c}\mathrm{Since}\ {a}_{11}=1\\ {}\mathrm{Put}\ {a}_{11}^{\ast }=1\kern0.5em \end{array}}{\to}\left[\begin{array}{ccc}1& & \begin{array}{cc}& \end{array}\\ {}& & \begin{array}{cc}& \end{array}\\ {}\begin{array}{c}\\ {}\end{array}& \begin{array}{c}\\ {}\end{array}& \begin{array}{cc}\begin{array}{c}\\ {}\end{array}& \begin{array}{c}\\ {}\end{array}\end{array}\end{array}\right]\kern1.5em \overset{\begin{array}{c}\mathrm{Since}\kern0.5em {a}_{11}=1\\ {}{a}_{12}=1\\ {}\mathrm{Put}\ {a}_{12}^{\ast }=2\end{array}}{\to}\kern1.5em \left[\begin{array}{ccc}1& 2& \begin{array}{cc}& \end{array}\\ {}& & \begin{array}{cc}& \end{array}\\ {}\begin{array}{c}\\ {}\end{array}& \begin{array}{c}\\ {}\end{array}& \begin{array}{cc}\begin{array}{c}\\ {}\end{array}& \begin{array}{c}\\ {}\end{array}\end{array}\end{array}\right] $$
$$ \overset{\begin{array}{c}\mathrm{Since}\ {a}_{11}={a}_{12}={a}_{13}=1\\ {}\mathrm{Put}\ {a}_{13}^{\ast }=3\end{array}}{\to}\left[\begin{array}{ccc}1& 2& 3\kern0.5em \\ {}& & \begin{array}{cc}& \end{array}\\ {}\begin{array}{c}\\ {}\end{array}& \begin{array}{c}\\ {}\end{array}& \begin{array}{cc}\begin{array}{c}\\ {}\end{array}& \begin{array}{c}\\ {}\end{array}\end{array}\end{array}\right]\overset{\begin{array}{c}\mathrm{Since}\ {a}_{14}=0\\ {}\mathrm{Put}\ {a}_{14}^{\ast }=0\end{array}}{\to}\left[\begin{array}{ccc}1& 2& \begin{array}{cc}3& 0\end{array}\\ {}& & \begin{array}{cc}& \end{array}\\ {}\begin{array}{c}\\ {}\end{array}& \begin{array}{c}\\ {}\end{array}& \begin{array}{cc}\begin{array}{c}\\ {}\end{array}& \begin{array}{c}\\ {}\end{array}\end{array}\end{array}\right]\overset{\begin{array}{c}\mathrm{Column}\ 1\\ {}\mathrm{Put}\ {a}_{21}^{\ast }=1,\\ {}\ {a}_{31}^{\ast }={a}_{41}^{\ast }=0\kern0.5em \end{array}}{\to}\left[\begin{array}{ccc}1& 2& \begin{array}{cc}3& 0\end{array}\\ {}1& & \begin{array}{cc}& \end{array}\\ {}\begin{array}{c}0\\ {}0\end{array}& \begin{array}{c}\\ {}\end{array}& \begin{array}{cc}\begin{array}{c}\\ {}\end{array}& \begin{array}{c}\\ {}\end{array}\end{array}\end{array}\right] $$
$$ \overset{\begin{array}{c}\mathrm{Column}\ 2\\ {}\mathrm{Put}\ {a}_{22}^{\ast }=2,\\ {}\ {a}_{32}^{\ast }={a}_{42}^{\ast }=0\kern0.5em \end{array}}{\to}\left[\begin{array}{ccc}1& 2& 3\kern0.5em 0\\ {}1& 2& \begin{array}{cc}& \end{array}\\ {}\begin{array}{c}0\\ {}0\end{array}& \begin{array}{c}0\\ {}0\end{array}& \begin{array}{cc}\begin{array}{c}\\ {}\end{array}& \begin{array}{c}\\ {}\end{array}\end{array}\end{array}\right]\kern0.5em \overset{\begin{array}{c}\mathrm{Column}3\\ {}\mathrm{Put}\ {a}_{33}^{\ast }=3,\\ {}\ {a}_{23}^{\ast }={a}_{43}^{\ast }=0\kern0.5em \end{array}}{\to}\kern0.5em \left[\begin{array}{ccc}1& 2& \begin{array}{cc}3& 0\end{array}\\ {}1& 2& \begin{array}{cc}0& \end{array}\\ {}\begin{array}{c}0\\ {}0\end{array}& \begin{array}{c}0\\ {}0\end{array}& \begin{array}{cc}\begin{array}{c}3\\ {}0\end{array}& \begin{array}{c}\\ {}\end{array}\end{array}\end{array}\right]\overset{\begin{array}{c}{2}^{\mathrm{nd}}\mathrm{row}\\ {}\mathrm{Since}\ {a}_{24}=1\\ {}\mathrm{then}\ {a}_{24}^{\ast }=\max \left\{1,2,3\right\}\backslash \left\{1,2\right\}=3\end{array}}{\to }\ \left[\begin{array}{ccc}1& 2& \begin{array}{cc}3& 0\end{array}\\ {}1& 2& \begin{array}{cc}0& 3\end{array}\\ {}\begin{array}{c}0\\ {}0\end{array}& \begin{array}{c}0\\ {}0\end{array}& \begin{array}{cc}\begin{array}{c}3\\ {}0\end{array}& \begin{array}{c}\\ {}\end{array}\end{array}\end{array}\right] $$
$$ \kern0.5em \overset{\begin{array}{c}\mathrm{Column}\ 4\\ {}\mathrm{Put}\ {a}_{44}^{\ast }=3,\\ {}\ {a}_{43}^{\ast }=0\kern0.5em \end{array}}{\to}\kern0.5em \left[\begin{array}{ccc}1& 2& 3\kern0.5em 0\\ {}1& 2& \begin{array}{cc}0& 3\end{array}\\ {}\begin{array}{c}0\\ {}1\end{array}& \begin{array}{c}0\\ {}2\end{array}& \begin{array}{cc}\begin{array}{c}3\\ {}0\end{array}& \begin{array}{c}0\\ {}3\end{array}\end{array}\end{array}\right] $$

Then, the RF coloring matrix is given by

$$ \mathrm{RCI}(G)=\left[\begin{array}{ccc}1& 2& 3\kern0.5em 0\\ {}1& 2& \begin{array}{cc}0& 3\end{array}\\ {}\begin{array}{c}0\\ {}1\end{array}& \begin{array}{c}0\\ {}2\end{array}& \begin{array}{cc}\begin{array}{c}3\\ {}0\end{array}& \begin{array}{c}0\\ {}3\end{array}\end{array}\end{array}\right]. $$

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.

Fig. 2
figure2

The quartic graph

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:

figurea

Hence, the RF coloring matrix is given by

$$ \mathrm{RCI}(G)=\left[\begin{array}{c}1\\ {}1\\ {}\begin{array}{c}0\\ {}0\\ {}\begin{array}{c}0\\ {}0\end{array}\end{array}\end{array}\kern0.5em \begin{array}{c}0\\ {}3\\ {}\begin{array}{c}3\\ {}0\\ {}\begin{array}{c}0\\ {}0\end{array}\end{array}\end{array}\kern0.5em \begin{array}{ccc}\begin{array}{c}2\\ {}0\\ {}\begin{array}{c}2\\ {}0\\ {}\begin{array}{c}0\\ {}0\end{array}\end{array}\end{array}& \begin{array}{c}0\\ {}2\\ {}\begin{array}{c}0\\ {}2\\ {}\begin{array}{c}0\\ {}0\end{array}\end{array}\end{array}& \begin{array}{ccc}\begin{array}{c}3\\ {}0\\ {}\begin{array}{c}0\\ {}3\\ {}\begin{array}{c}0\\ {}0\end{array}\end{array}\end{array}& \begin{array}{c}4\\ {}0\\ {}\begin{array}{c}0\\ {}0\\ {}\begin{array}{c}0\\ {}4\end{array}\end{array}\end{array}& \begin{array}{ccc}\begin{array}{c}0\\ {}0\\ {}\begin{array}{c}1\\ {}0\\ {}\begin{array}{c}0\\ {}1\end{array}\end{array}\end{array}& \begin{array}{c}0\\ {}0\\ {}\begin{array}{c}5\\ {}0\\ {}\begin{array}{c}5\\ {}0\end{array}\end{array}\end{array}& \begin{array}{ccc}\begin{array}{c}0\\ {}4\\ {}\begin{array}{c}0\\ {}0\\ {}\begin{array}{c}4\\ {}0\end{array}\end{array}\end{array}& \begin{array}{c}0\\ {}0\\ {}\begin{array}{c}0\\ {}1\\ {}\begin{array}{c}1\\ {}0\end{array}\end{array}\end{array}& \begin{array}{cc}\begin{array}{c}0\\ {}0\\ {}\begin{array}{c}0\\ {}5\\ {}\begin{array}{c}0\\ {}5\end{array}\end{array}\end{array}& \begin{array}{c}0\\ {}0\\ {}\begin{array}{c}0\\ {}0\\ {}\begin{array}{c}2\\ {}2\end{array}\end{array}\end{array}\end{array}\end{array}\end{array}\end{array}\end{array}\right]. $$

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.

Fig. 3
figure3

A cycle graph Cn

By applying the RF coloring algorithm, we found the RF coloring matrix is given by

$$ \mathrm{RCI}\left({S}_n\right)=\left[\begin{array}{ccc}1& 2\kern0.5em 3& \kern0.5em \begin{array}{cc}\dots & n-1\end{array}\\ {}\begin{array}{c}1\\ {}0\end{array}& \begin{array}{c}\begin{array}{cc}0& 0\end{array}\\ {}\begin{array}{cc}2& 0\end{array}\end{array}& \begin{array}{cc}\begin{array}{c}\dots \kern1em \\ {}\dots \kern1.25em \end{array}& \begin{array}{c}0\\ {}0\end{array}\end{array}\\ {}\begin{array}{c}\vdots \\ {}0\end{array}& \begin{array}{c}\begin{array}{cc}\vdots & \vdots \end{array}\\ {}\begin{array}{cc}0& 0\end{array}\end{array}& \begin{array}{cc}\begin{array}{c}\kern0.5em \ddots \\ {}\dots \end{array}& \begin{array}{c}\kern0.75em \vdots \\ {}n-1\end{array}\end{array}\end{array}\right] $$

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

$$ \mathrm{RCI}\left({C}_n\right)=\left[\begin{array}{c}\begin{array}{c}\begin{array}{cc}1& 0\end{array}\kern0.5em \begin{array}{cc}0& \begin{array}{cc}\dots & \begin{array}{cc}0& \begin{array}{cc}0& 2\end{array}\end{array}\end{array}\end{array}\\ {}\begin{array}{cc}\begin{array}{cc}1& 2\end{array}& \begin{array}{cc}0& \begin{array}{cc}\dots & \begin{array}{cc}0& \begin{array}{cc}0& 0\end{array}\end{array}\end{array}\end{array}\end{array}\end{array}\\ {}\begin{array}{c}\begin{array}{cc}\begin{array}{cc}0& 2\end{array}& \begin{array}{cc}1& \begin{array}{cc}\dots & \begin{array}{cc}0& \begin{array}{cc}0& 0\end{array}\end{array}\end{array}\end{array}\end{array}\\ {}\begin{array}{c}\begin{array}{cc}\begin{array}{cc}\vdots & \vdots \kern0.5em \end{array}& \begin{array}{cc}\vdots & \begin{array}{cc}\ddots & \begin{array}{cc}\vdots &\ \begin{array}{cc}\vdots & \vdots \end{array}\end{array}\end{array}\end{array}\end{array}\\ {}\begin{array}{c}\begin{array}{cc}\begin{array}{cc}0& 0\end{array}& \begin{array}{cc}0& \begin{array}{cc}\dots & \begin{array}{cc}l& \begin{array}{cc}0& 0\end{array}\end{array}\end{array}\end{array}\end{array}\\ {}\begin{array}{c}\begin{array}{cc}\begin{array}{cc}0& 0\end{array}& \begin{array}{cc}0& \begin{array}{cc}\dots & \begin{array}{cc}l& \begin{array}{cc}m& 0\end{array}\end{array}\end{array}\end{array}\end{array}\\ {}\begin{array}{cc}\begin{array}{cc}0& 0\end{array}& \begin{array}{cc}0& \begin{array}{cc}\dots & \begin{array}{cc}0& \begin{array}{cc}m& 2\end{array}\end{array}\end{array}\end{array}\end{array}\end{array}\end{array}\end{array}\end{array}\end{array}\right]. $$

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

$$ \mathrm{RCI}\left({C}_n\right)=\left[\begin{array}{c}\begin{array}{c}\begin{array}{cc}1& 0\end{array}\kern0.5em \begin{array}{cc}0& \begin{array}{cc}\dots & \begin{array}{cc}0& \begin{array}{cc}0& 2\end{array}\end{array}\end{array}\end{array}\\ {}\begin{array}{cc}\begin{array}{cc}1& 2\end{array}& \begin{array}{cc}0& \begin{array}{cc}\dots & \begin{array}{cc}0& \begin{array}{cc}0& 0\end{array}\end{array}\end{array}\end{array}\end{array}\end{array}\\ {}\begin{array}{c}\begin{array}{cc}\begin{array}{cc}0& 2\end{array}& \begin{array}{cc}1& \begin{array}{cc}\dots & \begin{array}{cc}0& \begin{array}{cc}0& 0\end{array}\end{array}\end{array}\end{array}\end{array}\\ {}\begin{array}{c}\begin{array}{cc}\begin{array}{cc}\vdots & \vdots \kern0.5em \end{array}& \begin{array}{cc}\vdots & \begin{array}{cc}\ddots & \begin{array}{cc}\vdots &\ \begin{array}{cc}\vdots & \vdots \end{array}\end{array}\end{array}\end{array}\end{array}\\ {}\begin{array}{c}\begin{array}{cc}\begin{array}{cc}0& 0\end{array}& \begin{array}{cc}0& \begin{array}{cc}\dots & \begin{array}{cc}2& \begin{array}{cc}0& 0\end{array}\end{array}\end{array}\end{array}\end{array}\\ {}\begin{array}{c}\begin{array}{cc}\begin{array}{cc}0& 0\end{array}& \begin{array}{cc}0& \begin{array}{cc}\dots & \begin{array}{cc}2& \begin{array}{cc}1& 0\end{array}\end{array}\end{array}\end{array}\end{array}\\ {}\begin{array}{cc}\begin{array}{cc}0& 0\end{array}& \begin{array}{cc}0& \begin{array}{cc}\dots & \begin{array}{cc}0& \begin{array}{cc}1& 2\end{array}\end{array}\end{array}\end{array}\end{array}\end{array}\end{array}\end{array}\end{array}\end{array}\right] $$

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

$$ \mathrm{RCI}\left({C}_n\right)=\left[\begin{array}{c}\begin{array}{c}\begin{array}{cc}1& 0\end{array}\kern0.5em \begin{array}{cc}0& \begin{array}{cc}\dots & \begin{array}{cc}0& \begin{array}{cc}0& 2\end{array}\end{array}\end{array}\end{array}\\ {}\begin{array}{cc}\begin{array}{cc}1& 2\end{array}& \begin{array}{cc}0& \begin{array}{cc}\dots & \begin{array}{cc}0& \begin{array}{cc}0& 0\end{array}\end{array}\end{array}\end{array}\end{array}\end{array}\\ {}\begin{array}{c}\begin{array}{cc}\begin{array}{cc}0& 2\end{array}& \begin{array}{cc}1& \begin{array}{cc}\dots & \begin{array}{cc}0& \begin{array}{cc}0& 0\end{array}\end{array}\end{array}\end{array}\end{array}\\ {}\begin{array}{c}\begin{array}{cc}\begin{array}{cc}\vdots & \vdots \kern0.5em \end{array}& \begin{array}{cc}\vdots & \begin{array}{cc}\ddots & \begin{array}{cc}\vdots &\ \begin{array}{cc}\vdots & \vdots \end{array}\end{array}\end{array}\end{array}\end{array}\\ {}\begin{array}{c}\begin{array}{cc}\begin{array}{cc}0& 0\end{array}& \begin{array}{cc}0& \begin{array}{cc}\dots & \begin{array}{cc}1& \begin{array}{cc}0& 0\end{array}\end{array}\end{array}\end{array}\end{array}\\ {}\begin{array}{c}\begin{array}{cc}\begin{array}{cc}0& 0\end{array}& \begin{array}{cc}0& \begin{array}{cc}\dots & \begin{array}{cc}1& \begin{array}{cc}3& 0\end{array}\end{array}\end{array}\end{array}\end{array}\\ {}\begin{array}{cc}\begin{array}{cc}0& 0\end{array}& \begin{array}{cc}0& \begin{array}{cc}\dots & \begin{array}{cc}0& \begin{array}{cc}3& 2\end{array}\end{array}\end{array}\end{array}\end{array}\end{array}\end{array}\end{array}\end{array}\end{array}\right], $$

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

Fig. 4
figure4

The graph corresponding to the time table problem

By applying the RF coloring algorithm, we find the RF coloring matrix is given by:

$$ \left[\begin{array}{ccc}\begin{array}{c}\begin{array}{c}1\\ {}0\\ {}0\end{array}\\ {}\begin{array}{c}0\\ {}1\\ {}0\end{array}\\ {}\begin{array}{c}0\\ {}0\\ {}0\end{array}\end{array}& \begin{array}{c}\begin{array}{c}2\\ {}0\\ {}0\end{array}\\ {}\begin{array}{c}0\\ {}0\\ {}2\end{array}\\ {}\begin{array}{c}0\\ {}0\\ {}0\end{array}\end{array}& \begin{array}{cc}\begin{array}{c}\begin{array}{c}3\\ {}0\\ {}0\end{array}\\ {}\begin{array}{c}0\\ {}0\\ {}0\end{array}\\ {}\begin{array}{c}3\\ {}0\\ {}0\end{array}\end{array}& \begin{array}{c}\begin{array}{c}0\\ {}2\\ {}0\end{array}\\ {}\begin{array}{c}0\\ {}2\\ {}0\end{array}\\ {}\begin{array}{c}0\\ {}0\\ {}0\end{array}\end{array}\end{array}\end{array}\kern0.5em \begin{array}{ccc}\begin{array}{c}\begin{array}{c}0\\ {}3\\ {}0\end{array}\\ {}\begin{array}{c}0\\ {}3\\ {}0\end{array}\\ {}\begin{array}{c}0\\ {}0\\ {}0\end{array}\end{array}& \begin{array}{c}\begin{array}{c}0\\ {}1\\ {}0\end{array}\\ {}\begin{array}{c}0\\ {}0\\ {}1\end{array}\\ {}\begin{array}{c}0\\ {}0\\ {}0\end{array}\end{array}& \begin{array}{cc}\begin{array}{c}\begin{array}{c}0\\ {}0\\ {}3\end{array}\\ {}\begin{array}{c}0\\ {}0\\ {}3\end{array}\\ {}\begin{array}{c}0\\ {}0\\ {}0\end{array}\end{array}& \begin{array}{c}\begin{array}{c}0\\ {}0\\ {}1\end{array}\\ {}\begin{array}{c}0\\ {}0\\ {}0\end{array}\\ {}\begin{array}{c}0\\ {}1\\ {}0\end{array}\end{array}\end{array}\end{array}\kern0.5em \begin{array}{ccc}\begin{array}{c}\begin{array}{c}0\\ {}0\\ {}2\end{array}\\ {}\begin{array}{c}0\\ {}0\\ {}0\end{array}\\ {}\begin{array}{c}0\\ {}0\\ {}2\end{array}\end{array}& \begin{array}{c}\begin{array}{c}0\\ {}0\\ {}0\end{array}\\ {}\begin{array}{c}1\\ {}0\\ {}0\end{array}\\ {}\begin{array}{c}1\\ {}0\\ {}0\end{array}\end{array}& \begin{array}{cc}\begin{array}{c}\begin{array}{c}0\\ {}0\\ {}0\end{array}\\ {}\begin{array}{c}2\\ {}0\\ {}0\end{array}\\ {}\begin{array}{c}2\\ {}0\\ {}0\end{array}\end{array}& \begin{array}{c}\begin{array}{c}0\\ {}0\\ {}0\end{array}\\ {}\begin{array}{c}3\\ {}0\\ {}0\end{array}\\ {}\begin{array}{c}0\\ {}0\\ {}3\end{array}\end{array}\end{array}\end{array}\right] $$

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

  1. 1.

    Bondy, J.A., Murty, U.S.R.: Graph Theory, Graduate Texts in Mathematics Series, Elsevier Science Publishing Co. Inc., (2008)

  2. 2.

    Grzesik, A., Khachatrian, H.: Interval edge-colorings of k 1,m,n. Discret. Appl. Math. 174, 140–145 (2014) Elsevier

    Article  Google Scholar 

  3. 3.

    Harris, J.M., Hirst, J.L., Mossinghoff, M.J.: Combinatorial and Graph Theory. Springer science +Business Media, USA (2008)

    Google Scholar 

  4. 4.

    Hermann, F., Hertz, A.: Finding the chromatic number by means of critical graphs. Electron. Nin. Discret. Math. 5, 174–176 (2000) Elsevier

  5. 5.

    Kandel, A., Bunke, H., Last, M.: Applied Graph Theory in Computer Vision and Pattern Recognition. Springer-Verlag, Berlin Heidelberg (2007)

    Google Scholar 

  6. 6.

    Lehner, F.: Breaking graph symmetries by edge colourings. J. Combinatorial Theory, Series B. 127, 205–214 (2017) Elsevier

    MathSciNet  Article  Google Scholar 

  7. 7.

    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.

    MathSciNet  Google Scholar 

  8. 8.

    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

    MathSciNet  Article  Google Scholar 

  9. 9.

    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

  10. 10.

    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

    MathSciNet  Article  Google Scholar 

  11. 11.

    Salama, F.: 1-mother vertex graphs. Int. J. Math. Comb. 1, 123–132 (2011)

    MATH  Google Scholar 

  12. 12.

    Salama, F., Rafat, H., El-Zawy, M.: General-graph and inverse-graph. Appl. Math. 3, 346–349 (2012)

    MathSciNet  Article  Google Scholar 

  13. 13.

    Salama, F., Rafat, H.: General-graph and inverse-graph. Appl. Math. 3, 346–349 (2012)

    MathSciNet  Article  Google Scholar 

  14. 14.

    Tomon, I.: On the chromatic number of regular graphs of matrix algebras. Linear Algebra Appl. 475, 154–162 (2015) Elsevier

Download references

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

Affiliations

Authors

Contributions

The author worked on the results and also read and approved the final manuscript.

Corresponding author

Correspondence to F. Salama.

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.

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

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

Download citation

Keywords

  • Graph
  • Edge coloring
  • Chromatic index
  • Incidence matrix

2010 Mathematics subject classification

  • 05C15, 05C99, 05C90, 05C30.