# 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 thoughts on “Urinal protocol vulnerability”

1. There needs to be an ISO protocol created for this. I think woman design the bathrooms, every guy is familiar with this issue. What I want to know is why they do not introduce dividers between the urinals to create some personal space; or why some bathrooms have two urinals.

Like

2. Pingback: Taking The Pee? ~ ian-scott.net

3. The solution is obvious: you just make a sequence of 1-stall urinals with a blind between them, Thus making every urinal optimal and giving a 100 % coverage.

Like

4. Can we see the analog transform for when there are no urinals but instead a trough? I image trough length and average hip width may cause multivariable problems…

Like

5. Why don’t they just leave a big space between each urinal and/or put a divider between each urinal so people can have privacy, like at an ATM machine? DUH!

Like

6. What about guys who go together in groups of two or more to the movies and won’t sit next to each other…IN A PACKED THEATER. No one assumes your gay dude…unless you hold hands or make out with your friend, no one thinks you’re gay. Get over it.

Like

7. I interpreted the mens room as always leaving 1 space between you and your nearest neighbor, instead of having the first and last urinals occupied by default.

Here is my formula for efficiency based on the occupation of urinals in a 1 3 5 7 9… fashion, always leaving 1 urinal between you and another guy.
n= number of urinals

maximum number of guys that n can accommodate=
((5-(-1)^n+(2*n))/4)-1

efficiency in percent =
((((5-(-1)^n+(2*n))/4)-1)/n)*100

max is 66.67% lowest is always 50 as N/Men=2
apologies for all the brackets i just took this straight off of excel.

Like

8. Credit to Peter Sach.

