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. Ladies tend to gravitate away from the stalls on the ends of the row (meaning they’re often the cleanest) and choose the sinks closest to the soap dispensers and/or with the most available dry counter space. Of course, the sinks nearest the soap dispensers then become the sinks with the least dry counter space, so the preference shifts over time. I’m sure this could be analyzed to create the least and most efficient ladies’ room layouts.

    Like

  2. This classification of urinal count efficiency is incorrect.

    The calculations assume that the departure rate is 0 (people never stop pissing once they start).

    In real life, long time average departure rate is the same as long time average arrival rate.

    I haven’t made the caluclations myself, but you may want to look up Little’s Law.

    Like

  3. Nice, but it does not discuss another important factor. Namely, that what you need to avoid is peeing in pairs. Peeing in threes or more is not ambigously gay and is allowed if you can not find a lone urinal.

    From this follows the strange situation where a person is better off joining an already established group than a lone peer (sic!) if he cannot find a solo spot.

    For example, in a setup like this:
    0110010
    this option:
    0111010
    is preferable to all of the other variations.

    One exception here is that you can not “come in in the middle”. Technically you are establishing a group of three, but you are in fact joining TWO LONE PEERS AT ONCE. This should be avoided at any cost.

    Like

  4. Diane: I can’t speak for all men, but I take three or four whizzes to every one deuce I drop. Urinals make perfect sense for us men – they take up less space, they’re convenient and sanitary (no standing water, no splashing,) and they use less water per flush. And in a men’s bathroom, a stall is almost always available when you need one. We’re fairly consistent creatures and our need for stalls versus urinals is not likely to vary widely day to day. The provided ratio usually works perfectly.

    Like

  5. The male urinal behaviour pattern is like a binary search algorithm. Instead of choosing the next urinal along they go to the middle, then the next ‘searcher’ goes to the middle of one half, etc. Nature is beautifully mathematical.

    Like

  6. How about studying how many extra rolls of toilet paper should be put in the ‘most obvious’ female toilet stall. This is not the one closest to the main door (because people coming in arrive right by your door and its awkward).. but about the second or third, depending on how many there are. If this toilet is free, it will be taken by preference. In my office building there are 4 stalls and the 2nd one always runs out of toilet paper first… which leads me to prefer the last one (fewer people visit so less chance of an overly warm seat and more chance of paper). Anyway, thanks for the urinal debate. It’s true for stalls in America where the walls dont go down to the floor and I worry someone will steal my bag from the floor between my feet, so I leave 1 gap

    Like

  7. Wow… In my experiences in the men’s room, if the urinal count is odd and over 7, it’s safe for (urinals / 2 – .5) people.

    Like

  8. Despite the lack of realism in your “rules,” it’s an interesting idea, and it generates an interesting series.

    I think your formula is wrong though.

    I wrote a program to simulate your scenario, and I get the following, where the first number is number of toilets, second the max capacity given the rules, and third the efficiency. These numbers differ from your formula and your graph; nonetheless, I’m confident they are correct.

    1,1,1
    2,1,0.5
    3,2,0.66666667
    4,2,0.5
    5,3,0.6
    6,3,0.5
    7,3,0.42857143
    8,4,0.5
    9,5,0.55555556
    10,5,0.5
    11,5,0.45454545
    12,5,0.41666667
    13,5,0.38461538
    14,6,0.42857143
    15,7,0.46666667
    16,8,0.5
    17,9,0.52941176
    18,9,0.5
    19,9,0.47368421
    20,9,0.45
    21,9,0.42857143
    22,9,0.40909091
    23,9,0.39130435
    24,9,0.375
    25,9,0.36
    26,10,0.38461538
    27,11,0.40740741
    28,12,0.42857143
    29,13,0.44827586
    30,14,0.46666667
    31,15,0.48387097
    32,16,0.5
    33,17,0.51515152
    34,17,0.5
    35,17,0.48571429
    36,17,0.47222222
    37,17,0.45945946
    38,17,0.44736842
    39,17,0.43589744
    40,17,0.425
    41,17,0.41463415
    42,17,0.4047619
    43,17,0.39534884
    44,17,0.38636364
    45,17,0.37777778
    46,17,0.36956522
    47,17,0.36170213
    48,17,0.35416667
    49,17,0.34693878
    50,18,0.36

    Like

  9. The current model neglects time entirely. The original seems to assume an infinite duration of pee, and only one pisser to be added. The refined method of moving off-center to create two perfect gaps does account for additional pissers, but still figures they all are wearing camelbaks.

    In a real situation, is it not acceptable to intentionally choose a urinal which is initially awkward if neighboring urinals will soon become vacant?

    A better model would account for this, but it must incorporate acceptable proportion of awkward time, average pee duration, and average pee frequency.

    It should probably also include how bad you have to pee, because that is positively related to your own pee duration. Everyone else’s pee duration is most likely unknown, but perhaps their time of arrival could be estimated (assuming they obey the advanced model as well).

    One important question is whether it is truly the proportion of awkward time that matters, or a maximum duration of awkwardness.

    Like

  10. Every since I’ve learned that I have an xxlarge unit, I like to take the center urinal to show off my package.

    Don’t get me wrong, I’m not gay but I do like to show the other guys up.

    It’s like having a sixpack abs but better

    Like

  11. have you considered a workaround for the architects in order to maximize comfortable spacing withotu sacrificing empty urinals?

    there must be a distance which males are comfortable using a urinal within. is it the space of a urinal? is it less? otherwise that’s a lot of porcelain and water systems being neglected for the sake of homophobia

    or perhaps this could all be avoided with walls between urinals, which extend out into the room rather than just enough, so that males aren’t forced to look at each other at all

    Like

  12. What a great thread. I liked this comment:

    > Large Tool says:
    >
    > Every since I’ve learned that I have an xxlarge unit, I like to
    >take the center urinal to show off my package.
    >
    > Don’t get me wrong, I’m not gay but I do like to show the other
    >guys up.
    >
    > It’s like having a sixpack abs but better
    >

    I’d definitely do that and I’ve noticed that 2 out of 3 guys at gym have way above averagely huge dicks. But that’s a contradiction in terms. The explanation is obvious: those dudes with big dicks flash them around for as long as they reasonably (and sometimes unreasonably) can and the guys with average or small dicks cower whilst they quickly change their undies. I’m trying some social work: having realised the skew gym dick representations I deliberately don’t cover up, giving those cowering men a slight confidence boost and a much needed reality check. I hope God, at least, has noticed my good deed.

    Like

  13. Abstract: A new theory for quantum corrections to classical bathroom dynamics is presented.

    Hi,

    your theory is good for classical bathroom problems. But consider a bathroom with nine urinals where (for didactic reasons) the urinal number one is in use. What happens next? Person number two choses urinal number nine, logically, so does person three chose the urinal number 5. But then comes the moment when classical bathroom dynamics (CBD) fails: Person number four has two chose between urinal number three and urinal number seven. The situation following to this can only be described correctly by quantum bathroom dynamics (QBD). Person number 4 is thrown into a quantum superposition of using urinal number 3 and number 7. When now the last person enters the bathroom, he can not know, which urinal person 4 is using, until he performs a measurement. But then, with fifty percent probability, when he measures the state of urinal, say, number 7, the quantum superposition collapses to the state in which it is in use and person 5 is repelled from the urinal! Of course, if urinal number one had not been in use at the beginning of the thought experiment, then person 1 had been thrown into a quantum superposition of state 1 and state 9 and even for person 2 there would have been a 50 percent chance of beeing repelled from the bathroom. So you see, quantum effects significantly limit the capacity of a bathroom. But while writing this comment, i am learning, that the maximum capacity of the bathroom is not lowered. If there are enough persons, which want to visit the bathroom, then there are a few, which make a “bad” measuremt, but then the state of the previous person is collapsed and the next person can use an urinal (in the case, that the quantum sperpostion only conissts of two urinals). One could say, some kind of condensate is forming. But the maximum flux through a bathroom is in every case lowered. For example, consider the situation, that persons only have a limited adhesion time and so on. But for today that is complicated enough… The theory of QBD can easily extended to bathroms with arbitrary numbers of bathrooms. I thought the world should know about it.

    Best regards Thomas 🙂

    Like

  14. I reject the spacing equalization strategy of urinal selection and go with the social responsibility method: always select the yellowest urinal. Many people don’t flush, but I know that *I* am going to flush, so if I use the least flushed urinal, I am always leaving the bathroom in a better state than I found it.

    This doesn’t work as well now that more urinals auto-flush. It’s a shame, really. The altruistic charge enabled me to justify all kinds of other anti-social behavior.

    Like

  15. While I find most of this intuitive, it’s fascinating to see as a formula. One piece I’VE never been able to resolve, though, is this: how do kiddie-urinals affect the process? My bathroom at work has one of those on the left with 4 regular height urinals to its right. The starting choice still seems clear, but I’m never quite sure what to do if I’m the second to enter. Is the short urinal still somehow the obvious 2nd choice?

    Like

  16. Aha! Ok, so you need a female model and the time variable has been questioned. How about when you need to take a poo in a cubicle. You do NOT want to do this next to another cubicle occupant…unless you have a very specific fetish or you just like making people uncomfortable. This would also increase the time to a possible infinity… or at least that is my perception of the time period in which my flat mates drop their logs. Could this be a working model for both sexes?

    Like

  17. Ah, but that would then mean that everyone coming in to the toilet would need a poo. A coffee shop? Or bad mexican restaurant?

    Like

  18. I’m wondering how that formula f(n)=1+2^…… was generated.

    Using the rsolve command in Maple what would be the recursive statement to generate it?

    Like

  19. Awesome. I’m totally going to use this as a reference for an architectural design assignment the next time I have one at university.

    Like

  20. One thing I’ve noticed and discussed is how, on overnight trips with a group of high schoolers, especially band students, the difficulty of choosing 3 other roommates to room with is infinitely more if you are a girl.

    Keep in mind that we’re packed four to a room and that teenagers are fickle beyond belief.

    Factors for guys in choosing roommates include:
    1. Is he a guy?
    And, secondarily,
    2. Do I know him at all? If not, is there someone I’ve met before that I could possibly room with instead?

    Factors for girls include, in no order of importance:
    1. Are we friends?
    2. Are we best friends?
    3. Am I okay with seeing her naked?
    4. Am I okay with sharing a bed with her?
    5. Has she looked at me funny in the past 4 years?
    6. Did she date my ex?
    7. Is she dating the guy I like?
    8. Am I dating her ex or the guy she likes?
    9. Did she used to be friends with me but we kind of grew apart and now it’s awkward?
    10. Do I have better options than her?
    11. Will she annoy the hell out of me?
    12. Does she dress weird?
    13. What will everyone think if I room with her?

    This is but a glimpse into the world of females that so confused you in your high school years.

    Good luck with your statistical analysis of this, Randall. 😀

    Like

  21. Well sounds Complicated! Besides according to ur rules the urinals are unused coz of buffer, and practically if the time is less(like movie intervals) then all urinals would be accupied, instead of adding buffer urinals, why not create a partition between urinals(about a man’s height) and all urinals are usable!..or if u wanna stick to urinals then create a buffer ‘space'(low cost and space compared to a urinal)…….

    Like

  22. Well, the obvious solution is to put all urinals in a big circle in the middle of the floor. That way you don’t have to worry about your neighbour, but still can still feel appreciated.

    Like

  23. Jack – I’m not sure this is based on homophobia, so much as a general Awkwardness arising from peeing in excessively close proximity.

    The few gay bars I’ve been to had either 1 or 3 urinals. The few times I peed at the one with 3 urinals, ICUP seemed to be followed at least generally – the end urinals were always chosen first, the centre one only last.

    This might all be avoided by using the single-long-trough urinal design sometimes seen in stadiums and behind rural Mexican bars (seriously, I first thought there was just a bunch of guys peeing on the wall – turned out there was outdoor plumbing specially installed for the purpose).

    Or does this just create infinite Awkwardness, by forcing all peers to share one urinal?

    Like

  24. How would you compute this for a trough style urinals? There are some around and I guess there would have to be an analogue rather than a digital solution to the problem. There are not enough decimal places in a float for a complete solution to be arrived at. There could be an infinity of awkwardness and size, in this case, *would* matter. (Width of shoulders I mean, obviously). Maybe an analogue computer would be required to solve? Babbage anyone?

    Like

  25. How about cleanliness? I generally aim for the awkward urinal when no one’s around, because this urinal has the least chance for having the handle and floor doused with stuff.

    Like

  26. Is the generally accepted rule the actual urinals as units, or the amount of space a urinal takes up? Will a urinal always have to be between the guys, or would the space suffice?

    If the space wouldn’t suffice and a “urinal” is used as a unit of measurement despite its irregularity, load the thing up with 33 SMALL urinals. Very small. But I guess make some of them at least big enough to pee in.

    @Zandroid: Adding time and number of pissers added at any point transforms it more from a continuous math problem to a threading problem, which is not so easily analyzed as a graph (which I feel was the point here).

    Like

  27. Marine drill instructors generally allow recruits 3 minutes to relieve themselves. With a limited amount of urinals and toilets, that leaves 4-5 dudes per facility. I think in this case necessity outweighs awkwardness.

    Like

  28. As an engineer, I’m going to have to say: put dividers between the urinals.

    Although it was a fascinating function.

    Like

  29. Easy addon to the protocol that will fix its vulnerability would be to implement high enough walls between the urinals, as seen throughout some places in Europe.

    Making everybody gay seemed to be the solution in the first place, but closer examination lead to the result that gays are even more afraid to pee next to each other, except for places with a lot of alcohol or drugs in place. The afraidness seems to result in lack of erectivity for obvious penis comparision and lenght-inquery.
    Especially for the gay matter, replacing the urinals completely by narrow spaced toilet booths with low door height will fix the urinal problem, allows to take drugs, but keeps them from having sex in the booths. Any booth number greater than 1 will provide backup and load balancing in the inevitable case of toilet sex or complex drug administration.

    Like

  30. ^ as a gay guy i feel awkward peeing next to other guys. many a time i’ve picked the stalls because there are too many people peeing and many a time i’ve stood next to someone in a busy toilet and not been able to go at all.

    i also see the single-long-trough style a lot more than just in stadiums and mexico – but maybe that’s a european thing. we get them in older pubs here a lot for instance.

    Like

  31. This is missing something essential. If you have five urinals and someone is at the very last one, it looks overly concerned to choose the one at the opposite end. Guys will tend to choose the fourth one away as to not look like they are playing the game you lay out here.

    Like

  32. Could not stop laughing…and seeing the possibilities for other applications – like predicting the probability of using a “clean” urinal.

    Any way of gauging how “awkwardness” may be overcome by “cleanliness”?

    Like

  33. You should look at the Hund’s Rule, which is a basic law of quantum chemistry! Einstein once presented it as the autobus rule, though the urinal rule sounds about similar.

    Basically all atoms have orbitals able to accept a specific pair number of electrons. The second orbital (p) can take 6 electrons divided in 3 pairs. If by any chance 3 electrons fill this orbital, they will organize so that each of them is a lone electron inside a pair, avoiding proximity with other electrons!

    Like

  34. It’s more compact to write the formula for the “worst” numbers as 3*2^k+1, and allow k to start from 0. This also improves the speed of computation of this formula, in case anyone tries to study this thing for very large numbers, or tries to evaluate it several times in rapid succession. And lastly this makes the formula more memorable and intuitively understandable at a glance. This introduces a slightly ugly difference between the “best”- and “worst”-number formulas, since the “best” number sequence index starts from 1, but I think it’s worth it.

    Like

  35. The distance that would need to be added between urinals to allow guys to pee next to each other would probably be approximately equal to the distance betwen urinal 1 and 3. So you could probably save on costs just by getting rid of the even urinals. However, Placing dividers between the urinals tends to make it acceptable to pee directly next to other guys. So the best solution is just to add dividers.

    Like

  36. interesting ideas. never thought of it as maths))). i usually tend to choose urinal closer to the guy which seems to be finishing. if none of them seems to be finishing, i select the biggest gap possible.

    the idea of “pissing on the wall” is bad, as the the pissing guy from the middle has to move to make space for a new guy, to make the gap the same/equal, but moving while pissing is too dangerous)))

    a solution to that would be to place urinals in a circle with guys joining from outside (pissing to the center,not the other way ass-to-ass), or in square, or hexagonal shape. that way mush space is saved.

    another way to avoid awkward situations is to place tv or newspaper on the top of each urinal, to keep guys busy while pissing, so they have no time to look around, unless they want to))))

    placing walls between urinals will create a feeling that the space provided is too small

    Like

  37. international choice of urinal protocol……ICUP!!!!!!!!!!! (i see you pee) LOLZ

    Like

  38. A comment from a lady:

    LOL. Rather than complex equations that 50% of this blog’s readers, I’ll grant you), it seems most efficient for y’all to get therapy to get over your silly fear of peeing next to someone. (And peeing in the SINK?? This is the best argument I’ve ever heard for separate-gender restrooms. NOBODY pees in the ladies’ sinks.)

    Like

Comments are closed.