Counting Pizza Toppings*
The commercial’s deal was:
▯ 2 pizzas
▯ up to 5 toppings on each
▯ 11 toppings to choose from
▯ all for $7.98 (back in 1997).
The commercial’s math kid claimed there are 1,048,576 possibil-
Let’s do the calculation ourselves.
Q. How many ways can we order a pizza with 0 toppings?
Q. How many ways can we order a pizza with 1 topping?
1 Q. How many ways can we order a pizza with 2 toppings?
Q. How many ways can we order a pizza with 3 toppings?
▯ Does the order that the toppings are picked matter? How
many times have we over counted?
Q. How many ways can we order a pizza with 4 toppings?
Q. How many ways can we order a pizza with 5 toppings?
2 Therefore the total number of ways to order a pizza with up to 5
toppings when choosing from 11 toppings is:
Q. How did they get 1,048,576 in the commercial?
Q. Is 1,048,576 the correct answer?
Q. What is their mistake? and how do we correct for it?
Q. This is stilll not quite correct. Why?
3 Q. How do we know that this is the correct answer?
A. One way to convince ourselves is try to ﬁnd another way to
count the same problem.
We counted all possible orders and then removed duplicates.
Exercise. Recount using a different method.
Exercise. How many ways are there to order the pizzas, if dou-
ble toppings are allowed (ie., two of the toppings are the same)?
4 Example. Creating a secure password.
To create a account, you are required to give 8 or more
Q. Why so many? Why not just 4?
A. Let’s count how many possible passwords there are of lengths
4 and 8 and compare.
5 Q. How many alphanumeric characters are there?
Q. How many passwords are there of length 4?
Q. Why do we multiply instead of add?
Q. How many passwords are there of length 8?
So there are more than 14 million times as many passwords of
length 8 than of length 4.
6 The Sum Rule
When counting we need to be able to determine whether to sum
or multiply the number of objects.
The Sum Rule. If an operation can be performed in n different
ways, each having x possible outcomes, then the total number
of outcomes possible is
Example. Ordering pizza. Suppose a pizza shop offers 5 types
of toppings, and one has the choice of a 3 topping, 2 topping or
1 topping pizza.
Determine how many different pizzas can be ordered.
Number of Toppings Number of Pizza Choices ix )
Total number of ways to order a pizza: