# GASP: Genetic Algorithms for Service Placement in Fog Computing Systems
## 4 Experimental Results
### Sensitivity to Mutation and Crossover Probability  
As a final analysis, we consider the sensitivity of the genetic algorithm to the two probabilities that define the evolution of the population, that is, the mutation probability \(P_{mut}\) and the crossover probability \(P_{cx}\).  
Concerning the mutation probability, Figure 8 shows how this parameter affects the ability of the algorithm to reach a value close to the solver-based output through the \(\epsilon\) metric (Figure 7(a)) and how many generations it takes to converge (Figure 7(b)). We recall that, as the scenarios \(\delta\mu=0.01\) and \(\delta\mu=0.1\) achieve a value of \(\epsilon<1\%\) in the first generation, the number of generations to reach convergence is not meaningful in these cases. Focusing on the \(\epsilon\) metric, we observe for the scenarios a U-shaped curve that is more evident as \(\delta\mu\) increases. In this curve both low values (\(P_{mut}\leq 0.2\%\)) and high values (\(P_{mut}\geq 0.9\%\)) result in poor performance while values in the range \(0.4\%\leq P_{mut}\leq 0.8\%\) result in low values of \(\epsilon\).  
This behavior is explained considering the two-fold impact of mutations. On one hand, a low value of \(P_{mut}\) hinders the ability to explore the solutions space by creating variations in the genetic material. On the other hand, an higher mutation rate may simply reduce the ability of the algorithm to converge, because the population keeps changing too rapidly and good genes cannot be passed through the generations. The low values of \(P_{mut}\) has an interesting effect on the convergence curve for \(\delta\mu=1\) in Figure 7(b): low mutation rates result in a poor ability to explore the solution space, with a high variance in the number of generations to reach convergence; this value depends significantly on the initial population setup.  
The analysis shown in Figure 9 evaluates the impact of the probability of selecting an individual for a crossover operation \(P_{cx}\). Again, both \(\epsilon\) (Figure 7(a)) and the generations reach convergence (Figure 7(b)) as a function of this parameter. As we change the probability over a large range of values (from 0.1% to 20%), we use a logarithmic scale for the \(x\)-axis. From the analysis, we observe that also crossover probability has a major impact on the performance of the genetic algorithm, but this parameter has a different effect on the algorithm depending on the considered scenario. For \(\delta\mu=1\), low values of \(P_{cx}\) reduce the ability of the algorithm to converge rapidly; where, for higher values (that is \(P_{cx}\geq 0.8\%\)), this behavior does not occur. The reason for this is that a low crossover probability hinders the distribution of good genes in the population, thus slowing down the improvement of the population. For \(\delta\mu=0.01\) and \(\delta\mu=0.1\), the effect is opposite because for the exploration of the solution space, mutation is more important than crossover and a high crossover rate interferes with the mutation operator (when crossover is applied mutation does not occur) hindering its action.  
Figure 8: Sensitivity to Mutation Probability \(P_{mut}\).