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.
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:
Related Posts: On this day...
- Federal Court: Recording cops an unambiguous first amendment right - 2011
- Mainstream press throws Wikileaks under a bus in journalist shield debate - 2010
- Tombstone stuffed with marijuana - 2010
- Massachusetts Representative (who raised local alcohol tax) caught during New Hampshire booze run - 2009
- DHS photography guidelines - 2009
- Open-source hardware design for a 67 TB array for $7867 - 2009
- The File Menu - 2009
- Google confirms Google Chrome Browser: Windows version release today - 2008
- VIA releases open source Xorg driver - 2008