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. Also, if you remember those playground clapping rhymes, perhaps you can answer a question that’s always bugged me: what horrible thing did Miss Susie’s steamboat do?

    Like

  2. Most probably just an excuse to say ‘hell’ as a small child. I’ve always felt her steamboat was rather unfairly persecuted.

    Like

  3. The reason you haven’t heard of any is that women don’t go to great lengths and create formulae to avoid acknowledging each other. We go to the bathroom in packs on *purpose*!

    Like

  4. I have a question. If there were a way in which girls could pee openly, would you feel awkward doing it next to another person?

    Like

  5. The way I learned the protocol in kindergarten varies slightly: Outlook Elementary had four wall-to-floor urinals, and we chose our holes by the following playground rhyme — “Army, Navy, Superman, Baby.” Thereby the rightmost urinal was AVOIDED, but the third urinal was in great demand.

    Yes, years later in regular buildings, the standard end/end/sliding scale for the midsection formula came into effect. However, in most public lavs and business bathrooms I’ve been in, there are TWO urinals. There is no buffer beside that pony wall they hang up, if you’re lucky. Then what?

    Like

  6. What if your urinal doesn’t have individial urinals, but simply a big aluminium panel along a wall with a plughole at the bottom? The protocol still applies, but without any integers in the formula. Please help!

    Like

  7. I’m female, but I’m not aware of any analogous situations for women. But I’m a mathematician, so, uh, yeah.

    On the other hand, as a (currently expatriate) New Yorker, I think of this as the problem of people picking seats on the subway; New Yorkers tend not to want to sit next to each other unless they’re a couple or related or something. Of course, in that case, people cooperate (without making eye contact, of course) to reduce Awkwardness by moving to more optimal packings if the greedy algorithm for picking seats failed or if someone gets up. And frequently multiple people are getting on, so (eye contact-less) cooperation is possible even in the picking phase. To add another layer of complexity, fractional seats are possible (though uncomfortable) since there are no armrests, only depressions in the bench.

    Like

  8. Mushroom: And a lot of urinals — and I’ve had women express surprise at learning this — don’t even have those little walls between them.

    But I saw something even worse once: a little wall between the urinals set an inch or two out from the wall, held by a vertical chrome wall-mount and two spacers. The chrome strip was polished to a mirror-like finish, and the geometry meant that when I looked forward I saw — in reflection — a two-inch-wide floor-to-ceiling image centered on the front of the guy next to me. Oops.

    Like

  9. A possible solution, or at least something that is interesting, and which I have seen implemented in some pubs, etc. is to switch from having individual urinals to a `trough’, therefore transforming the problems from a discrete to a continuous one.

    Like

  10. That is awesome! Not only is it amusing and geeky but it’s also USEFUL. I think this should become required reading for all bathroom designers.31

    Like

  11. I propose that we can setup sensors and lights on the urinals so that we don’t have to think about the selection. It could also be setup to automagically adjust to changes and force people into the correct urinal, while urinating.

    Like

  12. vacm: there is, it’s called a “plastuit” in Dutch. I’m not even going to bother looking for a translation.

    Like

  13. Michael: One of the #xkcd ops pointed out, when I was talking about this earlier, that a much more efficient method for maximizing urinal denial is to stand at the first urinal but pee into the last one.

    Liked by 1 person

  14. @rmb: I don’t think it’s just New Yorkers. I live in Perth, Australia and the same applies to train seats 🙂

    The subway seats do add an interesting dynamic, though. You can quite easily shift position to minimize awkwardness on a subway or even possibly a trough style urinal. Shifting from individual urinals requires an element of bladder control.

    Like

  15. I’m uncomfortable with the use of the words “packing” and “urinal” together.

    On the other hand, as it were, there is a similar system for seating in a non-busy movie theater. Of course I mean a conventional movie theater! You are a pervert for thinking otherwise!

    Like

  16. Has vacm found an even deeper insight….?

    Complicating matters is the self-regulating behavior of some men. Looking at the 7-urinal configuration, it is far from evident that the middle urinal is the optimal one. A man might just as well choose slot 3 or 5, which are both un-Awkward and do not signal “protesting too much” by seeking maximum space? (e.g. What are you feeling awkward about, pencil-dick?) One urinal buffer (or a wall) on each side is all you need. In that light, a 7-urinal configuration becomes problem-free.

    Also, I’d like to propose an exception: none of this applies at sports venues.

    Like

  17. Also, with cinema you have to consider the view. It’ll be pointless if you sat in the right spacing and then discovered that some fool in front was blocking the screen.

    Also, while I care not for the other patterns regarding females, I am curious as to this “slumber party” concept, and what happens during them.

    ReCaptcha: O.K harvests
    Oklahoma harvests? Satisfactory, though not superb harvests?

    Like

  18. I know in India, and presumably other countries, it’s the norm to be sociable and go next to any occupied urinal.

    Like

  19. xkcd: I’ve noticed that plenty of those walls are good for nothing. Either they’re short enough heightwise (below shoulder level) that you’re seeing the next person’s business, or narrow enough widthwise that you feel you have to cram yourself in to protect your own assets. Plus as a former library janitor, I can say that cleaning those things from the sidespray, just like the tile on the floor from the dribble, no matter how good one’s aim may be, is a daily necessity and a major pain.

    As for women being surprised at the lack of walls, I defer to the sainted George Carlin: “Urinals are 50% universal. Women don’t understand them, but we guys gotta work ’em.”

    Like

  20. I think vacm has an excellent point. How would women feel if there were no stalls in restrooms, and only toilets?

    Like

  21. Well, at the Oktoberfest in Munich, they have a more complicated problem:

    lots of beer implies lots of pee.

    So they have a very long aluminium panel that follows a fractal form to maximize the number of meters where you can pee. How do you model awkwardness when there are angles in the whole stuff ?

    Like

  22. See, I’ve seen other discussions on urinal protocol that don’t “prohibit” standing next to another bloke, but do offer guidance on when it is acceptable and where you should stand. For instance, take a row of six. To help visualise, the urinals, not people, are numbered. So, guy A has taken #1, B #6 and C #3 (he could have taken #4, obviously. But he’s at #3). So where does D go, given he really, really needs that piss?

    The answer I’ve seen explained is, almost counter intuitively, #2. #5, and it looks like he’s trying to get close to B. Similar for #4. #2, he’s just one of the lads, happy to piss in a herd (like at sports venues or music events, where everyone tries to go at once).

    Of course, it is all just down to latent homophobia (or do the same issues apply in gay bars/clubs, but with plain old insecurity at work?)

    Like

  23. Am I the only one distressed by the introduction of an unnecessary fraction?
    Why not describe the worst case as “n = 3*2^k + 1”?

    This way you also get k consistent (starting at zero for both the best and the worst case).

    Like

  24. Since I already have a spreadsheet tracking the probability that my period starts on any particular day, and the probability that I’m pregnant given my sexual history this cycle, you don’t need to solve that for me.

    Although that spreadsheet assumes that the length of my cycles is normally distributed, which I’m pretty sure is a poor assumption. So if anyone knows an appropriate distribution for cycle length, I’d love to hear it.

    Like

  25. @ fozzy: Ok first, Munich, your German so seeing someone else’s one-eyed mutant isn’t a huge deal. Second, Oktoberfest, chances are you drunk or on the way so no biggie. Thirdly, Beer, if you broke the seal and have waited as long as you can chances are you won’t care who is watching you pee.

    xkcd: I am thinking of mounting an expedition to a female sleepover (as easy as that may sound, it’s harder to find one where their at least 18…) some who come with me may lose their lives but it will be for the greater good of man kind… plus… if Playboy is right, their might just be boobies.

    Like

  26. this is exactly why I opted out of this metabolism thing.

    alternatively, always use the stall. it’s a very simple linear search for unlocked && condition acceptable by personal standards, urgency, and dirty seat vs. missing toilet paper tradeoff (hint: use the one with the paper. Combine paper with seat, produces a clean seat. It was awesome once I found that one out)

    Like

  27. At least urinals without walls still have some boundaries (one person per urinal) – unlike those trough-like things…

    Like

  28. @joe: I have dreams about that ALL THE TIME. It’s awkward as hell, and I search circuitous labyrinths of toilet-lined-hallways looking for the least awkward option.

    Like

  29. A further complication is added by a rule which existed in a friend’s high school: that you can’t pee in the central urinal, because that affords the best view of all other urinals and that would make you gay. They had a supposedly efficient row of five, but in fact only two people could pee at once (40% usage). A row of four or six would have been more efficient at 50%.

    Like

  30. If there is a decent amount of separation between the urinals, be that through the shape of the urinals themselves or by some other form of visual barrier, this post and the subsequent comments are irrelevant.. Then again.

    Like

  31. A similar, though more social than mathematical is sitting on the first bus of several, knowing it’s going to fill up, knowing nobody, where the seat system is XXX XX with the aisle. Most people would go to the A in XXX XA, but what if the rows fill up like so?
    FFE EF
    FEF FF

    where E,F=> empty,full

    next to the one sitting alone in the first row?
    next to the two sitting together in the first row?
    try to gauge the relationship between those on the second row or just go up and ask the one on the edge to move over?
    maybe i’m just neurotic…

    Like

  32. Another problem I encounter is urinals mounted on two adjacent walls, like a “L”. very bad idea. There, not just the urinals found in proximity are awkward.
    From , let’s say, 4 urinal placed in the corner just one can be used safely 🙂

    Like

  33. @ Dan, if you’re being serious you might want to see a doctor. I had the same problem for awhile but didn’t realize anything was wrong until my kidneys started failing due to urine backup. Turns out I had a stricture(sp?) in my urethra which is basically like scar tissue and it was preventing me from fully urinating.

    Like

  34. @Macfuddy: actually, on commuter trains I’ve noticed people nearly always choose the order FEE EE, FEE EF, FEF EF, FEF FF, FFF FF to pack the seats. It optimizes Personal Space. Not counting herds of chatty females, of course.

    Also, in female toilets it’s less of an issue to avoid proximity, but I’ve been trying to work out an algorithm to choose the least used, and therefore (theoretically) cleaner, one. I just have a hard time trying to imagine how other females think…

    Like

  35. This formula is great, but fails to take into account the last urinal which is usally “child sized” (lower to the ground) which is also generally avoided if possible.

    Like

  36. I went to a bar once and there was probably about 30foot of urinal space. Then a man came in and stood right next to me.

    He started kissing my shoulder.

    I left.

    So how does that fit in to your calculation? I suppose it means if you’re gay you don’t adibe by the laws of nature?

    Discuss.

    Like

  37. Did he give you a biscuit, gayers? That’s how I would do it – “Hey man, nice urinal. Mind if I pee here? Here’s a biscuit. Now bend over”

    Take it.

    Like

  38. LOL @ the last paragraph
    “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.”

    Like

  39. Mystique – will fudge work? I suppose it’s better than ramming 6 feet of underlay into the hole..

    Like

  40. It seems that public-toilet designers (we only say bathroom in the UK if it’s a room that actually contains a bath. Logic, see?) use a different set of rules to the rest of us. If urinals were separated by more distance in the first place, the requirement for having an entire urinal’s separation between two peeers would be removed.

    This whole post reminds me of a game I invented whilst a drunk student in Manchester:
    Start with a basic score of 25 points per urinal in the room. To score, you must wee in each one, starting at one end and going all the way to the other and back again.
    Part-shuttles do not score.
    Crossing a gap (urinals on two walls, for example) scores 25 per crossing (50 per shuttle).
    Multiply score by 1.5 for each non-participant using a urinal during play (occupied urinals need not be visited in order for the position to count towards the shuttle score).
    Multiply score by 0.5 for each foul (wee not in a urinal).
    Score zero in case of vomitting.

    Like

Comments are closed.