## 5 Birkhoff Polytope  
A permutation group can represent all the possible configurations of the nodes. This finite group is wholly determined by matrices \(M_{i}\), as given in Table 1.  
Note that this group is discrete; however, it can be represented as the set \(\mathcal{B}_{3}\in\mathbb{R}^{3\times 3}\) that is schematically depicted in Figure 2. This set constitutes the convex hull of the six permutation matrices given in Table 1 and is called the Birkhoff polytope [26]. Each vertex corresponds to a feasible permutation, and the shaded part corresponds to the convex hull (i.e., the Birkhoff polytope). The vertices are a discrete set, but the entire polytope is a continuous and convex set given by (15). \[\mathcal{B}_{3}=\Big{\{}M\in\mathbb{R}^{3\times 3}:\ M\mathbf{1}_{3}=\mathbf{1}_ {3},M^{\top}\mathbf{1}_{3}=\mathbf{1}_{3},M\geq 0\Big{\}}. \tag{15}\]  
There are many interesting properties of \(\mathcal{B}_{3}\) that hold a direct physical interpretation. For example, \(\|M\|=1\), meaning that the total power in the original system is equal to the permutation's total power. In addition, the determinant of the matrix is \(\text{det}(M)=\pm 1\). A positive determinant indicates a permutation that does change the sequence of the grid. The feasible solutions of the problem are in the vertex of the Birkhoff polytope; therefore, the model must guarantee that each entry of \(M_{i}\) is binary, resulting in the following quadratic mixed-integer model:  
\[\min\ \sum_{l\in\mathbb{W}}\rho_{i}P_{L(i)} \tag{16}\] \[P_{L(i)} \geq\text{real}\left(\sum_{k=1}^{3n}\sum_{m=1}^{3n}y_{km}v_{ki}v_{ mi}^{*}\right)\ \forall i\in\mathbb{W}\] (17) \[S_{Ni}^{*} =A+BV_{Ni}+CV_{Ni}^{*}\ \forall i\in\mathbb{W}\] (18) \[S_{ki} =M_{k}\mathcal{S}_{ki}\ \forall k\in N,i\in\mathbb{W}\] (19) \[M_{k}\mathbf{1}_{3} =\mathbf{1}_{3}\ \forall k\in N\] (20) \[M_{k}^{\top}\mathbf{1}_{3} =\mathbf{1}_{3}\ \forall k\in N\] (21) \[M_{k} \geq 0\ \forall k\in N\] (22) Figure 2.0  
Stochastic non-linear mixed-integer problems, such as (1) to (3) are highly complicated to solve, so heuristic algorithms are commonly used to solve them [16]. However, the proposed approximations transform the problem from a general non-linear mixed \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Matrix** & **Value** & **Permutation** & **Determinant** \\ \hline \(M_{1}\) & \(\left(\begin{array}{ccc}1&0&0\\ 0&1&0\\ 0&0&1\end{array}\right)\) & ABC & +1 \\ \(M_{2}\) & \(\left(\begin{array}{ccc}0&1&0\\ 0&0&1\\ 1&0&0\end{array}\right)\) & BCA & +1 \\ \(M_{3}\) & \(\left(\begin{array}{ccc}0&0&1\\ 1&0&0\\ 0&1&0\end{array}\right)\) & CAB & +1 \\ \(M_{4}\) & \(\left(\begin{array}{ccc}1&0&0\\ 0&0&1\\ 0&1&0\end{array}\right)\) & ACB & \(-1\) \\ \(M_{5}\) & \(\left(\begin{array}{ccc}0&1&0\\ 1&0&0\\ 0&0&1\end{array}\right)\) & BAC & \(-1\) \\ \(M_{6}\) & \(\left(\begin{array}{ccc}0&0&1\\ 0&1&0\\ 1&0&0\end{array}\right)\) & CBA & \(-1\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Feasible permutations for the phase-balancing problem. Figure 2: Schematic representation of the Birkhoff polytope \(\mathcal{B}_{3}\). This is only a representation since the real politope belongs to the space \(\mathbb{R}^{3\times 3}\). integer problem to a convex-quadratic mixed-integer model, given by (16) to (23), since the objective function is quadratic and all the constraints are linear expressions with binary components; this type of problem may be solved in practice, using the Branch and Bound (B&B) algorithm [27]. The B&B algorithm departs from a relaxed problem; in this case, the convex quadratic programming problem QP. After that, a rooted tree is generated by branching non-binary variables, as shown in Figure 3, where \(m\) refers to the entries of each matrix \(M\) that represents the Birkhoff polytope. The B&B algorithm works efficiently in this case for two reasons: First, each node corresponds to a QP problem for whose solution there are high-speed algorithms; second, the Birkhoff polytope structure allows a geometric representation that helps to discard nodes in the tree.