Did Jessica Simpson do her sums correctly?

Considering it’s the same place they get their pizzas, I don’t know why you’d think otherwise…

So what we want is a method that allows people to choose duplicate toppings and duplicate pizza types, but counts “mushroom-anchovies-anchovies” as identical to “anchovies-anchovies-mushroom”.

Well, the number of ways to choose m items from a pool of n distinct types of object, allowing duplications, is (n + m - 1)C(m) = (n + m - 1)!/(m! * (n-1)!). If we have 18 toppings, the 17 mentioned plus the “null topping”, and we want to choose three of them allowing duplications, this comes to 201918/6 = 1140 different types of pizza for each quarter. (If you assume that there are 18 “real” toppings and a single non-topping, you get ultrafilter’s result of 1330.)

Then, using the same formula, there are 1143 * 1142 * 1141 * 1140 / 24 = 70,744,321,940 distinct ways to choose four pizzas to make up an order.

The calculator that comes with Windows calculates 3060! as 3.2241325214430646395923139051913e+9339. Not sure that’s the right theory, though…

I would like to see them pull something out of Jessica’s ass. If they insist on it being a number, they can borrow one from Sesame Street. :smiley:

> SHOW TEA AND NO TEA TO DOOR

For a given pizza, there is:

1 way to pick no toppings.
17 ways to pick 1 topping. This may be chosen as a single, double, or triple topping = 3 * 17.
17 * 16 / 2 ways to pick 2 toppings. Both may be chosen exactly once, or either might be doubled = 17 * 16 * 3 / 2.
17 * 16 * 15 / 6 ways to pick 3 toppings = 3 * 17 * 16 * 15 / 6.
7 specialty pizzas

1 + 17 + 3 * 17 + 3 * 17 * 16 * 15 / 6 + 7 = 2507 different pizzas.

There is:
2507 ways to pick one distinct pizza
2507 * 2506 / 2 ways to pick two distinct pizzas. One might be chosen three times and the other one time, or both may be chosen twice apiece = 3 * 2507 * 2506 / 2
2507 * 2506 * 2505 / 6 ways to pick three distinct pizzas. One of them is picked twice = 3 * 2507 * 2506 * 2505 / 6
2507 * 2506 * 2505 * 2504 / 24 ways to pick four distinct pizzas

2507 + 3 * 2507 * 2506 / 2 + 3 * 2507 * 2506 * 2505 / 6 + 2507 * 2506 * 2505 * 2504 / 24 = 1,649,852,074,585 different ways to pick four pizzas in their offer. Jessica – or, to be fair, the writers – were off by a factor of about 261,000.

Wrong. Got a little too frisky with those 3s. It should be 17 * 16 * 15 / 6. Plugging that in make the number of types of pizzas 1147. That makes the final equation:

1147 + 3 * 1147 * 1146 / 2 + 3 * 1147 * 1146 * 1145 / 6 + 1147 * 1146 * 1145 * 1144 / 24 = 72,495,647,525. They’re only off by a factor of about 11,469.

I don’t want to say if Pizza Hut is correct or not. But I assume that Pizza Hut wants to assume certain combonations can not co-exist.

The entire concept of the product is to accomodate for four distinct people, and their tastes :slight_smile: .

I think PH wants us to assume that the exact same pizza (rather ‘pizza fourth’ as it where) will NOT occur. (Otherwise the customers would not need to order a 4forAll). I assume PH furthers this notion with the “Chance and Probability” random equations could support this, such as “No one is going to order Tripple Pepperoni, Tripple mushroom, Tripple Green Pepper, Tripple Pineapple” ETC.

I don’t know where the line would be drawn on this, perhaps PH assumed further each pizza is exactly 3 toppings, all different… But then again, Im not the one who came up with any figures for this situation.

Good point. I imagine a 4forAll costs more than pizza of the same relative size, right? They still let you do half and half too, so I bet they don’t count on two of the pizzas being the same either…

(17 toppings x 3 toppings per pizza) ^ 4 pizzas = 6,765,201.

That’s pretty close!

But that’s not how you get the answer, Smack Fu. Pasta did it right. The answer is 39,461,719,115. (Or 129,787,951,580 if you allow double toppings, as per ultrafilter.) RTFThread!

Yeah, but that (or a variation thereof) might be how the commercial writers got their answer, and then we could figure out what they did wrong.

I don’t understand this. Can you explain?

Can we agree on something here?

Going by rfgdxm
One pizza could have cheese only but not extra cheese. That means we cant include cheese-cheese-cheese or cheese-cheese. We can, however, have one topping as onion, two toppings as onion onion, and three toppings as onion onion onion. That makes the rest easier.

For zero toppings there is 1 possibility
For 2 toppings you can have 17 toppings for your first choice and 17 for your second. READ: non-factorial!
Same goes for 3 and 4.
So you you have 1+17^2+17^3+17^4=118587876498

Now add these as just one choice:

Cheese Lover’s
Meat Lover’s®
Pepperoni Lover’s®
Sausage Lover’s®
Veggie Lover’s®
Chicken Supreme
Supreme

118587876498+7=118587876505 for ONE pizza.

Now for four. You can have the same pizza four times. No one is stopping you from having four cheese pizzas. So… 11858787650^4= 1.9777034435935574715494385168881e+44 choices!

I am pretty sure that is right…

Not quite. This counts pepperoni-mushroom and mushroom-pepperoni as two different pizzas.

It means that, if you pick two toppings, there are three ways to make a pizza with them. For, say, sausage and mushroom, you can make:

  1. sausage and mushroom
  2. double sausage and mushroom
  3. sausage and double mushroom

I will try to explain better later today.

ZebraShaSha, just using Sumn = 0 … 4 will count some pizzas more than once. For 17^3, for example, it would count sausage and double mushroom 3 times instead of once, as: sausage, mushroom, mushroom; mushroom, sausage, mushroom; and mushroom, mushroom, sausage.

OK, I see what you’re doing. Those are all three-topping pizzas under my scheme.

Not only that, I screwed over my other numbers as well. It should of read 1+17+17^2+17^3. Not like it matters though, still wrong.

No Toppings=1 possibility
1 Topping=17 possibilities
2 Toppings=1716 possibilities
3 Toppings=17
16*15 possibilities

Plus 7 for those special pizzas.

That should be 4377. I am a moron and I apologize. I always jump into things too quickly, assuming that is even the right figure still.

Now you should have 4377^4 assuming that you can have more than one pizza the exact same way.

367,033,906,780,641?

Except that in your scheme, unless I missed something, you are not adding in the possibilities for people to order more than one pizza of the same type.

I am, but it’s in the second step.

The first thing to do is figure out the number of possible pizzas–call it p. Then the number of possible orders is p[sup]4[/sup]/4!.

I’m convinced that I have calculated p correctly, but I’m going to write some code to actually count all the different pizzas out there.

Well, I didn’t take into account that someone could order fewer than 4 pizzas, so I’ll be posting my own revision (with hopefully a more clear explanation) after work.