The algorithm becomes more complex when you start to dictate where the first person goes. Then it is possible to fill more numbers of urinals optimally, according to the rules above. for example, 7 urinals can be filled optimally if the first person uses urinal 3 (or 5 by symmetry). Under this regime, the smallest number of urinals that is filled sub optimally (i.e. f<floor((n+1)/2) is 15. Then n=16 to 22 can be filled optimally, before 23 being a pain. Have a go!

A few observations for calculation of the optimal places to stand (brute force on a computer)
1. Symmetry. only need to check positions 1 to floor((n+1)/2)
2. Starting at the end is the same as starting in the middle – the first three occupied urinals are the same.
3. Starting at an even urinal will never lead to a more optimal packing than choosing a specific odd numbered urinal – since filling in every second urinal towards the first will lead to the first urinal being empty.
4. If any gap between a two occupied urinals is even, this will be filled sub optimally – e.g. 4.. only one of the 4 will be filled.
5. Gaps of length 2^k – 1 will always be filled optimally – so aim for these! this means that if n = 2^k + 2^l +1 for some k,l then there is an optimal choice of the first urinal at i=2^k +1. This gets more and more complicated for more levels of decomposition.

I'm sure someone out there has developed a function that tells you the maximum number of filled urinals for a given n, and where the first person should start. It is almost always not in at an end, or the middle, except for the above mentioned n=2^k + 1.

Then all you need as a bathroom designer is for the first person entering the bathroom to be a mathematician, and well, who doesn't have a maths degree?

New job: Stand in bathrooms telling people where to pee…

Like

9. Some phenomenal work there. My slight beef with it is that the second entrant going to the far end would, where n>4, be in violation of lads’ compliance regs 101.

To put distance between you and the next man is good manners, but to maximise distance is to show fear.

By major beef is that the idea of optimum numbers of urinals suggests that there is a problem going next to another dude. There isn’t. What this guy’s functions are describing is the point at which it is polite to go next to another dude i.e. when there are no big gaps left.

In fact, I would argue where n>10 one man gaps will be filled under lads’ best practice optimisation protocols while larger gaps still exist.

For instance, where n=10 I suggest order would go:

1, 4, 6, 8, 3, 2, 10, 5, 9

This assumes that a dude won’t walk more than 7 past the first available urinal to find one with a gap.

I have filled 3 before 2 because, although 2 is closer, it requires a sharper turn, implying preference. Also, the approach to 3 is open to the guy at 4 whereas the approach to 2 is blind to the guy at 1. Transparency is key in the current regulatory environment.

Like

10. Very nice article !

Like

11. Might I recommend face to face urinals on a common wall, now do the calculations

Like

12. Or…you can just be a fucking adult and urinate wherever there is an available urinal regardless of where anyone else may also be urinating. Urinating next to another male isn’t going to turn you gay and and you can usually trust that you won’t get anyone else’s urine on you.

Like

13. My brother recommended I might like this web site. He was entirely right. This post truly made my day. You can’t imagine simply how much time I had spent for this information! Thanks!

Like

14. Pingback: Quora

15. Hilarious! Thanks for breaking it down for your readers with formulas, charts, and graphs. You explained it well.

Like

16. Was excellent.
Thank you very much., You are a good writer.
In addition to art that will give you good
I congratulate you

Like

17. Urinating next to another male isn’t going to turn you gay and and you can usually trust that you won’t get anyone else’s urine on you.

Like

18. I abide with the one urinal apart policy. That means, I find an even number (n) of urinals pointless when they could’ve had the same capacity with n-1 urinals.

Like

19. What I want to know is why they do not introduce dividers between the urinals to create some personal space; or why some bathrooms have two urinals.

Like

20. They are preforming well in my electronics and have not had to replace one yet for running out of charge. We have tried both and they didn’t feel wet when she was wet, like pampers did. http://www.world-governance.net/
I was so shocked because I have always struggled with major cravings! I gave this product a 4 stars because the taste of the 1st set of the series were terrible for me. I havent’ taken them long enough to get the softer skin and hair I am after( I am 55 and feeling the effects of menopause ) but I did want to say, the review had me scared about the “horse pill” remarks.

Like

21. I have no idea what fuels my creativity, but it never stops. I have too many stories in my head, and too many characters I’d love to play, and too many plays I’d love to direct. More than a lifetime’s worth. beste mediaplayer

Like

22. In your article or post, whatever, I think I should also work hard for my own website like I see some good and updated working in your site. Read Full Article

Like

23. A leading expert in the field of thermo-dynamics, McCoy revolutionized steam engine travel and earned 57 patents, many of them still in use today. His life was marred by tragedy but his name became an expression of authenticity. AppleShark.com

Like

24. All of our dryland cereals items miles for rye, triticale, oatmeal and barley are going to protected vegetation place plant seeds. That is probably less than 20% of our production. look at here now

Like

25. Every time you buy the same item, as there is the chance that items formerly marked gluten-free may no more bring the declare.n this informative meeting with Terry Total from. use this link

Like

26. So if you think the will move 100cfm your in for a shock but I do like them. This book will guide you in the right direction to survive. This book is like my little bible for me: it is my kaleidoscope of Life. But that is not the case here. It also fits on the door shelves. I want others to have an opportunity to share in my personal experience concerning the usage of a national brand product. I also wanted to avoid non-stick. I dig the slim design of this pitcher as it fits tidily inside my refrigerator. He also claimed to cure his sister….he had no sister. The last 4 filters were all unusable: in 2 of them the top circle that holds the filter inside the bottle cap came already broken and 2 others broke during the first week of use.

Like

27. The threading was not as hard as I thought it was going to be. Maybe it’s just me, but I have a hard time actually shaving the hair. ^_^ If anybody wants to enlarge their dick visit PEGym. The SE400 by Brother looked downright cheap at \$309.00 and a reasonable risk even if she didn’t enjoy the whole idea and simply put it away someplace. I’m using it on the 40D. I use it to get spray cans and cleaning supplies from under the sink. Got this as a gift for a friend… I have posted several images to the customer images area for this product. I am going to try following the schedule suggested by some of the reviews to use it every day for a week, every other day the second week, and gradually get to once a week. I am so pleased with the choice I made in buying this juicer.

Like

28. I will say if you don’t frequently have something to steady the camera on, it will be hard to keep distance shots crisply in focus. I have a 2600 intel pc with Windows 7 Professional. I bought this bumper for my daughter to avoid things falling out from her crib. Thanks Brunner and Suddarth!! Last time sound stopped coming out altogether. If you have any other questions please let us know.” I did indeed receive a full refund, but the listing obviously still exists. It is also well made, it hasn’t let in a drop of water, after a week of use it still looks new, and I expect will be in good enough condition to go into storage for the next foot or ankle injury in this household. I happened to be at the mall burning time with my grandson while the ladies were doing some clothes shopping. With this one, you get the cover pictured, and if you want a different one you can purchase a replacement cover. This review is not about the movie, but the DVD.

Like

29. See it is 3;42 am right now. So much better for breastfeeding than the boppy. It doesn’t say where this product made. There is some useful information here, but it is mostly a collection of magazine articles written by various authors. The equipment seemed incompetent from its inception. i really wish i cud show off mi pics to u guys bt they really du work. Just a badly engineered product with poor support. It is a broken black washer, cracked in half, from somewhere else inside (a factory one, it’s black). I have a bad back and spend a lot of time in front of a computer. the smell is soft and stays on you all day long.

Like

30. With the AC power supply the total travel weight is 5 pounds 0.9 ounces. I have to say, they are priced well. I still can’t believe this is real! If otherwise proven, compared to the other yucky snacks out there (other than fresh fruit and nuts) this is the closest thing to my dream snack! I have been an active customer of Amazon.com for many years and have NEVER been anything but well pleased with their prices and service. very good value for your money. It will do a few, then has problems. I really wanted to like these headphones, and I was uncomfortable with the price. Batteries last a while. Among these pollutants are atrazine, a widely-used herbicide that can cause birth defects and whose use is being enhanced by the ethanol boom; and 0157:H7, a virulent strain of E coli, originating in cattle and that does not respond to chlorine. Firehouse chili really fits the bill, and is the best pre-made chili that I have tasted.

Like

31. Baron Cohen once informed to me that his numbers find out way of life whenever a effect in the mouth seems inevitable. What would be a scary possibility for most is, actually, crazy nirvana for Baron Cohen. He provides some of his best factors when a. straight from the source

Like

32. 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). Paramore Jon

Like

33. 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. halsband herr

Like

34. It’s the objective of a crucial version not basically to provide the best written text, by selecting among version numbers, but also to function the other numbers so that different methods of building the writing are created available. infos

Like

35. Well, I can experience the breeze of the side of insanity tousling my locks, just keeping in thoughts it, but I know I’ll go returning again and again to the epigram Clemens instructed at his interfering manager, from which we all have created much benefit. new criminal lawyer

Like

36. Awkwardness, but because the third guy followed the protocol and chose the middle urinal, there are no options left for the fourth guy. my website

Like

37. A little while back, as the SOPA thing blew up, I poked davean, the xkcd sysadmin, about whether it was time to make switching to someone more geek-friendly a priority. singapore escorts

Like

38. I’ve always been a little uneasy about having all my domains with them, since they’ve got a long history of screwing over domain owners, but never got around to doing anything about it. wasserkocher vergleich

Like

39. So each day’s harmonizes are randomized using the most latest Dow Jackson starting cost, which isn’t known until the morning hours of that day—or, in the situation of saturdays and sundays, a day or two in enhance, which allows with preparing bigger end of the week visits. Télécharger Android apk

Like

40. It’s mentioned at duration elsewhere, but the primary assumption is that the first guy choices an end urinal, and every following guy selects the urinal which places him furthermost from anyone else urination. htc one m8 covers

Like