*4.4. Genetic Algorithm*

GA is an evolutionary computation method created by John H. Holland [24], wherein the algorithm simulates the theory of evolution by Charles Darwin.

The process consists of taking a population of individuals which are composed of chromosomes and applying different genetic operations to the individuals chromosomes, combining them while aiming to improve some fitness function. At each iteration of the algorithm, called a generation, individuals pair up to create descendants creating a new generation. During this process, the chromosomes, which can represent a position in the problem domain, may suffer mutation, while the individuals derived from their parents are created from a crossover operation. At each generation, only the best suitable individuals survive and transmit their genes to the next generation.

To further specify how the GA is applied to the optimization problem, we define the fitness function as the function J in (9). In addition, the GA will have three operators: a proportional fitness selection to define the parents for each new individual, the crossover operator and the the mutation operator.

The first step in each iteration is to select the parents for the next generation. Here we apply a fitness proportional selection, i.e., the probability of each individual *i* at some generation *t* to be selected as a parent is proportional to J (**<sup>x</sup>***i*[*t*]). Mathematically, the probability of *i* being selected as a parent is defined as:

$$\Pr(\Phi\_i) = \frac{\mathcal{J}(\Phi\_i)}{\sum\_{j=1}^{N} \mathcal{J}(\Phi\_j)} \tag{24}$$

The crossover operator is responsible for combining the parent's chromosomes and generating the children's ones. To do this and simultaneously satisfy the constraints in Equations (10)–(12), we propose the use of a one-point crossover. To understand how the crossover operation is carried out, we first revisit the pilot sequence allocation hypermatrix which is a *K* × *Tp* × *L* hypermatrix. Moreover, the crossover point is set at one of the cells and is defined as -. Hence, the first child is made of the individual allocation matrices from both parents: from cell 1 to -, the matrices are from the first parent and from cell - + 1 to *L* from the second parent. Its sibling is the mirror of that, i.e., the first parent passes the matrices from - + 1 to *L*, while the second parent the matrices from 1 to -. We define - <sup>=</sup> *<sup>L</sup>*/2!.

The choice of this technique among the many others in the literature is involved in creating children to AG where they did not respect all the constraints of the problem domain. For this reason, the one-point crossover utilized granted that all children generated of crossing fathers are on the feasible solution for the problem.

To preserve the best solution throughout the generations if all the descendants at a given generation are worse than the best individual so far, we replace the worst individual of that generation with the best solution from the previous generation.

Finally, the mutation of an individual is carried out in a way that also satisfies the constraints in Equations (10)–(12). Without the loss of generality, let *K* = *Tp* be even. The first step of the mutation operator is to generate a random permutation of the numbers from one to *K* for each cell -. Let **p**- = [*p*1, ... , *pK*] be that permutation, the first half of the permutation **p**-, i.e., from *p*1 to *p K*2 , is paired up element-wise with the second half, that is *p K*2 +1 to *pK*. Finally, we perform operations in the child hypermatrix such that for each cell's permutation the users defined by the number in each half permutation swap their pilot sequence. It is worth noting that mutation does not happen for every individual since there is a mutation rate *Tm* ∈ (0, 1) which defines the probability of a mutation occurring in each member of a population.

These three operations happen at each iteration of the GA and are repeated until the maximum number of generations is achieved. The pseudocode for the adapted binary GA is presented in Algorithm 3.


The literature has other candidate solutions for use, but this problem as described in Section 2 is a combinatorial optimization problem. In a general way, the methods utilized are mathematically complex and in binary or integer scenarios. Considering all the constraints introduced, the approach in the literature is not easy to adapt.
