Faster task allocation by idle ants

We model and analyze the distributed task allocation problem, which is solved by ant colonies on a daily basis. Ant colonies employ task allocation in which ants are moved from one task to the other in order to meet changing demands introduced by the environment, such as excess or shortage of food, dirtier or cleaner nest, etc. The different tasks are: nursing (overseeing the hatching of newbies), cleaning, patrolling (searching for new food sources), and foraging (collecting and carrying the food to the nest). Ants solve this task allocation efficiently in nature and we mimic their mechanism by presenting a distributed algorithm that is a variant of the ants algorithm. We then analyze the complexity of the resulting task allocation distributed algorithms, and show under what conditions an efficient algorithm exists. In particular, we provide an $\Omega(n)$ lower bound on the time complexity of task allocation when there are no idle ants, and a contrasting upper bound of $O(\ln{n})$ when a constant fraction of the ants are idle, where $n$ is the total number of ants in the colony. Our analysis suggests a possible explanation of why ant colonies keep part of the ants in a colony idle, not doing anything.