## 4 Solution for MCRC Problem
### VM Selection  
VM selection is for overloaded hosts. The reason why we use the ARP algorithm is to avoid host overloading and SLAV as much as possible, rather than reactively responding to SLAV after its occurrence. Therefore, we assume that in time segment \(t_{k+1}\), there would be SLAV and overloaded hosts in the CDC, but not many. Regarding VM selection in \(t_{k}\) for \(h_{i}\), our priority is to select the VMs that may cause \(h_{i}\) to be overloaded during time segment \(t_{k+1}\) and form a list of VMs to be migrated. After the migration of these VMs is completed, if \(h_{i}\) is still overloaded in \(t_{k}\), it will be processed accordingly. Given a host \(h_{i}\) overloaded in the beginning of certain future time segment \(t_{l}\), we define its overloaded type \(ol\_type_{i,l}\). We check which inequalities in Equations (35)-(38) are satisfied by \(h_{i}\), so as to determine which resources in cpu, memory, disk, and network are involved in its overload state. Let the CPU, memory, disk, and network overloaded marks be **A**, **B**, **C**, and **D**, respectively. In time segment \(t_{l}\), they are denoted as \(\textbf{A}_{i,l}\), \(\textbf{B}_{i,l}\), \(\textbf{C}_{i,l}\), and \(\textbf{D}_{i,l}\), respectively, and their corresponding values are \(V(\textbf{A}_{i,l})=\frac{c_{i}^{cpu}-r_{i,l}^{ult}}{TH_{up}^{cpu}\times c_{i} ^{cpu}}\), \(V(\textbf{B}_{i,l})=\frac{c_{i}^{mem}-r_{i,l}^{ult}}{TH_{up}^{cpu}\times c_{i} ^{cpu}}\), \(V(\textbf{C}_{i,l})=\frac{c_{i}^{link}-r_{i,l}^{ult}}{TH_{up}^{total}\times c_{ i}^{data}}\), and \(V(\textbf{D}_{i,l})=\frac{c_{i}^{net}-r_{i,l}^{ult}}{TH_{up}^{total}\times c_{ i}^{data}}\). If \(h_{i}\) satisfies inequalities (35) and (37), that is, \(V(\textbf{A}_{i,l})>1\) and \(V(\textbf{C}_{i,l})>1\), then its overloaded type sequence can be denoted as \((\textbf{A}_{i,l}\textbf{C}_{i,l})\). We sort the overloaded resources in \(h_{i}\)'s overloaded type sequence in descending order according to the overloaded mark value. For example, if the initial overloaded type sequence of \(h_{i}\) is \((\textbf{A}_{i,l}\textbf{B}_{i,l}\textbf{C}_{i,l}\textbf{D}_{i,l})\), and \(V(\textbf{A}_{i,l})=0.1\), \(V(\textbf{B}_{i,l})=0.3\), \(V(\textbf{C}_{i,l})=0.05\), and \(V(\textbf{D}_{i,l})=0.2\), then the sorted overloaded type sequence is \((\textbf{B}_{i,l}\textbf{D}_{i,l}\textbf{A}_{i,l}\textbf{C}_{i,l})\). The sorted overloaded type sequence is \(ol\_type_{i,l}\) of \(h_{i}\) in \(t_{l}\). Regarding the above instance, \(ol\_type_{i,l}=(\textbf{B}_{i,l}\textbf{D}_{i,l}\textbf{A}_{i,l}\textbf{C}_{i,l})\). Given a VM \(v_{j}\), we define its workload type \(wl\_type_{j,l}\) in \(t_{l}\). Let its CPU, memory, disk, and network usage marks be **A**, **B**, **C** and **D**, respectively. In time segment \(t_{l}\), they are denoted as \(\textbf{A}_{i,l}\), \(\textbf{B}_{i,l}\), \(\textbf{C}_{j,l}\), and \(\textbf{D}_{j,l}\), respectively, and their corresponding values are \(V(\textbf{A}_{j,l})=\frac{c_{i}^{cpu}}{c_{max}^{mem}}\), \(V(\textbf{B}_{j,l})=\frac{c_{i}^{mem}}{c_{max}^{mem}}\), \(V(\textbf{C}_{j,l})=\frac{c_{j}^{disk}}{c_{max}^{mem}}\), and \(V(\textbf{D}_{j,l})=\frac{c_{j}^{out}}{c_{max}^{mem}}\), where \(c_{max}^{cpu}=max\{c_{i}^{cpu}|i\in[1,N]\}\), \(c_{max}^{mem}=max\{c_{i}^{mem}|i\in[1,N]\}\), \(c_{max}^{disk}=max\{c_{i}^{disk}|i\in[1,N]\}\), and \(c_{max}^{net}=max\{c_{i}^{net}|i\in[1,N]\}\). Let the initial workload type sequence of VM \(v_{j}\) be \((\textbf{A}_{j,l}\textbf{B}_{j,l}\textbf{C}_{j,l}\textbf{D}_{j,l})\). We sort the initial sequence in descending order according to the values of resource usage marks, and the sorted workload type sequence is \(wl\_type_{j,l}\). For example, if \(V(\textbf{A}_{j,l})=0.1\), \(V(\textbf{B}_{j,l})=0.09\), \(V(\textbf{C}_{j,l})=0.15\), and \(V(\textbf{D}_{j,l})=0.02\), then \(wl\_type_{j,l}=(\textbf{C}_{j,l}\textbf{A}_{j,l}\textbf{B}_{j,l}\textbf{D}_{j,l})\). Then, we define the complementary workload type \(cwl\_type_{j,l}\) of \(v_{j}\) in \(t_{l}\) as the reverse sequence of \(wl\_type_{j,l}\).