Friday, February 17, 2012

How many different types of pizza can you make with the following toppings: pepperoni, tomatoes, onions and green peppers?|||16 if you count one without toppings. I don't believe this is a factoral problem, but a binary problem. Maybe we should think of this as four pairs of possibilities (pepperoni or not, tomatoes or not, onions or not, peppers or not). Then you'd multiply the possibilities (2x2x2x2). That would give you 16. If the "null pizza" is not allowed, then you have 15.

How about lets do it binary and walk up the bits counting right to left:

----
---G
--O-
--OG
-T--
-T-G
-TO-
-TOG
P---
P--G
P-O-
P-OG
PT--
PT-G
PTO-
PTOG|||Twenty four, since you have no limitations your answer can be found by this formula(n=number of toppings): n*(n-1)*(n-2)*(n-3)...until the number you multiply by is 1. In this case you would do 4*(4-1)*(4-2)*(4-3)...do this and you get 24|||A non vegetarian pizza just add all of them|||14|||24|||Okay... I dont know if you have to use them all, or if you can use however many, so I'm going to say you must use 1 and can use all of them if you want, that seems to be what you want.

Heres my thought process:
P,T,O,G
Are your toppings

1. P
2. PT
3. PO
4. PG
5. PTO
6. PTG
7. POG
8. PTOG
9. T
10. TO
11. TG
12. TOG
13. O
14. OG
15.G

15 Pizzas

火车采集器

No comments:

Post a Comment