JOMO's Pizza

At JOMO's Pizzeria, you can design your own pizza. You can choose from any of the 6 toppings: Pepperoni, Salami, Onions, Mushrooms, Pineapples, and Ham. You can also choose between a thick and thin crust. A plain pizza with no toppings costs $120 HKD. Each extra topping you add on costs an extra $20 HKD. If I only have $200 HKD, how many different types of pizza could I order?

Details and Assumptions

You are allowed to order a Pizza with repeating toppings, so you could order a pizza with 3 toppings of all pineapple.

This problem was taken from JOMO.


The answer is 420.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Yan Yau Cheng
Feb 16, 2014

This is Actually a question in JOMO 1, if you think this question wasn't too hard but isn't too easy, then you should take part in JOMO!

The Pizza I order can have a maximum of 4 toppings.

If there are no toppings, I can order 2 different pizzas, one with thick crust and one with thin crust.

With 1 topping, There are C 1 6 = 6 C^6_1=6 different toppings you can choose, and you can choose between thick and thin crust. So there are 12 different pizzas you can order with 1 topping.

With 2 toppings, you can have 2 different toppings or two identical toppings, which has C 2 6 = 15 C^6_2 = 15 and C 1 6 = 6 C^6_1 = 6 different combinations respectively. You can choose between thick and thin crust. So there are ( 15 + 6 ) × 2 = 42 (15+6)\times 2 = 42 different pizzas you can order with 2 toppings.

With 3 toppings, you can have 3 different toppings, two identical toppings and 1 different, and 3 identical toppings, which has C 3 6 = 20 C^6_3 = 20 , C 1 6 C 1 5 = 30 C^6_1C^5_1 = 30 , and C 1 6 = 6 C^6_1=6 different combinations respectively. You can choose between thick and thin crust. So there are ( 20 + 30 + 6 ) × 2 = 112 (20+30+6)\times 2 = 112 different pizzas you can order with 3 toppings.

With 4 toppings, you can have 4 different toppings, 2 identical toppings and 2 different, 2 identical toppings and another 2 identical toppings, 3 identical toppings and 1 different, and 4 identical toppings, which has C 4 6 = 15 C^6_4 = 15 , C 1 6 C 1 5 C 1 4 2 ! = 60 C^6_1\frac{C^5_1C^4_1}{2!} = 60 , C 1 6 C 1 5 2 ! = 15 \frac{C^6_1C^5_1}{2!} = 15 , C 1 6 C 1 5 = 30 C^6_1C^5_1=30 and C 1 6 = 6 C^6_1=6 different combinations respectively. You can choose between thick and thin crust. So there are ( 15 + 60 + 15 + 30 + 6 ) × 2 = 252 (15+60+15+30+6)\times 2 = 252 different pizzas you can order with 4 toppings.

In total there are 2 + 12 + 42 + 112 + 252 = 420 2+12+42+112+252=\boxed{420} Different Pizzas I can order with $200 HKD

You can do this without casework. Ignore the different crusts to begin with. Also, denote the number of toppings of pepperoni as a 1 a_{1} etc. up to ham as a 6 a_{6} . So in fact we want to find the number of solutions to a 1 + a 2 + a 3 + a 4 + a 5 + a 6 4 a_{1} + a_{2} + a_{3} + a_{4} + a_{5} + a_{6} \le 4 , where all terms are non-negative integers. This is also the same as the number of solutions to a 1 + a 2 + a 3 + a 4 + a 5 + a 6 + k = 4 a_{1} + a_{2} + a_{3} + a_{4} + a_{5} + a_{6} + k = 4 where again all terms are non-negative integers. Therefore, using stars and bars, the number of possibilities is ( 7 + 4 1 4 ) = ( 10 4 ) \dbinom{7+4-1}{4} = \dbinom{10}{4} . But each pizza can also either be thin crust or thick crust, meaning that the total number of possibilities is 2 ( 10 4 ) = 420 2 \dbinom{10}{4} = \fbox{420}

Josh Rowley - 7 years, 3 months ago

Log in to reply

Isn't this also called the pigeon-hole principle?

Harshal Sheth - 7 years, 3 months ago

Log in to reply

No. It is called Stars and bars . Josh's approach of adding an additional term to deal with the inequality is extremely useful to simplify the calculations.

You can learn more about the Pigeonhole Principle .

Calvin Lin Staff - 7 years, 3 months ago

I have just read about Stars and Bars and I thought it was explained well. But, I got confused with how from a 1 + a 2 + a 3 + a 4 + a 5 + a 6 + k = 4 a_1 + a_2 + a_3 + a_4 + a_5 + a_6 + k = 4 , you got ( 7 + 4 1 4 ) {7 + 4 - 1 \choose 4} . I am thinking that 7 7 refers to the number of terms ( a 1 a_1 to k k ). Am I correct? And, where do the numbers ( 7 + 4 1 4 ) {7 \boxed{+ 4} \boxed{- 1} \choose 4} come from?

Ralph Anthony Espos - 7 years, 3 months ago

Log in to reply

So you know that a1, ... k can be 0 to whatever. But stars and bars only works when they're greater than or equal to 1. So you let a1=a'-1 etc. so then you have a1'+a2'+a3'+...k'=7+4=11. So now you want stars and bars on a1' etc. and then when you do that, subtract 1 from everything to get your original a's and k's. There are 11-1 choose 7-1 = 10 choose 6 == 10 choose 4 ways.

faraz masroor - 7 years, 2 months ago

Log in to reply

@Faraz Masroor Er... not really the explanation I expected.

Ralph Anthony Espos - 7 years, 2 months ago

I came up first with 3110 3110 because I assumed that a pizza with 20 20 HKD worth of, say, pineapple is different from another pizza with 40 40 HKD worth of pineapple (because it had more toppings). I really wish the problem was clear with that.

Oh, well. Back to Level 3.

Ralph Anthony Espos - 7 years, 3 months ago

Log in to reply

Me too :)

Tan Li Xuan - 7 years, 3 months ago

Me also.. The problem is vague about this. Personally, I still consider a pizza with 2 pineapple toppings as being of a different type than a pizza with 1 pineapple topping..

Rahul Choudhary - 7 years, 3 months ago

Same here

Sadhana Senthilkumar - 7 years, 2 months ago

With 2 toppings should not we have 2 6^2=72 with 3 toppings 2 6^3=432 and so on

Jayanta Mandi - 7 years, 3 months ago

Log in to reply

Please refer to the Stars and Bars algorithm Calvin was above talking about, to clarify your doubt.

Soumya Chakraborty - 7 years, 3 months ago

This was among the few questions, I couldn't get on JOMO.

Shabarish Ch - 7 years, 3 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...