In Kyoto, Japan, in the Nintendo museum, there is a restaurant called Hatena Burger. They claim to have over 270,000 different burgers you can order! Let’s investigate that claim to see how true it really is.
The way they can arrive at such a big number of possible burgers is to have a variety of different items you can combine in various ways. This quickly creates really big amounts of permutations.
Since you can build your own burger you get to choose 1 of 3 different bun types, 1 of 10 different main ingredients, 3 of 11 different toppings and 1 of 7 different types of sauces.
To figure out all the possible combinations you simply multiple all these values together.
3 Bun types × 10 Main ingredients × 7 Sauces × (11 Toppings × 11 Toppings × 11 Toppings) = 279,510 possible combinations.
It does seem that there are over 270,000 possible burgers you can order, but that comes with several big asterisks! These are possible combinations with repetition. When you are selecting your 3 different toppings order doesn’t matter, so Tomato, Lettuce and Cheese is considered a different burger than Lettuce, Cheese and Tomato, but most of us would agree it is the same thing. Also, you can select the same topping 3 times: a Cheese, Cheese, Cheese burger. What is the total possible combinations if we make sure the set of toppings is unique and order independent?
Todo so, we are not multiplying the total number of toppings (11) by the number you can choose (3). Instead we need to look into combinations without repetition using combinatorics.
First we select the number of possible combinations and then subtract the duplicates. We start with 11 different toppings, but once we select the first one, we only have 10 left, and after selecting the second, only 9 left. That’s 11 × 10 × 9 = 990 possibilities without repeating an ingredient. But that’s still order independent. We want to reduce that by the number of combinations of our 3 potential selections, which is 3! = 6. We can take 990 / 6 = 165. Then general equation is:
n!/(n-r)! × (1/r!) where n is the number of times possible (11) and r is the number we can choose (3).
11! /(11-3)! × (1/3!) = 165 possible combinations without repetition. That’s a lot lower than the 1,331 possible combinations of 11 × 11 × 11 Toppings or 990 of 11 × 10 × 9 Toppings without repetition.
If we plug that new value into our equation we get 3 buns × 10 mains × 7 sauces × ( 11 nCR 3 = 165 topping combinations) = 34,650 possible unique burgers. That’s far less than the 279,510 possible burger combinations when we preserve the topping order.
Interactive Examples
🚨 These examples require Javascript, so if you’re looking at this in a feed-reader or email client, it might not work. Check the original link to try these examples.
Channeling Bret Victor, let’s have a look at the possible combinations in a more interactive way. One of his approaches was to have inline text be editable, thus changing the flow of the paragraph. He advocated for green text inline being draggable to update the values. Let’s experiment with the following paragraph. (Try dragging the text in green to the left or right to change the values)
At Hatena Burger, you can build your own burger by selecting from different buns, different main ingredients, different sauces and 3 of different Toppings. This gives 279,510 different possible meals.
This is a great example of how changing the number of options by a small amount can make a big impact on the total permutations. The downside is that it overly simplify duplicate toppings and doesn’t allow for fine grained choices. Maybe not all the toppings or sauces are for me?
Let’s try again with a more complex menu. This allow the customer to limit the options not by a number, but by dietary preferences; Vegan, Vegetarian, Pescatarian, Dairy-free, Celiac, etc.
Buns
Main
Toppings
Sauces
Stats
Based on your selection there are xxx possible burgers.
Finally, as you build your burger, you get a nice animated cartoon of your combination.
Reload Random Burgers
Conclusion
Does Hatena Burger have over 270,000 different burgers? Strictly speaking yes. Practically speaking, no. It’s much, much less when you remove duplicate toppings. Looking into the mathematics and combinatorics of the possibilities can be a fun and interesting way to see how adding or removing small amounts can have big impacts.
When we see what seems like outlandish claims “Over 270,000 possible burgers” it is within our abilities to double check and confirm or deny if it’s true.

