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.

Discussion question: This is obviously a male-specific issue.  Can you think of any female-specific experiences that could benefit from some mathematical analysis, experiences which — being a dude — I might be unfamiliar with?  Alignments of periods with sequences of holidays? The patterns to those playground clapping rhymes? Whatever it is that goes on at slumber parties? Post your suggestions in the comments!

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

784 Responses to “Urinal protocol vulnerability”

  1. Fisherman's Friend says:

    I’ve got a female equation for you to solve. How far away does the nearest boat have to be for a woman to attempt to pee off the side of a boat?

    While fishing from behind a tree, I discovered that some women can pee extremely well while standing up. I’m sure that I would not have discovered this if I had been in plain sight. This begs the question: Just how far away from civilization does a woman have to get before she attempts to pee standing up?

  2. Hal Diggs says:

    all I can say is… pure genious.
    bah hah hah hah…

  3. Balrogspain says:

    Well, i dont really use this protocol, instead i cannot go to a urinal if there is a person 1 urinal away. EX. on the first diagram, if there is someone on the second, i go on the forth, if someones on first, i go on third or fifth. if someone is on 2 and on 4 then i go on 6. if there isnt a 6 then i’ll wait.

  4. Le Mew Mew says:

    I.C.U.P, Genius my friend, GENIUS!

  5. atomictown says:

    To anyone who may have suggested filling urinals 2k+1 where k=the order in which a man arrived in the restroom.

    You obviously missed the point that the idea is to minimize any chance of dong rays entering your eyes by maximizing the distance between your eyes and another dong.

    We’re not trying to fit as many dongs to urinals as possible, we’re trying to save our precious sight so it can be spent doing more productive things like watching videos of snatches on the internet.

  6. Giovanni says:

    Ahahah! Simply great!

    I love this useful/useless problem solved with math. Pleas post another one if you have.

  7. TGM says:

    Or… You can space them out some more and section them off somewhat and get a 0% chance of awkwardness!

    NB: Your post is very awesome!

  8. Fred says:

    One problem, though. What about the short urinal? The one that you don’t go in unless the awkwardness potential is too high?

  9. Daniel says:

    I’ve spent quite some time considering a special case of this problem, and I was delighted to see the overall question analysed in such detail.

    There is a row of three urinals in my place of residence which sees enough traffic to often be shared, and although the urinals are well spaced, awkwardness is still observably a consideration of many of the men who frequent them. In fact, one guy once told me off for choosing the middle urinal of the three. Perhaps he read this article, although I’m not sure if the dates match up.

    However, I do not consider my choice a ‘hack’, or at least I do not believe it is quite that simple. There are several different preferences any urinal chooser might exhibit that would change their behaviour when presented with a urinal choice. As well as those objectives mentioned here (maximising or minimising awkwardness), a chooser might seek to appear unconcerned by choosing the closest urinal from the door, or they might seek to minimise awkwardness between themselves and pre-existing urinal users, with no concern for those that arrive mid-flow. And, in my case, I generally choose an end urinal if there is already an end urinal occupied, to follow protocol and be distant from the original urinator, but I choose the middle urinal if I am alone, not particularly to create discomfort in others, but to prevent anybody else having the satisfaction of forcing their uncomfortable proximity on me when they arrive.

    To analyse this from a game theory perspective is particularly interesting – on the face of it, the first person arriving at a urinal can benefit themself by obeying protocol (if they care about proximity) or, if they do not care, then at no personal cost they can act unfavourably towards another player, either by causing them awkwardness, or by denying them the opportunity to deliberately create awkwardness. Therefore, for the person who, like me, does not care overly much about the proximity of other urinators, is the decision to take the centre urinal just griefing? I do not believe I aim specifically to cause discomfort in others (or “beat” the urinal protocol) when I take the middle of three urinals. Sometimes it’s just nice to be in control.

  10. nope, not sharing that says:

    An interesting game, in which the only winning move is not to play. Anyway, I like the soothing splash of water noise that peeing in the stall rewards me with.

  11. Raphael Briand says:

    Is there a proof of this anywhere? I really want to see how the function works and I can’t quite work it out for myself

  12. karmanya says:

    One question, What if the urinals have adequate opaque dividers in between? say, from the floor to about chest height? That should help solve general awkwardness, unless you’re next to a tall guy who likes to peer over the dividers.

  13. Szyzsnyk says:

    Has anyone considered the fact that the distance between urinals that you are comfortable with is inversely proportional to how INTENSELY you have to go???

  14. Muxec says:

    I discovered that people do not follow ICUP protocol but behave according to the laws of thermodynamics.

    There is a non-linear repulsion force between nearest neighbours. The probobability of chosing a given some urinal dpends on distance to occupied urinals and temperature. Only if the temperature is zero people follow ICUP.

  15. Dupin says:

    I disagree with one part of your premise, and that is that the man will always pick the urinal furthest from another urinal in use. I believe that the one-empty-urinal spacing is sufficient and more efficient, at least to the Awkward-Aware man.

    The Awkward-Aware man will insure a distance of at least empty urinal between him and any other urinal in use, but unlike the 7-urinal example, the third man will pick urinal 3 or 5 instead of 4. This is because he is Awkward-Aware and realizes instinctively that by picking 4, he forces the next man into an Awkward situation, and that that there is a 50% chance that this next man will put him into an equally Awkward situation whereas either other man (each of whom should leave earlier) only has a 25% chance of Awkwardness. Thereby, by choosing 4, he puts himself at a higher risk for Awkwardness.

    If he instead chooses 3 or 5, he leaves a urinal open for another man without Awkwardness arising. It is only if still another man chooses an open urinal will Awkwardness arise, and then in all cases, this will be a shared Awkwardness by three men, so it is less likely that the last man will enter into such an arrangement.

    The assumption is that one empty urinal is sufficient space to prevent Awkwardness. Those men who do not find this sufficient usually go to a stall in all cases as any other presence at a urinal or the threat of such presence is sufficient to keep them from using the urinal at all.

  16. JP says:

    Would this complex senario and mathmatitical formula always workout the same if I had walked into the urinal with an AR15 rifle with me ? or would I find a urinal with vacant spaces either side quite easily ?

  17. MarkW says:

    This is an awesome animation of why this formula MUST be followed!! World peace DEPENDS on it!
    http://www.youtube.com/watch?v=KnOaMC8KHA4&feature=related

  18. Anonymous says:

    I was wondering why this was even an issue, being a guy and not minding peeing next to someone in a urinal, when I read the comments and realized you were talking about urinals without dividers. I seriously haven’t seen a row of urinals without a divider between them in several years. What kind of backwards places are you going out to where the urinals have nothing between them?

  19. Jimi says:

    I’m surprised Anonymous claims not to have seen a urinal without a divider in years. I don’t know what great country that he lives in, but in mine (Canada), many urinals don’t (I’d say less than half).
    On one of my only two trips to the USA I went to the bathroom at a baseball stadium. There were not only no dividers, THEIR WASN’T EVEN URINALS, THERE WAS A BIG TROUGH! Not even kidding. One 50 foot long trough. Like those things animals eat out of. It didn’t look like anything that was meant for pissing into, it literally looked like cows or something should have been eating out of it.
    I don’t know how I managed to piss into it. It was a pretty awkward experience, 30 people with their dicks out and pretty much no way of avoiding seeing each other.
    That day my opinion of the USA went way down. Since then I’ve only been to big stadiums like that in Canada, and thankfully they were much better. I remember one with dividers and little tv screens infront of each urinal. Way more comfortable than just pulling your dick out in the open with a few dozen people in the room who can see.

  20. [...] blog do Xkcd escreveu um artigo descrevendo o que eles chamaram de International Choice of Urinal Protocol (Procotolo Internacional de Escolha de Mictório), que descreve os hábitos masculinos  na hora [...]

  21. HeXeY says:

    lol, this was just linked to in Norways biggest newspaper in an article about standing in line xD

  22. Scottbert says:

    Reminded me of http://www.radioactivepanda.com/comic/70 which might be Hat Guy’s solution as well…

    Good work, though I’d say I’m an awkward-aware guy as Dupin describes — because of it, I usually choose one at the end if a row is unoccupied.

    Still, great to see this analyzed — I wonder if there’s any way to get it to whoever designs men’s restrooms?

  23. joequincy says:

    I think I’m going to program this into my trusty TI-83 Plus and leave I.C.U.P. Efficiency Rating signs in all the bathrooms I visit now.

    xP

  24. steve says:

    Something else to ponder, from a social perspective, is the pervasiveness of the protocol even in circumstances where there are dividers between urinals. I have personally noticed that even in the presence of dividers, many men still follow the ICUP rules (even to the extent that some others waited for an ICUP-compliant position), even though the possibility of awkwardness was eliminated by the presence of the dividers.

    But I digress, this is beautifully written. I can finally explain this facet of male culture to my girlfriend in terms she’ll understand (she’s a math major :P ).

  25. [...] gaat over efficientie, dus eigenlijk ook weer wel. Hoe dan ook, ik wel het u niet onthouden, deze analyse omtrent het optimale aantal [...]

  26. this is the Pisot Sequence L(3,5): 3, 5, 9, 17, 33, 65, 129, 257, 513, 1025, 2049, 4097, 8193, 16385, 32769, 65537, 131073, 262145, 524289, 1048577, 2097153, 4194305, 8388609, 16777217, 33554433, 67108865, 134217729, 268435457, 536870913, 1073741825, 2147483649, 4294967297, 8589934593

  27. Diane says:

    Um, this might sound slightly odd, but why exactly is there a need for the urinal in the first place? Why are your bathrooms not designed like the women’s side? Full stalls, with a fully functional toilet in each one. The invention of the urinal just never made much sense to me. I mean, it’s like somebody decided one day, “Hey, let’s make a toilet specifically for men that women can’t use and is only half functional!” Seriously, you wanna experience awkwardness? Try having the sudden urge to defecate while urinating…and you guys out there can’t possibly tell me that’s never happened to you…so now you have to look for an open stall, with your still dripping equipment dangling about freely in front of a room full of other men. Stalls are good, stalls are your pal. LOL

  28. Jenny says:

    Does this equation also work in men’s showers? I assume there may be an open room with shower heads. I was also under the impression that men do glance at each other to check for size comparison. Is this not the case?

  29. Nathan says:

    As a fundamentalist Christian white male, I have to say: this seems a little homophobic.

    I mean, I like my personal space, too, but seriously, guys. Nobody’s going to steal your ding-dong.

  30. Nathan says:

    Just keep your eyes on the wall, and everything will be OK.

  31. Mr Geeee says:

    A very unique use of math. However, I say ‘duck not causing awkewardness’. The only way to pee is to stand between two guys at a urinal and drop trow like you did in pre school!

Leave a Reply