## 3 Design of the Proposed Solution
### Critical Switch Detection and Expected Load  
The criticality of switches is measured by the number of rules operations on each switch. It reflects the amount of traffic load between different \(s\)-\(t\) pairs passing through the switches. A switch serving an intermediary node \((N_{\Psi}\in N)\) for \(n\) number of shortest paths between \(s\)-\(t\) is considered more critical than ordinary \((N_{o}\in N)\) switches. This way, \(N_{\Psi}\) are heavily loaded with a large number of routing rules while \(N_{o}\) tend to have a small number of rules compared to \(N_{\Psi}\). The former and the latter are detected in two ways with the respect to the connectivity and expected traffic load. Regarding connectivity, the number of shortest paths \(k\) is returned from the initial discovery and routing path sets are used. Using \(k\), SCBR checks how many \(P_{i}\) of these paths passed through \(N_{\Psi}\). Therefore, the criticality of the \(C_{SCBR}\) node, \(N_{\Psi}\) of switch \(N\) uses the betweenness centrality (NBC) formula, \(k\) (\(s\), \(t\,|N_{\Psi}\))/\(k\) (\(s\), \(t\)) presented in equation 4. NBC is a concept that reflects the importance of node/switch about others in the network. The total expected traffic load of \(\sigma(N_{\Psi})\) on the switch \(N_{\Psi}\) is determined by the summation of rules \(\Sigma_{\mathcal{R}}\) (\(N_{\Psi}\)) for the flow demand whose passed through switch \(N_{\Psi}\). It is assumed that all switches originate the same amount of traffic. \[C_{SCBR}(N\,)=\sum_{(s,t)\in N,\ s\
eq t}\frac{k(s,t\,|N)}{k(s,t)},\ \sum \mathcal{R}(N) \tag{4}\]  
The traffic load on switch \(\sigma(N_{0})\) is obtained similarly with the critical switch \(N_{\Psi}\). Equation (5) represents the traffic load on both switches. As the \(C_{load}\) represents the switches traffic load, the initial switch traffic load is estimated first and then incremented at run time as the traffic flows evolve. The initial estimate of the \(C_{load}\), also referred to as network early-stage demand \(\mathrm{d_{e}}(s,t)\), is obtained by generating ping packets between some hosts at time \(t\) during the network booting time which in turn is also used during the network discovery stage. The procedure is demonstrated in Algorithm 2, lines 1-11. \[C_{load}=\sum(\sigma(N_{\Psi})\,\ \sigma(N_{0})) \tag{5}\]  
Obviously, generating equal traffic across all the switches may easily increase the rule update operations especially to critical switches. It is also important to note in computing \(C_{load}\), the total number of flows rules augment as the network size increase. In practice, this issue can be addressed by computing only a small subset of switches forming the path of route flow to destination. Therefore, computing \(C_{load}\) does not involve an exhaustive computation of all the summations of \(C_{load}\) presented in Equation (5) for the whole network. This way, SCBR focus on the given source to destination pairs switches on the path where the route path selection is restricted to the \(k\)-shortest path candidate for each demand pair \(\mathrm{d_{e}}(s,t)\), with \(k=5\). Since the role of switches differs, and similar roles apply among the switches \(N_{\Psi}\), the list of the topmost critical switches \(N_{\Psi}\) is also derived from Equation (6). Critical switches were restricted to the topmost critical switches. For instance, it is assumed that the switches frequency in each of the list of paths follows [PERSON]'s distribution with \(i=1\), and \(i\) to (\(\varphi\)). \[\varphi=\sum_{i=1}^{n}i=\frac{n}{2} \tag{6}\]  
RPSO focuses on routing flows through a path with a lightweight rule update operation. In other words, the rule update operation is proportional to the number of rules on the switch and critical switches exhibit such behavior. For this reason, it is important to explore paths together with their set of critical switches. As such, \(C_{SCBR}\) obtained the path with the least critical switches. Each critical switch \(N_{\Psi}\) is set with a flag value \(N_{\Psi\,flag}=1\).