**4.1 Network design algorithm**

NetworkDesign is the main algorithm which iteratively executes the different phases that solve the GSP-SRC. The algorithm (shown in **Figure 2**) receives as entry *G* the original graph, *MaxIter* the number of iterations that is going to be executed, *k* an integer (parameter of the construction phase), the *threshold* of *T*-terminal reliability required, and the number of replications used in reliability phase.


**Figure 2.** *Global algorithm.*

	- i.Construction phase
	- ii.Survivability optimizer phase

The construction phase takes *G* as the input and returns a topology satisfying the node-connectivities given by *R*. Since the solution built by the construction phase is not even a local optimum, in order to improve this solution, survivability optimizer phase searches for a local optimum solution by means of a variable neighborhood search (VNS) [7, 8] algorithm designed specifically for the GSP-NC. Finally, the reliability phase is computed evaluating the *T*-terminal reliability of the solution achieved in (*ii*). If it surpasses the prefixed threshold, then the local optimal solution is added into the collection *L\_Sol*; otherwise, it is discarded. The algorithm returns a list *L\_Sol* of feasible solutions that satisfy the pre-established survivability and reliability requirements.
