Allow me to illustrate the pizza problem with an example. There are fifteen people who are ordering pizzas for a study break. This means that they'll order about four large pizzas. The person ordering asks people what toppings they like. Person six says "I like Hawaiian." Person eleven says "I like buffalo chicken." Person ten says "I like cheese pizza." Person eight says "I like Hawaiian too." Person two says "I like pepperoni" and person five says "I want vegetarian pizza." The person ordering the pizza then (hopefully) takes a quick poll to see what everyone wants. It turns out that 3 people vote for Hawaiian, 5 cheese, 4 pepperoni, 2 buffalo chicken, and 1 vegetarian.
This is when the problems begin to arise. Typically, these numbers would amount to the following order: 1 Hawaiian pizza, 1 cheese pizza, 1 pepperoni pizza, and 1 half-buffalo chicken half-vegetarian pizza. This doesn't sound too bad, does it? Assuming everyone eats about 1/4 of a pizza, the entire pepperoni pizza is consumed, the entire buffalo half is consumed, and the entire cheese pizza is consumed. There's a leftover quarter of Hawaiian and vegetarian, and two people that wanted cheese only got one slice of pizza. Not too bad.
However, this is not a realistic depiction of pizza eating. More often than not, the people who wanted an esoteric topping (such as Hawaiian or buffalo chicken) will eat one slice of their favorite topping pizza, and then they'll grab a slice of cheese or pepperoni. So the pepperoni and cheese pizzas, which are either already saturated or over-saturated with people that specifically want that topping, are even more strained. Often, someone who only likes cheese pizza won't get any, and someone who likes only cheese or pepperoni will either only get a slice or cheese or no pizza at all. Moreover, in this scenario we're left with a lot of Hawaiian and buffalo chicken leftover.
So how does one solve the pizza problem? Well, speaking as someone who's ordered pizza for a hungry robotics team for three years now, I have a pretty solid solution. First off, always make half of your order cheese pizza. If there isn't enough interest in any one topping, then order more cheese pizza in its stead. Everyone likes cheese pizza, even those that also like Hawaiian or buffalo chicken, or what-have-you. The converse is not true.
The ideal order for the example above would be two cheese pizzas, one pepperoni pizza, and one half-buffalo half Hawaiian pizza. This way, the 5 people who want cheese and the 1 that wants vegetarian will eat cheese. The 4 people that want the pepperoni will eat pepperoni (or maybe one would even eat cheese). 1 of the 3 that want Hawaiian will get two slices of Hawaiian and the other 2 will get one slice of Hawaiian and one slice of cheese. The 2 people that wanted buffalo chicken will get buffalo chicken. In this scenario, there is about half of a cheese pizza leftover, so that people that wanted other toppings can still eat cheese without preventing people who only like cheese from getting any pizza. It works out very, very well.
Essentially, the algorithm is this: for a non-cheese topping pizza, order [(number of people that want that topping)/5] number of pizzas, assuming that everyone will get 2 slices in an 8 slice pizza. Tweaking this number downwards in order to ensure an order of at least half cheese pizzas is favorable.
omnomnomnom
0 comments:
Post a Comment