# Why is the number of orders of $6$ sandwiches using $3$ types of sandwiches a combinations with repetitions problem?

There are $3$ types of sandwiches, namely chicken (C), fish (F) and ham (H), available in a restaurant. A boy wishes to place an order of $6$ sandwiches. Assuming that there is no limit in the supply of sandwiches of each type, how many such orders can the boy place?

My Attempt:

I know that this is a stars and bars problem and the solution is $8 \choose 2$. But why can't it simply be $3^6$ where each of the $6$ sandwich places has $3$ choices to fill as repetition is allowed. I know I am missing something trivial.

• Because order is not relevant. $5$ chicken followed by one ham is the same as one ham followed by $5$ chicken.
– lulu
Apr 27, 2018 at 13:15
• So we use this just because order is not relevant, right?? Apr 27, 2018 at 13:18
• yes. $3^6$ would be the correct answer if we were keeping track of the order of the sandwiches.
– lulu
Apr 27, 2018 at 13:22
• Okay thank-you. Apr 27, 2018 at 13:31
• In this case, we need to ask whether order matters. Does ordering chicken, fish, then ham in that order produce a different outcome than ordering fish, chicken, then ham in that order. Since it does not, we are looking at a combinations with repetition problem. Apr 27, 2018 at 14:52

Let us take Chicken and Ham sandwich and total order of 3. You are wondering why it should not be $2^3$ and why it is ${(3+2-1)\choose (2-1)}$

The $2^3=8$ choices that you mention are

• AAA - 3 Chicken sandwich

• AAB - 2 Chicken and 1 Ham

• ABA

• BAA

• ABB - 2 Ham and 1 Chicken

• BAB

• BBA

• BBB - 3 Ham

The total is $2^3$ but the chocies are merely ${(3+2-1)\choose (2-1)}$ = ${4\choose1}=4$

• You are welcome!! Apr 27, 2018 at 13:33