## 2 Model Formulation
From the literature, the values of \(\delta_{g}\) for social insects (e.g., ants) should be in the range 0-1.75 [20,35]. Adopting a similar modeling approach for the non-reproductive worker population, the cost of all non-reproductive workers \(N_{w}\) to maintain their status in the colony is \(E_{w}\), given by \[E_{w}=\beta_{n}N^{\delta_{n}},\] which includes the energy cost of providing resources for the whole colony, such as brood care, foraging, etc. We assume that \(E_{w}\) is proportional to the total colony size \(N\) as the non-reproductive workers take care of the whole colony (and not just themselves, unlike gamergates). Based on their faster relative speed [32], non-reproductive workers most likely have a higher metabolic cost compared to gamergates [27], i.e., \(\delta_{n}\geq\delta_{g}\). Therefore, the relative cost for gamergates is defined by \[C_{g}=\frac{E_{g}}{E_{g}+E_{w}}=\frac{\beta_{g}N_{g}^{\delta_{g}}}{\beta_{g}N_ {g}^{\delta_{g}}+\beta_{n}N^{\delta_{n}}}.\] (1) Applying the similar arguments to non-reproductive workers \(N_{w}\), their relative cost is defined as \[C_{w} := \frac{E_{w}}{E_{g}+E_{w}}=\frac{\beta_{n}N^{\delta_{n}}}{\beta_{g}N _{g}^{\delta_{g}}+\beta_{n}N^{\delta_{n}}}\] Note that \(C_{g}+C_{w}=1\)
* **Colony Size \(N\)**: Let \(e\) be the average number of eggs produced per gamergate, then the total number of eggs produced at time \(t\) would be \(eN_{g}(t)\). The survival of eggs is directly linked to the care provided by the number of non-reproductive workers [32]. Thus, we assume that the survival rate of eggs is proportional to the relative cost of the worker class \(C_{w}\). Therefore, the input of new members is obtained as follows \[\text{New Colony Members}=\frac{e\beta_{n}N^{\delta_{n}}}{\beta_{g}N_{g}^{ \delta_{g}}+\beta_{n}N^{\delta_{n}}}N_{g}.\] (2) We assume that the colony has a density-dependent mortality rate due to limited resources, given by \[\mu=(d_{w}N_{w}+d_{g}N_{g})\] (3)
where \(d_{w}\) and \(d_{g}\) represent the mortality rate of workers and gamergates, respectively. Therefore, the colony size is modeled as follows \[\frac{dN}{dt} = \underbrace{\frac{\beta_{n}N^{\delta_{n}}}{\beta_{g}N_{g}^{\delta_{ g}}+\beta_{n}N^{\delta_{n}}}}_{\text{survival rate}}\frac{eN_{g}}{\text{eggs}}-\underbrace{\big{(}d_{w}N_{w}+d_{g}N_{g}\big{)}}_{ \text{density depend mortality rate}}N\] \((c)\) **Gamergates \(N_{g}\)** and **Workers \(N_{w}\)**: We adopt the concept of [15] to model that a non-reproductive worker would leave its worker status and enter into the gamergate phase when the worker's relative cost \(C_{w}\) is higher than the gamergate's relative cost \(C_{g}\), and vice versa [15; 32]. Since it has been shown that gamergates can revert to worker status [31] and non-reproductive workers can become gamergates [33], we assume that an ant can interchange between a gamergate and non-reproductive worker status based on the relative cost of remaining in a particular group. This relative cost derives from metabolic costs and is also related to its contribution to colony function. Thus, the population dynamics of gamergates is modeled as follows \[\frac{dN_{g}}{dt} = \underbrace{\max\{C_{w}-C_{g},0\}N_{w}}_{\text{switch from worker to gamergates}}-\underbrace{\max\{C_{g}-C_{w},0\}N_{g}}_{\text{switch from gamergates to worker}}-\underbrace{d_{g}NN_{g}}_{\text{Mortality}}\] (4)  
To model the non-reproductive workers' population dynamics, we assume that all newborns are in the non-reproductive worker status first, with the possibility of transitioning into the status of gamergates.