I Read Stuff!!

Hanlon's Razor: Never attribute to malice that which can be adequately explained by stupidity.

Thursday, September 03, 2009

Urinal Considerations

This is a real intellectual urinal consideration.

No laughing.

My original source of this data is the XKCD blog, but it is currently broken. I don't know if it will recover, so I will recreate the Google cached version.

After reading this paper on such an important subject, see if you can't put your new knowledge to the test.

Urinal protocol vulnerability

When a guy goes into the bathroom, which urinal does he pick? Most guys are familiar with the International Choice of Urinal Protocol. It’s discussed at length elsewhere, but the basic premise is that the first guy picks an end urinal, and every subsequent guy chooses the urinal which puts him furthest from anyone else peeing. At least one buffer urinal is required between any two guys or Awkwardness ensues.

Let’s take a look at the efficiency of this protocol at slotting everyone into acceptable urinals. For some numbers of urinals, this protocol leads to efficient placement. If there are five urinals, they fill up like this:

The first two guys take the end and the third guy takes the middle one. At this point, the urinals are jammed — no further guys can pee without Awkwardness. But it’s pretty efficient; over 50% of the urinals are used.

On the other hand, if there are seven urinals, they don’t fill up so efficiently:

There should be room for four guys to pee without Awkwardness, but because the third guy followed the protocol and chose the middle urinal, there are no options left for the fourth guy (he presumably pees in a stall or the sink).

For eight urinals, the protocol works better:

So a row of eight urinals has a better packing efficiency than a row of seven, and a row of five is better than either.

This leads us to a question: what is the general formula for the number of guys who will fill in N urinals if they all come in one at a time and follow the urinal protocol? One could write a simple recursive program to solve it, placing one guy at a time, but there’s also a closed-form expression. If f(n) is the number of guys who can use n urinals, f(n) for n>2 is given by:

The protocol is vulnerable to producing inefficient results for some urinal counts. Some numbers of urinals encourage efficient packing, and others encourage sparse packing. If you graph the packing efficiency (f(n)/n), you get this:

This means that some large numbers of urinals will pack efficiently (50%) and some inefficiently (33%). The ‘best’ number of urinals, corresponding to the peaks of the graph, are of the form:

The worst, on the other hand, are given by:
So, if you want people to pack efficiently into your urinals, there should be 3, 5, 9, 17, or 33 of them, and if you want to take advantage of the protocol to maximize awkwardness, there should be 4, 7, 13, or 25 of them.

These calculations suggest a few other hacks. Guys: if you enter a bathroom with an awkward number of vacant urinals in a row, rather than taking one of the end ones, you can take one a third of the way down the line. This will break the awkward row into two optimal rows, turning a worst-case scenario into a best-case one. On the other hand, say you want to create awkwardness. If the bathroom has an unawkward number of urinals, you can pick one a third of the way in, transforming an optimal row into two awkward rows.

And, of course, if you want to make things really awkward, I suggest printing out this article and trying to explain it to the guy peeing next to you.


Edit: The protocol may not be international, but I’m calling it that anyway for acronym reasons.

1 Comments:

Anonymous Earl42 said...

It's funny because its true.

9/06/2009 9:43 PM  

Post a Comment

<< Home


Games
GameInterestRelease Date
Civilization IV1
C&C 31
Company of Heroes1
Half Life 21
Half Life 2: Episode One1
Supreme Commander1
Call of Duty 22
Darwinia2
Dungeon Runners2
Dungeon Siege II2
Far Cry2
Galactic Civilization II2
Hitman: Blood Money2
Jade Empire2
Neverwinter Nights 22
Prey2
Psychonauts2
Sam & Max: Episode 12
Titan Quest2
Dark Messiah Might and Magic3
Defcon3
Heroes of Might and Magic V3
Indigo Prophecy3
KOTOR II3
LEGO Star Wars3
Marvel Ultimate Alliance3
Space Rangers 2: The Rise of the Dominators3
STALKER: Shadow of Chernobyl3
Stubbs the Zombie3
War Front3
Warhammer: Mark of Chaos3
Infernal35/8/2007
Shadowrun25/9/07
Pirates of the Burning SeaM6/1/2007
Enemy Territory: Quake Wars?6/5/2007
Two Worlds?6/26/07
Sins of A Solar Empire?8/1/2007
BioShock18/21/2007
Mass Effect19/7/07
Age of ConanM10/30/07
Crysis1Fall 2007
Elveon?Fall 2007
Half-Life 2: Episode Two1Fall 2007
Portals1Fall 2007
Spore1Fall 2007
Stranglehold?Fall 2007
Tabula RasaMFall 2007
Team Fortress 22Fall 2007
Dragon Age?Winter 2007
Fable 2?Winter 2007
Field Ops?Winter 2007
Halo Wars?Winter 2007
Gods & Heroes: Rome RisingMWinter 2007
Haze?Winter 2007
Hellgate: London1Winter 2007
HuxleyMWinter 2007
Kane & Lynch: Dead Men?Winter 2007
Left 4 Dead?Winter 2007
The AgencyMSpring 2008
Empire Earth III?Spring 2008
Guild Wars 2 MSpring 2008
Jericho?Spring 2008
Sacred 2?Spring 2008
Savage 2?Spring 2008
Time Shift2Spring 2008
Universe at War: Earth Assault3Spring 2008
The Witcher?Spring 2008
CellFactor?2008
Darkest of Days?2008
On The Rain-Slick Precipice of Darkeness: Episode 122008
Warhammer OnlineM2008
Alliance: The Silent War??
Alone in the Dark??
Assassin's Creed??
BioWare MMO??
The Crossing??
Dungeon Hero??
Fallout 3??
Lego Batman??
Mythos??
Overloard??
Space Seige??
Culdcept SagaPC??
Gears of WarPC??
God of WarPC??
Beautiful KatamariPC??
OkamiPC??
Resistance: Fall of ManPC??
Odin's SpherePC??
Castle CrashersPC??

1 - I will buy it
2 - I'll buy it at discount
3 - Other people think it's good, but I wasn't interested when I first heard about it
M - Mainly Multiplayer. See if friends get interested.
? - Find out more about this game
PC? - Will it be released on the PC?