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.
I am totally printing this out and posting it over the urinals in the office.
Of course, I work in a math department…
LikeLike
What effect do those kid sized urinals have on reducing awkwardness. I don’t know why those things exist, especially because there always seems to be one, and I find them quite awkward.
Should I just exclude that urinal as a no-go, or should it be added as a correction factor, as it is more awkward than a full sized urinal, but not quite as awkward as being at the next urinal.
These rules, however, seem to fly out the window as soon as your drunk. At which point the corner near the bar looks pretty promising, and actually being at a urinal seems like a miracle.
LikeLike
@Robert – real men use the protocol for partitioned urinals too. If you can look ’em in the eye you better not pee next to ’em.
LikeLike
I was looking at some 42U rack schematics and though, it should actually use the same protocol to optimize airflow and cooling.
LikeLike
whos gonna do all the maths
dats why i pee in d sink 😀
LikeLike
cant do all dese maths
dats why i sneak and pee in ladies room 😀
LikeLike
your wrong, the formula is n=2^k+2. this accounts for the presense of the child urinal. those are as awkward to use as the ones directly adjacent to another person.
LikeLike
Your protocol is wrong.
You never take the end urinal. (when there are more than two urinals)
You take the one second from the end.
That way you minimize the risk of being cornered. (having no free space to either side).
If you take the end urinal it only takes one sociopath to close you off.
Even when there are only three urinals you take the middle one. Thus forcing the second peeer to use a corner urinal, giving you the strategic advantage and urinal supremacy.
LikeLike
Joke or not, what’s with the up-tightness – a man who can’t pee along a brother man and even catch and accidental glimpse of another man’s pecker without feeling awkward, is either a poor drinker (ask an Irishman or a Scandinavian person if the they give a damn), a closet voyeuristic homosexual (just pee at home, period), or so insecure about being a man, they should just sit down an pee behind a closed door. If you need to go you just go, shake it off, wash your hands, and go on with your day.
LikeLike
Oh man, I absolutely laughed my frickin coffee onto my legs when reading the last note. I.C.U.P=Priceless. This is the old xkcd i know and love =D
LikeLike
@gummih
actually i find it is correct, if you take the last one, you can turn your back and shield yourself from the prying eyes of your peers.
to confirm the internationality of this protocol, its also protocol here in holland.
LikeLike
This makes me want to add a counter to those auto-flushing urinals, just to see how true the International Choice of Urinal Protocol is.
LikeLike
I’ve never taken the time to work out the formulae (nice work), but I’ve often ranted drunkenly to drinking buddies about why you should never trust a bloke who picks – from a line of three vacant urinals – the middle one. Of course, there’s nothing wrong with pissing next to another guy, but actively putting yourself in a position where it goes from 50% to 100% likelihood that any guy who comes to piss while you’re pissing will have to do so right next to you, seems wrong to me. Nice post.
LikeLike
Ah…rows of urinals…that takes me back. But now that I’m no longer a student and have money I only eat and drink in restaurants and hotels that treat men with a bit of respect.
Making guys all piss next to each other is disgusting. You wouldn’t see the ladies accepting a row of toilets with no cubicle walls between them! And why not? Woman pee sitting down so there is no danger of splashing on each other but they wouldn’t accept this for a second.
I can no longer stand taking a piss in a urinal in between 2 guys. The smell of their piss, the smell of their BO and the chance of getting splashed with someone elses urine takes the piss! If your low class crappy pub or restaurant has urinals then I dont spend my money there. Simple.
LikeLike
Of course, what you haven’t taken into account is a decay rate.
Assuming 1 man takes 1 minute from the point he occcupies a urinal untill the point he leaves, what kind of effect would this have on your chart? If you add this factor in to the equation, is it possible to find out the maximum time you would have to wait in a backed up bathroom if you were the Xth person in the qeue? Also, can a simple to use formula be made so that anybody can calculate the time for Y number of urinals with X many people in the qeue?
LikeLike
The simplest solution is to not have normal urinals at all! Have one of those “endless wall” kind of urinals. It’s like using floating point numbers instead of integers, to do math.
LikeLike
Yo, 1-3-5 rule. Much simpler. Someone at 1, you go to 3, then 5, and so on. No matter how many urinals, there’s one empty urinal between everyone, and no empty urinals next to each other.
LikeLike
We should simulate different man-urinator allocation strategies. Of course, we should take into consideration these factors:
* the time between two consecutive arrivals to the bathroom (most likely an exponentially distributed random variable)
* the time it takes someone to urinate (most likely a normally distributed variable)
LikeLike
“say you want to create awkwardness.”
i usually do this by choosing the urinal right next to someone who is already peeing. Then i grab his penis and kiss him on the mouth.
…. (sing-songy) AWK-ward!
LikeLike
Very good. There should be more of this kind of analysis. To get the people more acquinted with math.
LikeLike
Woman specific query in same vein: It is common knowledge that any women’s restroom will have a longer line than a men’s (except at Rush concerts). In some cases this has even led to legislature stipulating that in any public building, the number of women’s restrooms be double the number of men’s. In one of these buildings, for example, there are 3 floors. On the 1st and 3rd floor there is a women’s restroom, and on the 2nd floor there is a men’s restroom. Thus, no-one has to climb more than 1 floor to reach a restroom. After a class on the second floor, which women’s restroom would have a shorter line? (This is an actual situation I encountered at college in a recently built Art History building.)
Or, there is also the necessity for women for trying to figure out when to go to the restroom to avoid a line during say, a sporting event or a theater show. In both problems there is a paradox, in that every individual woman is going to try to go to the restroom when it is least occupied, but by going, she occupies it. Would there be a good way to determine mathematically when to go to avoid a line? Or should we have gone before we left the house?
LikeLike
i love this!
may i use it for my research?
‘poets are pure justified impossible meaningless statements of enlightenment,
being passed as answers to the unrecorded letters of questions…’
-André Pissoir “as we got lost 10 000 years ago”
LikeLike
as an non-college educated mathematician, my solution would be to use those separators
LikeLike
Thanks for your insight of the problem.
I can’t figure out a women-related problem of the same kind but…
This could be extended some way to a two-dimensional space.
E.g. let there be a restaurant, where {xi,yi} are the x and y coordinates of table i….
LikeLike
I’m gay and a i like piss fetish.
What about me?
LikeLike
There are several corollaries to this in women’s restroom habits, including the choice of stalls for distance from other occupied stalls. However, some are more complex, for example, the inability to “poop” when another woman is occupying an adjacent stall. In smaller restrooms (2 to 3 stalls, such as in an office setting) there is often a stand-off(sit-off!) waiting for the other woman to leave so that one can go #2. If both women need to go #2, someone is going to have to give in and either leave or do the unthinkable and make a bodily function noise/smell in range of another woman. The variables are pretty much infinite – diet (do the women eat the same lunch, did one have chili for dinner?), are the women fellow cubicle mates or is one a superior to the other? And so on….
LikeLike
Perhaps you could find the packing efficiency in a ring of urinals. To explain it better, let’s assume the bathroom has a column in it and there are urinals places around the entire circumference? I’m sure later this idea will sound terrible to me, but i just had a Chemistry exam and my mind is a bit blubbery.
LikeLike
I think this line of thinking can be applied to people, bi genderly, sitting on trains with rows of seats. Obviously everyone wanting a buffet seat on both sides. Of course both systems seem to breakdown once a certain level in demand is breached. But the model for train seats would have to include friends who sit together. Pairs would throw any pre-emptive arkwardness or efficiency instilling into disarray.
LikeLike
here’s a female idea (nothing to do with restrooms, but here ya go)
at slumber parties, there is inevitably a braiding session, in which the girls sit down and one girl braids the hair of the girl in front of her and the girl behind her braids her hair, and so on. the optimal configuration would be if everyone sat in a circle so everyone’s hair would be braided. however, there is always that girl who can’t or won’t braid hair, or is simply terrible at it. there is also that girl who is perfect at it so everyone wants her hair done by her. then, there’s the rest of the girls, who are so-so. if the ratio of hair-braiding talent in that order was 3:2:6, then what would be the best configuration? if you want to make it even MORE complicated, add in the variable of some girls ONLY wanting her hair done by the best, and the possibility of the host girl’s older brother jumping out from behind the door wearing a hockey mask, scaring everyone, thus making everyone’s hair fall into disarray.
(and is it even worth it if the cops come the following morning to inspect the ensuing homicide?)
LikeLike
…many of the Software Engineers that make it state-side from India need to read this post.
LikeLike
“Yo, 1-3-5 rule. Much simpler. Someone at 1, you go to 3, then 5, and so on. No matter how many urinals, there?s one empty urinal between everyone, and no empty urinals next to each other.”
I disagree with that. That may work for 5 urinals (but would be no more effective then the ICUP standard), but awkwardness increases with the number of urinals, making an 8 urinal setup even more awkward then a 2 urinal setup.
For maximum simplicity and efficiency, I propose an addition to building codes that all urinals have floor to ceiling 10cm divider between each urinal, protruding at least 1m from the outermost part of the urinal. This removes awkwardness from the equation, as long as there aren’t parallel rows of urinals.
LikeLike
Anyone ever take a step back to look at what we all talk about all day in the eye of the normal public?
LikeLike
After reading this I’m afraid that Mr T is going to turn up at your house, smash everything, and throw Snickers bars at you until you grow into a man
LikeLike
The 1-3-5 rule is terrible for large numbers of urinals. Imagine standing at a urinal at the end of a empty row of 33, then having a guy come in and choose the urinal only two away.
Perhaps we should simplify the problem by assuming a spherical urinal with no mass.
LikeLike
Has anyone considered a reluctance to use child size (the ones closer to the ground) size? This actually happened to me today.
|stall| u1 | u2 | u3| u4*short size*
I went into the bathroom to pee and there were 4 urinals, not very efficient. It was made even more awkward by the fact that there was a stall about 3 feet from urinal #1 with no divider between it and the stall. Urinal #4 was a short size urinal. The stall was occupied and so i chose urinal #2. Admittedly i should have chosen urinal #3. However a man came in and chose urinal #3 unabashedly. To me this was extremely awkward, but was he required by ICUP to choose the short size?
LikeLike
I suggest factoring in distances from each urinal to windows and exits in case of raptor attack.
LikeLike
I’m neither female nor an even halfway acceptable mathematician, but these are my observations, largely hearsay of course, for expanding this formula to restroom stalls for women:
First, we need a social factor in the formula, which depicts how well two women in the same restroom know each other and how well they like each other (not in a romantic sort of way, that would be another formula alltogether), some sort of weighted social graph, where a high value means “knows well and likes more”.
Using this factor, my observations lead me to believe that the interval between used stalls tends towards 0 the stronger the above social factor is, tending towards infinity on weak or even negative social factor. Any interval below 1 meaning two women using the same stall to chat, a high interval leading to women waiting outside the restroom for their disliked social graph partner to exit the room before using any stall.
Anyone second that? Can we get some first hand femal input here, please?
:o)
LikeLike
Where I come from, there is a condition called Ultra_Awkward, when a person chooses to pee in the urinal right beside yours even though he could be at a distance > 5 cubicles.
Try solving the equations of the mind next.
LikeLike
The name should be “Protocol on Urinating”, abbreviated pronounciation “P on U”.
LikeLike
of course youre forgetting about those places that have the small boards between the urinals so everyone can pee without akwardness. those are nice
LikeLike
Here’s my take on a similar girl issue:
We have stalls, so it may not be as awkward, but it’s common sense that if you go into a restroom where there’s more than two stalls, don’t take the one immediately next to one that’s already occupied. If there’s a line, then sure, it’s acceptable then. There’s also the handicapped stall sometimes, which can factor into a decision.
Also, I find it actually MORE awkward peeing next to someone you know, because being girls, we do talk to one another when we’re peeing. In that case, it’s fine to be in the stall immediately next to them, and maybe it’s just me that finds it awkward to talk and pee at the same time since I’m never the one that initiates it…
LikeLike
The undermines the Halftime postulate, which states that while the initial protocol for going to the restroom at halftime or hockey game intermission, you man up and fill in accordingly as to effectively move the line so that most can make it back to there seats before puck drop. Ergo, at halftime or during intermission the Urinal efficiency rate is 100+% the plus being if it is a shortened intermission before overtime when the most hardcore of sports fans are willing to cross swords.
LikeLike