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. For the 1/3 rule — if you have an awkward number of urinals — say, 25 of them — and you want to make everything optimal — would you just divide the number of urinals by 3, get 8.333333, and the round up? That would leave you at urinal #9. There would be 7 urinals on your left and 17 urinals on your right — neither of which are horrible (7 is very efficient, I’m not sure what 17 is). Or do you just stay at urinal #8? That would leave 8 urinals on your left and 16 urinals on your right. 8 is not bad, and neither is 16 (being a multiple of 8 and all).

    Do tell.

    Like

  2. Correction:

    … There would be 7 urinals on your left and 17 urinals on your right — neither of which are horrible (7 is awkward, 17 is efficient). Or do you just stay at urinal #8? That would leave 8 urinals on your left and 16 urinals on your right. 8 is not bad, and neither is 16 (being a multiple of 8 and all).

    I guess I might have answered my own question. Not rounding would leave you with two good numbers of urinals on your left and right …

    Like

  3. What about the use of troughs? Then you’ve got this sliding scale of variables.

    I have also wondered why the toilets in the ladies’ room have seats on them at all (beyond the laziness of manufacturers. I’d also think women would be über happy if designers could come up with a bidet that allows for both #1 and #2.

    Like

  4. I didn’t do the math for it like you did (your math is awesome by the way), but I thought about this a lot in my 5-toiliet-stall dorm bathroom. In my experience, girls don’t like peeing next to each other either, and I decided that rather than a 1-3-5 initial fill, a 2-4 would be better. Then girls could take 1 and 5, so the they have a wall on one side and another girl on the other, and then finally, if necessary, 4 could be filled. If the stalls were filled 1-3-5 and then 2 and 4 were taken if necessary, 3 would be more likely to have people on both sides of them during high-volume use.

    Like

  5. There is an iphone app called urinal test that is far from hysterical. It’s not even really funny, or trying to be funny, or viewable as funny unless you find super dumb low brow comedy to be “hysterical”.

    Like

  6. Is this taking into acount the use of dividers? What about divider height also. Another variable that i think is crucial, is how many stalls are there and how often are dukes dropped. For example a church, duke dropping is minimal giving a second option to the awkard urinal pee-er. A truck stop on the other hand would leave almost no secondary peeing options and very little duke dropping potential, might i add. Just something to ponder for a sequel.

    Like

  7. for the most part, I would have to say that awkwardness is greatly reduced by seperators between the urinals. though the rule of ends first, middle second and every other, the dividers allow for maximum efficiency.

    as for troughs, id say obey the end first middle next rule, followed by at LEAST one full wide stance BETWEEN men. also remember the eyes forward at eye level at all times.

    Like

  8. In response to Scott Trudeau and toilet seat efficiency:

    > One female bathroom topic of interest might be figuring out whether it is > in fact optimal for a guy to put the toilet seat down in a shared bathroom. > I propose the measure of efficiency be total effort in managing seat
    > state. Some assumptions and factors:

    Someone did a game-theory analysis on this exact topic. heres the link

    http://www.scq.ubc.ca/a-game-theoretic-approach-to-the-toilet-seat-problem/

    Like

  9. In response to Scott Trudeau and toilet seat efficiency:

    >One female bathroom topic of interest might be figuring out whether it is in fact optimal for a guy to put the toilet seat down in a shared bathroom. I propose the measure of efficiency be total effort in managing seat state. Some assumptions and factors:

    Someone did a game-theory analysis on this exact topic. heres the link

    http://www.scq.ubc.ca/a-game-theoretic-approach-to-the-toilet-seat-problem/

    Like

  10. I know it’s not uncomfortable in any way, so it is less of scientific interest, but the ICUP is in fact the same protocol used for optimising the distribution of clips on a curtain (supposing that first you attach the clips to the curtain rod, then you hang the curtain with the clips). First you attach the two sides of the curtain, then the middle (if there is a middle piece left on the curtain rod), then you start splitting the remaining sections, etc., Cantor-style;)
    It can be really annoying when after a few steps you keep getting even number of clips after every subsequent step:D (Last time I ended up grabbing a tape measure, calculating the distance needed between neighbouring clips. You might tell I’m not much of an experimentalist;) I guess this is much less interesting then your peeing model, but I thought I’d share it anyway:)

    Like

  11. I think part of the urinal equation works for women as well. There is the same need to leave an empty stall between women, but I am not sure if there is the same “ends first” pressure. All bets are off and the whole thing becomes war at theatres, sporting events, or any other venue where too few stalls are provided for the number of women present.

    Like

  12. An interesting corollary is the level of awkwardness that results from a violation of protocol under differing levels of urinal availability. I mean, if there are only 3, and the ends are taken, it’s not so awkward if someone uses the middle. In 5 case, and 1 and 5 are in use, it’s slightly more awkward when someone chooses 4 over 3 but, eh, maybe 3 had a kitten in it or something. But in a 15 hole room, with 1 and 15 taken, it gets downright creepy when someone walks in and decides “Lucky 14, that’s the one for me”

    Like

  13. At the Oktoberfest, there’s something even more interesting: chest-high walls with troughs on either side. This means that as you relieve yourself of several liters of extra-strength ex-beer, somebody even more drunk than you are may come up on the opposite side and do same.
    The wall is high enough that you can’t see the other guy’s machinery, but you are kind of compelled to look straight at his face. And, both of you being as drunk as you are and aware that you won’t ever meet again, this has given rise to some of the most hilarious conversations in my life.

    Come to think of it, I wonder what this says about my life. Oh well.

    Like

  14. None of this applies. When I go to the men’s room to take a leak, my calculus is simple: Stall available? YES: use the stall. NO: look for another restroom. If there is no stall and the room is empty, use the urinal and lock the door. I will and have gone outside and pissed in the weeds just to avoid the barbaric custom of standing next to some guy and whizzing in a porcelain bowl.

    Like

  15. in méxico in some bars we have only one big urinal but the protocol works the same, i guess you could tweak the formula to use centimeters instead of urinals 😛

    Like

  16. Anna, the point is choosing the best place available for your own, it is selfish, but that’s the way the protocol works.

    Like

  17. perhaps an interesting question that involves both sexes is mathematically determining the responsibility of putting the toilet seat down.

    my rudimentary thinking is as follows: the touching of the seat is to be avoided, naturally. it is covered in fecal particulate and all sorts of unsavory things.

    one might assume the onus of lowering the seat is on the male, because he’s the one who lifts it. in an ideal shared bathroom, where male/female use alternates precisely, this is likely the case– the male doesn’t always need to lift the seat, because per the female use, it’s always down when he arrives.

    the trickiness comes in real world application. male/female use does not alternate consistently, due to schedules, diets, etc. also, it’s likely that a male will need to urinate more often than defecate. and not only that, the male is not incapable of urinating through the seat hole… the lift is mere courtesy to other users of the bathroom, to not sit in (i should mention, totally sterile, as opposed to the above-mentioned feces) urine.

    this begs some questions. is the lift a better idea than peeing-through and dealing with splash damage? i mean, hygienically, even? i’ve always been a lifter, but have recently spoken to some pee-through-wipers. i’m torn. if it’s the household’s preference to lift, should the male be solely responsible, when there are likely many sequences of use (e.g. FM2FM1M1M2F) where the leaving of the seat up will allow that twice-urinating male to not touch the seat at all? given the totality of experience, a “leave it as you need it” policy would, if i’m thinking about this correctly, likely reduce the overall need to touch the seat (note: there may be times when the male will have to return his left-up seat to the #2 position, but due to the higher freq. of #1, this may be negligible)– but the female would need to help out.

    as a courtesy. just like the lift is, in the first place.

    thoughts?

    Like

  18. Every odd number has exactly 50% packing efficiency assuming that each guy isn’t a dick and doesn’t take more than the one empty urinal on each side he needs for privacy. Anything beyond that is just diminishing returns anyway.

    Like

  19. didn’t read all the preceding comments. it seems this has been discussed. apologies.

    Like

  20. Can you discuss the optimal length for walls in between urinals as well. I can never figure out why they are so short as to only cover from about the 5 ft. mark to the knee.

    I’ve caught tall men on more than one occasion looking over the wall and whenever caught they all give the same response… a knowing nod and satisfied smile… creeeeepy.

    Does it really cost that much more to put in a wall from 6 ft or higher down to the floor. It’s like, 3 more feet of material and a lot more peace of mind. I work someplace that forked over the required cash and I consider it a benefit of working here.

    Like

  21. mechanicalme: I think riding the bus is rather like a fermionic system, specifically like an atomic shell. The seats are the states of the electrons, and each pair of seats stands for the two possible spins. Following Hund’s rules, people first start occupying different states with parallel spins (i.e. single seats within different pairs of seats), and only start filling states with alternate spins when there’s nothing else they can do:) It all breaks down to the mutual repulsion between fermionic people (well OK, and perhaps some spin-orbit coupling:D)

    Like

  22. fascinating stuff. It makes it sound kind of stressful to be a guy though.

    Though I don’t think it’s possible to analyze, I wish there was a way to fill a movie theater efficiently that optimized both privacy and viewing position. It’s so much more of a commitment than 30 seconds at a urinal!

    Groucho: I sympathize, but as someone fine with other people’s bodily functions/nudity, your use of “barbaric” amuses me. What is your problem with porcelain bowls?

    Like

  23. 2+2 = don’t pee next to another guy if at all possible. It’s just that simple.

    Like

  24. dont be a pussy and just piss next to another guy. 100% utilization regardless of the number of urinals.

    Like

  25. This assumes the urinals are in a linear arrangement. We need to look into applications for non-Euclidean urinametry. What if the urinals are arranged in a circle, or in a wall with a sine curve shape where every other urinal is on opposite sides? We must maximize space to restroom capacity while minimizing Awkwardness! For Science!

    Like

  26. The wall between urinals usually greatly diminished awkwardness, but it can be used as a tool to maximize it as well. For instance, I once had the misfortune to walk into a small bathroom (3 urinals, I think) in which the middle urinal was taken. The man using it had both arms up on the dividers and was letting it hang free, flying without a pilot, if you will. This was perhaps the highest degree of bathroom awkwardness I have ever encountered

    Like

  27. A more efficient protocol:
    Assuming that a person can accurately choose the urinal or two urinals that are farthest from any other two occupied urinals, I will assume that someone can count to an odd number.

    If you are the first person to arrive at the urinals, use one on the end.
    Otherwise, choose a urinal that has an odd number of urinals between you and any other person. As long as every other person follows this protocol, you will always end up with a perfectly staggered row of urinals. Worst case scenario is simply any even number of urinals. And to make this protocol nicer for many people entering the bathroom at once, you must always choose a urinal with exactly one empty urinal between it and any other occupied urinal.

    Something else that needs to be looked at is the amount of packing loss caused by people not following protocol. For this protocol, each person who does not follow protocol has a 50% chance of causing any problem at all, and when he does, at most 1 extra urinal is lost.

    Like

  28. I’m that asshole that will pick the urinal right next to the only guy taking a piss and ask him if “he hangs out here often”

    Like

  29. You could extend the analysis even further, actually: consider a guy #3 entering, say, a 7-urinal row, with positions 1 and 7 already occupied by #1 and #2. According to the ICUP, he would pick position 4 (resulting in 1 – – 3 – – 2). But if he’s a polite guy and wants to minimize awkwardness, he should pick 3 or 5, allowing space for a fourth person (thus, 1 – 3 – 4? – 2). However, if he picks spot 3 or 5 and no one else enters while he’s peeing, he’s actually increased awkwardness by getting closer to another guy than necessary. So his decision must be a strategic one, based on the probability of another guy entering the bathroom before any of the three guys already in there are finished.

    We also have to assign weights to the awkwardness. We’ll do this from the point of view of our man #3. It’s most awkward for him if he picks position 4 and #4 enters, choosing a spot adjacent to him (e.g. 1 – 4 3 – – 2). Let’s give this an awkwardness weight of 1.0. Slightly less awkward is if #4 enters and picks a spot next to #1 or #2 (e.g. 1 4 – 3 – – 2). #3 himself does not have to deal with awkwardness, but being polite he’s embarrassed at having forced #1 and #4 to pee next to each other. We’ll give this a weight of 0.8. Next most awkward is if #3 picks position 3 or 5, and #4 never enters (1 – 3 – – – 2), because now #3 has gotten unnecessarily close to #1 or #2; let’s assign this a weight of 0.5. If #4 enters, however, the awkwardness decreases, since #3 gets retrocredited for having preemptively engineered the least awkward packing of 4 in 7. This scenario has a weight of 0.3. It’s least awkward if he picks position 4 and #4 never shows up at all; we’ll give this a weight of 0.0.

    Let P be the probability that #4 enters. Upon entering, if #3 has picked position 4, #4 will choose a position randomly, since all choices result in equal awkwardness (all are adjacent to another urinator). Thus, there is a 50% chance that #4 will stand adjacent to #3, resulting in awkwardness of 1.0; the other 50% of the time, awkwardness will be 0.8. With all this information, we can draw a game tree and solve for the threshold P that determines #3’s strategy.

    At the first decision node, #3 either picks position 4 or doesn’t. At the second decision node in each case, #4 either enters (P) or doesn’t (1-P). On the branch where #3 picks position 4 AND #4 enters, there is a third decision node: #4 stands next to #3 or doesn’t with equal probability. Multiplying the weights and probabilities through, we get an awkwardness potential of 0.5-0.2P if #3 doesn’t pick spot 4 and an awkwardness potential of 0.9P if he does. Setting them equal, we get P = 5/11 = 0.454545… for this scenario. If P is less than that, #3 should pick spot 4. If P is greater, #3 should pick spot 3 or 5.

    This is of course only an example; the method can be applied for rows of N urinals with M<N/2 occupied (M?N/2 is trivial; the next person to enter will be forced to stand next to someone). I am a girl, so I may not have assigned the weights accurately. Feel free to replace them with your own weights. Feel free also not to go through with a rigorous rational calculation every time you have to pee.

    Like

  30. Another protocol that may fall under the same banner is the customary length of time it takes to urinate in an empty toilet vs. time taken when other males are present, i.e. the competition factor involved in drawing out the time it takes to empty your bladder, the force used to expel the urine, the height you can pee to (this is an extra factor influenced by alcohol, usually). What could be described as the alpha male pee variable, or last man standing syndrome. Influenced probably by the number of older brothers you had as a child. It would also be interesting to see the urinal distribution vs. alcohol intake; I bet there’s a correspondence between close standers (low awkwardness) and more beer (random distribution of males peeing).
    Love your work.

    Like

  31. How about extending the model by introducing some dynamics? After all, one stops pissing sooner or later. Goal is to find out the optimal pissing length for max use of the urinals.

    Like

  32. It’s a bit of a tangent but one female issue that’s always amused me is something called the “McClintock Effect”. Basically if a group of women live together for an extended period of time their menstral cycles will sync up. Now given women’s cycle vary in length this could simply be a random happening or it could be genuine biological conditioning to enable the females to be better able to compete with each other for male attention (ie all fertile at the same time). It’d certainly be interesting to see the probabilities associated with random syncronising.

    Anyway more info on wiki here http://en.wikipedia.org/wiki/McClintock_effect

    Like

Comments are closed.