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.

1,135 replies on “Urinal protocol vulnerability”

  1. At a stadium with a fully occupied urinals and dozens of unused sinks, I peed in the sink, to loudly expressed disapproval. But gentlemen, human pee is sterile, not a health risk, and a perfectly appropriate addition to the greywater stream into which a sink flows.

    Like

  2. There are two variables that also would effect the efficiency: 1) Alcohol and 2) how bad someone needs to go. If I’m drunk, I could care less about who is peeing next to me. Similarly, if I am dying to take a piss, I might run in and take the first stall available. In both situations I am acting efficient.

    Like

  3. I agree with Infimorus, by taking urgency as a factor and say if I were D and I was already pissing in my pants, being me awkwardness moves to the bottom priority.

    It’s good though how you can formulate human behavior on this particular topic 🙂

    Like

  4. Periods & holidays, definitely. I’m a girl, but this article was very entertaining to read & shed a lot of insight on male washroom protocol. I could give you insight on female washroom protocol, but it’s very different, mind you.
    With regards math, though, I’d have to vote for periods & holidays. Never fails.

    Cheers!

    Like

  5. Best possible scenario – all urinals stretch from an average height adult’s mid-section to floor, that absolves the “short urinal” issue as all urinals can be effectively used by people of all sizes, the partitions between urinals also extend floor to ceiling, and the partitions use a depth of at least 40 cm. Then such a protocol is not needed.

    Like

  6. Has anyone has considered parallel processing? What are the additional factors when multiple lines of stalls are available? Dual and quad core stall arrangements which allow parallel processing might affect overall throughput and efficiency in unexpected ways.

    Like

  7. In India we used to have great big walls, but now it’s all about glasnost and mirrors in the back. You can always pee on the back wall though

    Like

  8. If you enjoyed this article, you will like “On self-monitoring, self-sanitizing and water-recycling protocols for mixed channel urines” by SSD et al.

    Like

  9. Can you give a reference for, or an outline for the proof of, the “packing ratio” formula?

    Like

  10. Whatever happened to standing right next to someone else (especially in a relatively empty bathroom with plenty of free urinals) and striking up a conversation? At the very least muttering “yesss, my precsssious” or “God I’m glad it stopped burning when I pee”…

    Like

  11. Personally I play my own game – Urinal Extreme! (the exclamation point is part of the name, not my own punctuation). If there’s three urinals, and nobody else there, stand in the middle. Nobody comes in – I’ve stared death (ok, Awkwardness) in the face and won. Someone else comes in – they begin to question the fundamental tenets of their belief system, so everyone wins.

    It’s not for everyone.

    Like

  12. Dude I got to say that this is one of the best articles that goes greatly into depth about this topic. Screw printing it, im saving it and setting it as the homepage for the comp sci classroom, some of those guys need some help in this are.

    Like

  13. I believe your statement of the protocol is incorrect. Rather than the expensive labor of retrofitting the world’s bathrooms, I propose that a slight revision of the protocol would achieve no increase in awkwardness, while maintaining a near 50% usage rate.

    Awkwardness reaches minimal levels once a distance of 1 urinal has been achieved. Therefore in the 7 urinal example, person number 3 should have chosen urinal number 3 or 5 (counting from the left), rather than urinal number 4. This would allow a 4th person without increased awkwardness.

    In addition, this discussion opens up the obvious question, why install 7 urinals when at best only 4 will ever be used? Its an obvious waste of precious porcelain. The space where the 3 other urinals are installed would be better served if they were left empty, or perhaps there is an even more optimal use for that vacant space.

    Like

  14. Re: above

    Even though awkwardness does decay exponentially as a function of urinals in between (or distance, for that matter), there is no evidence that the critical level of unawkwardness is at 1. I would instead suggest 2 rows of urinals on either wall facing away; this seems to minimize awkwardness barring any occurrence of flatulence in certain individuals occupying the urinal across from you.

    Like

  15. Lower water and cola prices. Urgency to urinate will increase. Awkwardness will decrease. This will be tested at the pub.

    Like

  16. I never realized there was a protocol. Just stop staring at your neighbor’s junk, man.

    Like

  17. If you liked this article, you should read “Behavior based cardinality adjusting urinals” by SSD et al.

    As the number of bathroom users increase exponentially, the traditional protocols break down because of the monstrous amount of information that needs to be persisted and validated before a decision can be reached.

    We employ behavior profiles of urinal users (number, throughput, time of day, etc), modeled by an Urine Detection (UD) sensor, to automatically compute and update the number of available urinals for admission. Each user’s urine profile issues a partial decision for or against the creation of new urinals in the bathroom, on-the-fly. The aggregation of these partial decisions constitutes the final policy that is enforced.

    Like

  18. I love hypothetical science, becuase it’s so much work for something that, usually, doesn’t reflect well in the real world, but somehow still manages to be insightful. There’s something satisfying to me in that sort of dichotomy.

    In light of that, this entire protocol exists for the simple reason that whoever designed the average public restroom has apparently never, EVER, had to use one. If some space was left in between urinals (not even a whole urinal’s worth of space – say just a half!) then one could likely achieve 75% space efficiency (this is 100% packing efficiency, every urinal used becuase there is sufficient space for each man to feel comfortable). Or to achieve nearly 100% space and packing efficiency, just add some walls. And I mean real walls, like floor to ceiling – what’s a wall that’s 4 ft tall supposed to block? Not enough – that’s what.

    As long as we’re on the subject, I’d like to just take a moment to complain that most public restrooms are built in absolutely the wrong way. The walls should go to the floor, and extend high enough that they can’t been seen over. This applies to urinals and stalls. I’ve seen toilet stalls where a tall man could see over the top – creepy. The doors to stalls need not extend all the way to the floor, but they should not be more than foot up, and should naturally rest in an open state unless held closed by a lock to make it obvious which stalls are in use (if they all close even when not locked, how do you know?). This prevents having people constantly trying to open the locked door while you’re doing your business. The doors should either swing outwards, or the stalls need to be long enough that I don’t need to stand on the toilet itself to get the door to open with me inside. Lastly, everything in there should be able to be hosed down. No drywall – all tile or plastic. You take a high pressure hose and attach a sanitizer dispenser to the end. And then go to town. Do this several times a day. Men’s rooms are always disgusting, and the guy you pay minimum wage to clean it…doesn’t. So make it easy enough that you’d have to really try to not keep it clean.

    Like

  19. I would just like to confirm that in Aus we don’t have individual urinals, the very best example of the pee-against-a-wall trough belonging to a bar in Brisbane where the wall is a one way mirror so it looks like black glass to everyone in the beer garden but to the gent peeing he can see everyone sitting around enjoying their drinks oblivious to him aiming his pee at their head. (I was dragged into the guys toilets by another drunk female to be shown the effect).

    Like

  20. In smaller bathrooms with only 3 or 4 stalls (particularly in a situation where you are likely to know other women like the workplace), women have the flushing and leaving protocol – you don’t want to exit at the same time as another woman if you can help if, so you need to gauge when it’s safe to flush and exit based on noises from the other stalls. If you accidentally flush at the same time as another woman, do you leave straight away or do you wait until she’s gone? If she picks the same option, it becomes a stalemate.

    Like

  21. You have not considered another approach, calculating the minimum spacing required to have two urnals together that can be used at the same time without the awkwardness. There are other options as well, like a screen between the two.

    However, math are always funnier 😀

    Like

  22. For the recursive formula, I went as far as

    f(2n+1) = 2f(n-3) + 3 and
    f(2n) = f(n-3) + f(n-4) + 3

    which resulted in

    f(2n+1) – f(2n) = f(2n) – f(2n-1) = f(n-3) – f(n-4)

    Somehow this doesn’t seem very complete. Anyone wanna continue on with this?

    Like

  23. I remember a time when they had walls between urinals, although they were pretty small and 100% useless. They need to create walls somewhat similar to that of a stall, surrounding the urinal to protect the user from wandering eyes. This would increase the efficiency greatly, and prevent the awkward conversation while at the urinal. If they can’t see you they can’t talk to you/you can pretend you didn’t realize they were talking to you.

    Like

  24. This is XKCD shtick #3: “Geeky overanalysis of something mildly amusing somehow.” The humor comes from the geeky overanalysis.

    It stopped being funny a couple of years ago.

    Like

  25. This protocol is bullshit. Randalls “hacks” are closer, but the real International Choice of Urninal Protocol is:

    1) Pick the end urinal
    2) If there is someone at the end urinal, pick the other end
    3) If the ends are taken, pick the urinal that is farthest away from anyone, _but still leaves an odd number_ of urinals in between you and your most distant neighbor.

    Randall’s protocol suffers from a selfish choice that is efficient locally but inefficient globally. You would either have to be stupid or selfish to not realize this. I can rule out the former, so I have definitively proven that Randall is a selfish prick.

    Of course this protocol leads to much less interesting math where:

    f(n) = int(n+1/2)

    and the packing efficiency is always %50, except for n = 1 which is %100.

    Like

  26. You ever have those moments when you realize you’re not the only one thinking those strange thoughts? This is one of those

    Like

  27. So although I agree that the ICU protocol will give the above awkwardness packing function. I think in most bars, stadiums, and Urinal need areas, there is a “good enough” function G[# beers] that you need to consider. Even at one beer, it is good enough to just be 1 urinal away from the nearest person, and this decreases the distance one has to traverse into the bathroom. With this goodness factor, people would fill in the 1st, 3rd, 5th and so forth until the N – 1 + mod(N,2) th spot. However G[# beers] decreases the need to be even 1 urinal away, as you increase the number of beers imbibed. leading to the point where you are peeing on your neighbor’s shoes…

    Like

  28. With females, the issue is more of going #2 in stalls. The problem being, there are not nearly enough women who adhere to leaving a stall between you and another woman.

    This happens to me at work all the time, where there are about 10 stalls. If I am in it alone, the next woman will undoubtedly take a stall next to me on either side, interrupting me.

    To further confuse matters, the first stall is not an option because it is too close to the door. The last stall is not an option because it is a handicapped stall and therefore huge and feels weird to have that much open space.

    So generally, I choose the 3rd-to-last stall. It completely confuses me why the next woman will bother to walk that far down the line to sit next to me.

    Like

  29. that’s why I always use the spacious handicap stall, plenty of room all to yourself, and privacy

    Like

  30. I feel that men are far too insecure. who the hell cares what size penis you have. you know what you’ve got and that’s all that matters. also…why the hell would you strike up awkward conversations while taking a pee? why not keep your eyes to yourselves and avoid the who business? now taking a poo…that is something different altogether.

    Like

  31. Pingback: Anonymous
  32. TWO OTHER QUESTIONS.
    one, what is the square root of this apartment? urinal? bathroom?
    two, what is the half life of NERD/GEEK/SPAZ

    Like

  33. I’m really surprised by the ladies posting about trying to take stalls that aren’t next to someone else… This just never occurs to me. A stall feels quite adequately private to me whether there’s someone on the other side of the wall or not. My choice of stall is based on one of the following:

    A (most common): one that’s relatively close without requiring me to alter my trajectory too sharply. In cases where, upon entering the restroom, the stalls are all lined up to my left or right, this is one of the middle-ish ones; I gradually bear to the left or right rather than making an abrupt turn.

    B: the closest one.

    C: the handicapped one if I want to make any wardrobe adjustments that are easier with elbow room, or if I just feel like being in a spacious environment.

    D: the one back in the far corner once in a while if I’m in a go-hide-in-the-corner mood (a matter of placement within the *room* rather than in relation to other patrons; the corner stall is the cozy, secure one even if somebody is in the stall next to it).

    Someone brought up the matter of whether to leave at the same time as the patron in the next stall… I don’t think about this when there are plenty of sinks, but the ladies’ room at my work has two stalls and one sink, so if I hear the person next to me flush I wait around until she’s done washing her hands so I don’t have to stand around and make her feel rushed while she’s washing. (And, yes, in the times I’ve done this, they always *have* washed their hands, but it’s possible that they were influenced by the knowledge that someone was in the room listening.)

    Regarding possible embarrassment at what someone might overhear from the next stall… I’m not embarrassed about being heard to crap, fart, or put in a tampon; that’s what restrooms are *for*. Now, if I’m compulsively checking email on my phone (which beeps when I do so) while I’m in the crapper, I might hang back to avoid facing the person who might have overheard. :-/

    Like

  34. So I’m sure it’s been said before. But I feel like the most efficient protocol would be to start at one end and simply move 2 over each side. So guy 1 would take urinal 1, guy 2 urinal 3, etc.

    While this is somewhat less effective in reducing Awkwardness (because now guy 2 is separated by 2 rather than N-1 stalls), we can agree that Awkwardness drops significantly from a urinal separation of 1 to a separation of 2. Using this scenario, the % of stalls being used would be either 50% (in the case of an even #, N, of stalls) or 50% + 1/(2N)%.

    On the other hand, one must consider human nature and the subsequent desire to please oneself over the others, in which case, regardless of my proposed protocol, guy 2 would choose the farthest stall anyways, despite the only slight decrease in Awkwardness and greatly diminished efficiency.

    Like

  35. For maximum awkwardness, I refer back to high school. I was in the bathroom, post usage, washing my hands. There was a freshman using a urinal behind me. A senior class clown walks in, steps right up next to the freshman and drops pants and boxers to the ground. With package in hand, he looks at the kid and simply says, “Hey. How’s it goin?” Brilliant!

    Like

Comments are closed.