Journal of Applied Mathematics

Volume 2019, Article ID 4073905, 7 pages

https://doi.org/10.1155/2019/4073905

## Rainbow Connectivity Using a Rank Genetic Algorithm: Moore Cages with Girth Six

Universidad Autónoma Metropolitana, Cuajimalpa 05348, Mexico

Correspondence should be addressed to M. Gómez-Fuentes; moc.mia@setneufzemogcm

Received 12 September 2018; Accepted 29 January 2019; Published 3 March 2019

Academic Editor: Ali R. Ashrafi

Copyright © 2019 J. Cervantes-Ojeda et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

A* rainbow **-coloring* of a -connected graph is an edge coloring such that for any two distinct vertices and of there are at least internally vertex-disjoint rainbow -paths. In this work, we apply a Rank Genetic Algorithm to search for rainbow -colorings of the family of Moore cages with girth six -cages. We found that an upper bound in the number of colors needed to produce a rainbow 4-coloring of a -cage is 7, improving the one currently known, which is 13. The computation of the minimum number of colors of a rainbow coloring is known to be NP-Hard and the Rank Genetic Algorithm showed good behavior finding rainbow -colorings with a small number of colors.

#### 1. Introduction and Definitions

Evolutionary algorithms have been applied to a wide variety of engineering problems [1], and they have also been applied to mathematics problems. For instance, Jong and Spears [2] showed that Genetic Algorithms (GA) can be used to solve NP-Complete problems, [3] applied a GA to a geometry problem, and [4] solved nonlinear algebraic equations by using a GA. Here we have successfully applied a Rank Genetic Algorithm (Rank GA) [5] to the graph theory problem of finding the rainbow connection number of a graph (). Chakraborty et al. [6] proved that, for a given graph , deciding whether is NP-Complete and that it is also NP-Complete to decide whether a given edge-colored (with an unbounded number of colors) graph is rainbow connected. Therefore, our motivation is to try using the Rank GA heuristic on this problem. To our best knowledge, this problem has not been approached in this way nor using any other heuristic algorithms.

In a genetic algorithm we have an initial population of individuals; in our case, each individual represents a particular edge-colored graph. Each individual of the population is evaluated according to a fitness function; this function measures the ability of the individual for reaching a predetermined objective. Once individuals are evaluated, the next generation is obtained by applying genetic operators to the population inspired by the evolution in nature, such as cross-over between individuals, selection of the fittest individuals, and mutations. This procedure is repeated until the genetic algorithm finds an individual that achieves the required objective or until a maximum number of generations are reached. A genetic algorithm can solve mathematical problems that are intractable by exhaustive search, as is the case of the problem described here.

A graph is -connected if and only if there are at least internally disjoint -paths connecting every two distinct vertices and of [7]. A* rainbow path* is a path such that all the edges of have different colors (a path of is a sequence of distinct vertices such that is an edge for ). An edge coloring of a graph is called a* rainbow **-coloring* if for every pair of distinct vertices and there are at least internally disjoint rainbow -paths. The* rainbow **-connectivity * (defined by Chartrand et al. [8]) of a graph is the minimum integer such that there exists an edge coloring using colors which is a rainbow -coloring. The rainbow -connectivity is known as the* rainbow connection number* and was introduced by Chartrand et al. [9].

The rainbow -connectivity of a graph has applications in the Cybernetic Security (see Ericksen [10]). For any fixed , deciding if is NP-Complete [6, 11]. For more references on rainbow connectivity and rainbow -connectivity we refer the reader to the survey by Li [12] et al. and the book of Li and Sun [13].

A graph is *-regular* if every vertex of has degree . The* girth* of is the length of a shortest cycle of . Given two integers and a *-cage* is a -regular graph with girth and the minimum possible number of vertices. Let denote the order of a -cage. For references on cages see the dynamic survey of Exoo and Jajcay [14]. By counting the vertices emerging from a vertex or from an edge the lower bound , known as the* Moore bound*, is obtained. That is, , whereWhen the -cage is called a* Moore **-cage*; for references on Moore cages see [15]. The Moore cages have been characterized [16–18]. The existence of -Moore cages is related to the existence of finite geometries. For instance, the -cage is the incidence graph of Fano’s plane. Concerning connectivity of -cages it has been proved that they are -connected [19].

Chartrand et al. [20] showed that the rainbow -connectivity of the -cage (the Moore cage known as Heawood graph) is between 5 and 7 inclusive. Recently, Balbuena et al. [21] proved that it is not 5, and they bounded the rainbow -connectivity of -cages as follows: if is a Moore -cage, thenIf is a -cage, then for , , and , respectively, we have , , and , respectively. In this paper we use a genetic algorithm to search for rainbow -colorings of -cages with and [21] in order to see if the upper bound for can be improved.

The structure of this paper is as follows. In Section 2 we explain how the Rank GA was applied to the rainbow coloring problem. Results are presented in Section 3 and finally the conclusions are drawn in Section 4.

#### 2. Finding Rainbow Colorings in a Moore Cage with a Genetic Algorithm

Finding a particular rainbow -coloring of a graph using colors (that is a coloring with internally disjoint rainbow paths between any pair of vertices) implies that . We use an adapted version of the Rank GA [5] to find rainbow colorings in a Moore cage. To do so, each individual in the population contains a list of the assigned colors of each edge in the graph and is initialized randomly. In the Rank GA, the individuals of the population are ranked from best to worst in terms of their fitness before the genetic operators (selection, recombination and mutation) are applied. The application of these genetic operators depends on the rank of each individual in the population. The top ranked individuals tend to vary less than the bottom ranked ones. This is to make the latter try to escape from local optima of the fitness function. Also, top ranked individuals tend to be cloned more than others who tend to disappear.

The adapted RankGA pseudocode that was used is given in Algorithm 1 and its parameters are shown in Table 1.