### Negative "eeny meeny miny moe"

August 19th, 2019
kids  [html]
As a kid, I learned the rhyme as:
Eeny, meeny, miny, moe,
Catch a tiger by the toe.
If he hollers, let him go,
Out goes Y, O, U!
Since kids can't predict where it will end, and adults are not supposed to try, it's a reasonably fair way of drawing lots.

At times I've heard versions where the selected person wins instead of loses, and while with two kids it doesn't matter, with three or more it matters a lot!

Let's model each kid having a choice at each stage between "accept" and "protest". While protesting probably doesn't work, if enough of you protest it might. If you do the positive version, where the selected kid wins, the winner accepts but the others may choose to protest. This isn't good: everyone has reason to protest except the single winner.

On the other hand, with the negative version, where one kid is eliminated at once, it's the other way around. When the first kid is eliminated they may protest, but the other kids all accept because then they retain their chance to win. With each successive round the dynamic is the same, plus the already-eliminated kids all choose accept out of a desire for fairness. Even with the last elimination there's still only one person choosing protest.

The iterative process is `O(n)` instead of `O(1)`, but it also works much better because it keeps a majority for "accept" at each stage.

(If you have a very large group of kids, then I could imagine a `O(log(n))` version being worth the added complexity. Divide the kids into three groups, and do negative eeny meeny miny moe on the groups. A third of the kids may protest, but you've still got two thirds accepting. Then redivide those remaining two thirds into three groups, and keep going.)

### Recent posts on blogs I like:

Recently a security hole in a certain open source Java library resulted in a worldwide emergency kerfuffle as, say, 40% of the possibly hundreds of millions of worldwide deployments of this library needed to be updated in a hurry. (The other 60% also …

via apenwarr January 1, 2022

#### The container throttling problem

This is an excerpt from an internal document David Mackey and I co-authored in April 2019. The document is excerpted since much of the original doc was about comparing possible approaches to increasing efficency at Twitter, which is mostly information tha…

via Posts on December 18, 2021

#### Experiences in raising children in shared housing

Sometimes I see posts about people’s hope to raise children in a group housing situation, and it often seems overly optimistic to me. In particular they seem to expect that there will be more shared childcare than I think should be expected. Today I talke…

via The whole sky October 18, 2021