# Provision of Energy- and Wavelength-Efficient Traffic
## 3 Traffic Grooming Algorithm Design
### Traffic Aggregation and Sub-Wavelength Assignment Algorithm  
(1) Definitions: The collection of all traffic requests is denoted by \(\mathcal{S}=\{\mathcal{S}_{1},\mathcal{S}_{2},\cdots,\mathcal{S}_{N}\}\), and the corresponding path set can be expressed as \(L_{\mathcal{S}}=\{L_{\mathcal{S}_{1}},L_{\mathcal{S}_{2}},\cdots,L_{\mathcal{S} _{N}}\}\). Noting that there is more than one path available for a request, thus we have \(L_{\mathcal{S}_{n}}=\{l_{1},l_{2},l_{3}\}\), where the \(l_{1}\), \(l_{2}\), and \(l_{3}\) represent the shortest, the second shortest, and the third shortest path, respectively. The requests can be divided into \(M\) nonoverlapped groups, i.e., \(\mathcal{U}=\{\mathcal{U}_{1},\mathcal{U}_{2},\cdots,\mathcal{U}_{M}\}\) where \(\mathcal{U}_{m}=\{\mathcal{S}_{m,1},\mathcal{S}_{m,2},\cdots,\mathcal{S}_{m,N_ {m}}\}\) and the corresponding paths satisfy \(L_{\mathcal{S}_{m,1}}\subseteq L_{\mathcal{S}_{m,2}}\subseteq\cdots L_{ \mathcal{S}_{m,N_{m}}}\). The requests within a group will be aggregated into a sub-wavelength. For any two groups \(\mathcal{U}_{i}\) and \(\mathcal{U}_{j}\), where \(\mathcal{U}_{i}\cap\mathcal{U}_{j}=\varnothing\), the preference \(\mathcal{U}_{i}\prec_{\mathcal{S}_{i}}\mathcal{U}_{j}\) indicates that the request \(\mathcal{S}_{n}\) is willing to be a part of group \(\mathcal{U}_{j}\), rather than group \(\mathcal{U}_{i}\). (2) Preference relation: Since the traffic transformation contributes to the major energy consumption, the preference of any request depends on the total used energy. Therefore, we denote the matching utility of the traffic aggregation as below. \[\Xi(\mathcal{S},\mathcal{U})=-\sum_{k}\left(E_{k}^{\mathit{sou}}+E_{k}^{ \mathit{des}}+E_{k}^{\mathit{int}}+\sum_{n\in\mathcal{Q}_{k}}I_{\mathit{In}}E_{ TX}\right) \tag{9}\]  
Our target is to minimize the total energy consumption meanwhile meeting the constraints \(C_{1}\)\(-\)\(C_{7}\). Therefore, the preference of the request improves when the matching utility increases. Requests can swap among different groups if less energy consumption can be actualized. The swap operation of any request is decided by the strict preference. By compare-and-swap operations, the preference of all requests will reach and keep a final equilibrium state where the minimum energy consumption is achieved. For any request \(\mathcal{S}_{n}\) in group \(\mathcal{U}_{m}\), the preference is defined as below. \[ \begin{array}{c}\mathcal{U}_{i}\prec_{\mathcal{S}_{n}}\mathcal{U}_{j} \Leftrightarrow\Xi(\mathcal{U}_{i})+\Xi(\mathcal{U}_{j})>\\ \Xi(\mathcal{U}_{i}\backslash\{\mathcal{S}_{n}\})+\Xi(\mathcal{U}_{j}\cup\{ \mathcal{S}_{n}\})\end{array}  \tag{10}\]  
where \(\Xi(\mathcal{U}_{i})\) is the matching utility of the traffic aggregation in group \(\mathcal{U}_{i}\), which satisfies \(\mathcal{U}_{j}\in\mathcal{U}\cup\varnothing\) and \(\mathcal{U}_{i}\cap\mathcal{U}_{j}=\varnothing\). In this situation, the sum energy consumption of all connection requests in group \(\mathcal{U}_{i}\) and \(\mathcal{U}_{j}\) is strictly decreased if the request \(\mathcal{S}_{n}\) moves from group \(\mathcal{U}_{i}\) to group \(\mathcal{U}_{j}\). If the sum energy consumption of all connection requests in the changed groups is increased, the request \(\mathcal{S}_{n}\) tends to stay in the current group \(\mathcal{U}_{i}\), as shown below. \[ \begin{array}{c}\mathcal{U}_{i}\succ_{\mathcal{S}_{n}}\mathcal{U}_{j} \Leftrightarrow\Xi(\mathcal{U}_{i})+\Xi(\mathcal{U}_{j})\leq\\ \Xi(\mathcal{U}_{i}\backslash\{\mathcal{S}_{n}\})+\Xi(\mathcal{U}_{j}\cup\{ \mathcal{S}_{n}\})\end{array}  \tag{11}\]  
(3) Algorithm design for TAASA  
If the connection request \(\mathcal{S}_{n}\) is proposed by more than one sub-wavelength, it will select the sub-wavelength \(\mathcal{U}_{i}\) with the minimum sum energy consumption from the candidates and reject others. The objective of the matching algorithm is to search the matching pairs, and the key operation encompasses proposing phase and rejecting phase.