How fast can a bird search a tree?
Wednesday, February 21, 2018 at 9:04AM
Todd Hoff


I was wondering if you could help me figure something out: what is the algorithmic complexity of a bird searching a tree for food?

Over the years I've had the pleasure of watching a lot of cute little birds feed in our oak trees. I've noticed they have a search pattern.

A bird will hop from branch to branch looking for insects. They don't hop on a branch and explore every square inch of it, so it's not an exhaustive search. They'll take a couple hops, peck at a branch a few times, and hop to a nearby branch. Birds also search the underside of branches, so the whole surface area of a tree is game. 

I've often marveled in wonder at how efficient this whole process is. They scour huge trees in no time. Then they'll move on to the next tree and repeat the process until they fly away to a completely different area.

My dog when searching for a ball seems to follow a similar Lévy flight sort of pattern. Search a local area by bouncing around for bit and then take a bee-line for a completely different area and repeat the process. 

Often a flock will search a single tree at the same time, so there's parallelism at work here. A bird being on a branch doesn't lock the branch, but a new bird will jump to a different part of a branch if a branch has another bird on it already.

I haven't been able to determine if there's some signal, like a certain threshold number of birds flying away that tells the flock this tree has played out, or if each bird makes their own decisions locally. I don't know how they select trees either. They, it seems to me, enter a tree at random, not always starting at the top or bottom, and not performing on obvious depth or breadth first search. They don't seem to want to visit every branch of a tree either. They spend a limited amount of time in each tree before moving on.

An analogy to computing I've noticed is that it's the shape of thee tree itself that contributes to the efficiency of the search. A tree efficiently fills a certain volume of space with leaves and branches, optimizing for sunlight exposure. It's because branches are located on a trunk, relatively close together, often almost touching, with a fractal branching pattern that means branches lead to more branches which lead to more branches, that birds can make quick work if searching a tree for food.

When I see a bird jump from branch to branch, tree to tree, I see some sort of search algorithm. What I don't see is good way to describe it. Any ideas?

Article originally appeared on (
See website for complete article licensing information.