the cookie monster has a package of cookies with him consisting of 4 chocolate chip, 5 raisin and 6 almond nut, 7 other different assorted cookies. if he reaches into the package and eats all the cookies, eating one cookie at a time, how many different eating orders are there?

4+5+6+7 = 22

So, there would be

22!
-------
4!5!6!

= 542,052,820,108,800

but why is the denominator 4!5!6!

If all the cookies were different, you'd have just 22! different ways. But, if you just consider the 4 chocolate chip cookies, they are indistinguishable from each other. If they were different, then there would be 4! different ways to eat the chocolate chip cookies. But you don't care which of them you are eating, so you divide by the 4! ways which are the same.

Consider the case of 4 cookies, 3 of which are A, and also a single B. If you write down all the ways to eat them, numbering the A's, you get

A1 A2 A3 B
A1 A2 B A3
A1 A3 A2 B
A1 A3 B A2
A1 B A2 A3
A1 B A3 A2

A2 A1 A3 B
A2 A1 B A3
A2 A3 A1 B
A2 A3 B A1
A2 B A1 A3
A2 B A3 A1

A3 A1 A2 B
A3 A1 B A2
A3 A2 A1 B
A3 A2 B A1
A3 B A1 A2
A3 B A2 A1

B A1 A2 A3
B A1 A3 A2
B A2 A1 A3
B A2 A3 A1
B A3 A1 A2
B A3 A2 A1

As you can see, there are 4! = 24 ways to eat the cookies. But, if all the A1 A2 A3 are replaced by just A, we have only

A A A B
A A B A
A B A A
B A A A

which is 4!/3! = 4

Expand that to your problem, and you see why we divide by n! if there are n identical objects.

but wat happened to the 7 shouldnt it be 4!5!6!7!

There are 7 assorted other cookies. Thus, they are different, and can be eaten in distinguishable orders.

To determine the number of different eating orders, we can use the concept of permutations.

First, let's calculate the total number of cookies in the package: 4 chocolate chip + 5 raisin + 6 almond nut + 7 assorted = 22 cookies.

Now, we can calculate the total number of different eating orders by finding the permutation of 22 cookies taken all at once. Mathematically, it can be expressed as P(22, 22).

The formula for permutations is given by: P(n, r) = n! / (n - r)!

Here, n represents the total number of cookies (22) and r represents the number of cookies taken at a time (22).

Plugging in the values, we get: P(22, 22) = 22! / (22 - 22)! = 22!/0! = 22!

Since 0! is equal to 1, we can simplify it further:

22! = 22 x 21 x 20 x ... x 3 x 2 x 1

Therefore, the number of different eating orders is 22 x 21 x 20 x ... x 3 x 2 x 1, which equals:

22 x 21 x 20 x ... x 3 x 2 x 1 = 112,400,072,777,760

So, there are 112,400,072,777,760 different eating orders for the Cookie Monster.