Solved: the toilet seat problem

Alice and Bob share a house which has a single lavatory. Given the various possible strategies that each housemate could use in their toilet seat interactions, which combination of strategies is least inconvenient overall?

View the simulation results here.

There are multiple possible definitions of "inconvenient". We gather data for the eight most obvious metrics, but it's up to the housemates to decide which metric is most important.


  • This simulation (which is really one simulation for each pair of strategies) runs continuously as you leave the browser window open, gathering long-term averages.

  • The default strategy for lazy humans, highlighted in yellow, is to always leave the seat as it was used. This is the benchmark upon which we are attempting to improve.

  • The simulated toilet seat has two positions: up and down (see Further Work).

  • The simulated toilet was installed with the seat down.

  • Bob always lifts the seat when possible.

  • Some strategies yield identical results. E.g. for Alice, "leave the seat down" and "leave the seat as it was used" are identical strategies.


I tried to go into this piece of work with an open mind and few preconceptions, although I had a few hunches. The results were extremely interesting.

There is an answer!

The first and most shocking result is that there is a solution to the problem which is provably perfectly fair - for some metrics. If we consider the metrics "absolute difference in mean flips per day" or "absolute difference in mean flips per visit", then the optimal strategy is for both Alice and Bob to leave the toilet seat in the opposite state from how it was found. Using this strategy, all toilet users always flip the toilet seat exactly once per visit.

It is difficult to imagine a more even-handed approach. Alice and Bob are able to use the same strategy, and the strategy extends to additional housemates, additional lavatories and arbitrary lavatory usage patterns. (Alice and Bob are assumed to have identical lavatory usage patterns. If they do not, the result still holds for absolute difference in mean flips per visit, but possibly not for absolute difference in mean flips per day.)

This was a very surprising result. Although the logic is obvious in retrospect, I had no expectation that this piece of work would find a strategy that was provably fair and perfectly fair. The only way a "better" result could be obtained is if we found a "better" metric of fairness/inconvenience...

What about other metrics?

The other metrics are "mean flips per day" and "mean flips per visit". Here I found another surprise. The default strategy for lazy humans, whereby Alice and Bob both leave the seat as used, is apparently the optimal one.

This is not what I expected to find at all! However, this, too, is quite logical and obvious in retrospect. Minimising mean flips per day/visit is the same as minimising total flips, since we are not able to modify the number of elapsed days/visits at will. This in turn indicates that the best strategy is the laziest one, which is the default one.

Other observations

Separate data is gathered for Alice and Bob, so that we can compare their individual experiences.

In the default scenario, whereby Alice and Bob leave the seat as used, Alice must flip the seat ~1.63 times per day / ~0.36 times per visit, whereas Bob must flip the seat ~2.7 times per day / ~0.60 times per visit. In either case, Bob is far more accustomed to inconveniently configured toilet seats than Alice. This may explain why the Bobs of the world consider the entire matter to be far less significant than the Alices.

Furthermore, while Alice may feel that ~1.63 flips per day / ~0.36 flips per visit is too many, note that even under ideal circumstances for Bob (Alice leaves the seat up, Bob leaves the seat as used), Bob must flip the seat more than this: ~1.83 times per day / ~0.41 times per visit.

Further work

  • More/fewer Alices/Bobs

  • More toilets

  • More realistic toilet usage distributions

  • More metrics. Are there factors other than "how many times I have to flip the seat" that should be considered?

  • More strategies.

Discussion (16)

2014-01-06 00:53:43 by Solus:

Well... what's the point of having a lid if it doesn't get used? =S I was taught to only flush the toilet when the lid is down. Which gives me problems when using public toilets that don't have one.

2014-01-06 10:38:52 by bastard:

Remove toilet

2014-01-06 10:45:26 by LorxusSevlim:

For my part, I'm getting A: always leave down, B: always leave as used as supposedly optimal.

2014-01-06 15:27:59 by zagdrob:

Isn't the optimal position always closed with the lid down to prevent fecal matter from contaminating the bathroom? This also has the benefit of both parties always having the bathroom in the same default state, preventing nighttime errors. Also, any simulation should account for varying bladder sizes between genders that may result in higher usage.

2014-01-06 17:01:16 by P:

Automatic bluetooth toilet seat and lid pre-activated by Siri on your iPhone so it's ready and waiting as you get there. "Siri, I am going for a number 2 now" This is the future.

2014-01-06 17:02:18 by qntm:

The obvious solution is to leave the seat at a forty-five degree angle.

2014-01-06 18:26:22 by Drake:

Leave the lid down, when you flush with the lid open poop particles go into the air (and into you toothbrush)

2014-01-07 16:52:44 by Toph:

Spring-loaded toilet seat that springs up when left down. I've seen them around.

2014-01-07 19:00:58 by P:

Perhaps if sitting is ever so slightly more likely then a 42 degree angle would be more efficient. How did your random choice work? 50-50 or some other ratio? With suitable data collection you could calculate the correct probabilities as a function of time of the week. It might come out suitably efficient.

2014-01-09 03:43:25 by alexanderwales:

What about when Bob poops??

2014-01-11 00:44:02 by Silas:

This article doesn't seem to have made it into the RSS feed for the site -- was that intentional?

2014-01-14 02:46:16 by Andrew:

alexanderwales: It's taken care of, but you have to read the source to see it. The code assumes that each person pees 2-4 times per day and poos 1-2 times per day, that Alice needs the seat down for both, and that Bob lifts the seat to pee (which is 2/3 of his visits). If this wasn't the case, there would be no asymmetry between Alice and Bob, and all symmetrical strategies were fair. It's always been obvious to me that the lazy strategy is the winner in terms of total seat flips, but what I didn't think about now is that even in the lazy strategy, Bob bears more of the inconvenience than Alice. Bob has a 2/3 chance of finding the seat down * a 2/3 chance of wanting it up, plus a 1/3 chance of finding the seat down * a 1/3 chance of wanting it up = 5/9 chance of inconvenience, while Alice has a 1/3 chance of finding the seat up * a 100% chance of wanting it down = a 1/3 chance of inconvenience. Suggestion for improvement: having to flip the seat *before* you go is more inconvenient than having to flip it after, because you're in more of a hurry at the time.

2014-01-14 02:50:10 by Andrew:

Also contrary to some people's expectations: both following "always leave the seat up" is *not* the most convenient for Bob, although it is the most inconvenient for Alice.

2014-01-23 00:20:35 by David:

My solution seems even more optimal: despite being male (cis even) I am lazy enough to just sit for #1 and #2 both. Seat doesn't move except for cleaning.

2014-01-29 05:10:21 by gs:

Same as David. I, a male, tend to by default sit during both activities.

2014-07-20 21:30:59 by Best metric:

minimimax(bob's flips caused by alice, alice's flips caused by bob)

This discussion is closed.