## 4 Algorithmic Approaches  
In this section, an algorithm is introduced that decomposes the models into two parts. An auxiliary linear programming model is initially solved to obtain a first solution, \(y_{i}\), for all \(i\in V\). For this purpose, we randomly generate an initial input vector, \(c_{i}\), for all \(i\in V\) that acts as the coefficients for the objective function of the following auxiliary optimization problem. \[M_{A1}:\min_{\{y\}} \sum_{i\in V}c_{i}y_{i} \tag{25}\] \[\text{st}: \sum_{j\in V}y_{j}=K\] (26) \[y\in\{0,1\}^{|V|} \tag{27}\]  
Notice that solving \(M_{A1}\) is trivial since it is a linear programming problem. Additionally, notice that we impose a predefined number of controllers, \(K\), in the output solution of the problem. Once we have obtained the output vector, \(y\), we introduce it as an input parameter in the following optimization problem. This parameter is denoted by \(\tilde{y}\):  
\[M_{A2}:\min_{\{x\}} \sum_{ \begin{subarray}{c}i\in V\\ (i=j)\end{subarray} }D_{ij}x_{ij} \tag{28}\] \[\text{st}: \sum_{j\in V}x_{ij}+\tilde{y}_{i}=1,\quad\forall i\in V,(i\
eq j)\] (29) \[x_{ij}<=\tilde{y}_{j},\quad\forall i,j\in V,(i\
eq j)\] (30) \[x_{ij}<=1-\tilde{y}_{i}\tilde{y}_{j},\quad\forall i,j\in V,(i \
eq j)\] (31) \[y\in\{0,1\}^{|V|} \tag{32}\]  
Observe that model \(M_{A2}\), which is linear now, is a decomposed version of model \(M_{2}\). This model aims to minimize the latency of connections between switch-controller pairs based on the given set of controllers obtained using \(M_{A1}\). By performing iterative swaps with the values of the input vector, \(c\), to solve model \(M_{A1}\), Algorithm 1 can be written:```
Data: An instance SDN input graph network. \(Iter=0\), \(IterMax=MaxValue\), \(MinGlobal=\infty\) Result: A feasible solution and its objective function value are obtained for the SDN network. Randomly generate the vector \(c\) that weights each controller. while(\(Iter\leq IterMax\))do  Randomly generate two different positions in vector \(c\) and denote them by \(pos1\) and \(pos2\), respectively. \(aux=c[pos1]\) \(c[pos1]=c[pos2]\) \(c[pos2]=aux\)  Solve the reduced model (25)-(27) to generate a feasible solution \(y\). Solve the reduced model (28)-(32) to obtain a feasible solution \(x\). Compute the objective function of \(F_{1}\) using \(y\) and \(x\). Denote it by \(Obj_{m}\). if(\(MinGlobal>Obj_{m}\))then \(y_{G}=y\) \(MinGlobal=Obj_{m}\) \(x_{G}=x\) \(C_{G}=c\) else \(c=C_{G}\) \(Iter=Iter+1\) Return the best feasible solution obtained and its objective function value. ```

**Algorithm 1**Proposed Local Search Meta-heuristic algorithm. The algorithm starts by initializing iteration counters and setting a maximum number of iterations. It randomly generates a vector \"c\" that weights controllers in the network. In each iteration, two positions in \"c\" are randomly selected and swapped. The algorithm then solves two models to produce feasible solutions: \"y\" and \"x\". The objective function value, denoted as \"Obj\", is calculated. If \"Obj\" is lower than the current global minimum, \"MinGlobal\", the best solutions and associated parameters are updated. If not, the vector \"c\" is reverted to its previous best configuration. The process continues until the maximum number of iterations is reached, at which point the best solution is found, and its objective value is returned. Finally, it is mentioned that Algorithm 1 has polynomial solving complexity in the order of \(O(IterMax*r^{3})\) to \(O(IterMax*r^{3}log(r))\) since we solve two linear programming subproblems [22]. ## 5 Results and Discussion

In this section, we conduct a series of computational experiments to compare the performance of all the proposed models and algorithms. Initially, we evaluated 13 real instances of the benchmark networks obtained from ([[https://www.topology-zoo.org/](https://www.topology-zoo.org/)]([https://www.topology-zoo.org/](https://www.topology-zoo.org/)) (accessed on 4 June 2024)). They range from networks with \(n=4\) to \(n=87\) nodes.