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.

  • 3
    $\begingroup$ Because order is not relevant. $5$ chicken followed by one ham is the same as one ham followed by $5$ chicken. $\endgroup$ – lulu Apr 27 '18 at 13:15
  • $\begingroup$ So we use this just because order is not relevant, right?? $\endgroup$ – harshit54 Apr 27 '18 at 13:18
  • 1
    $\begingroup$ yes. $3^6$ would be the correct answer if we were keeping track of the order of the sandwiches. $\endgroup$ – lulu Apr 27 '18 at 13:22
  • $\begingroup$ Okay thank-you. $\endgroup$ – harshit54 Apr 27 '18 at 13:31
  • $\begingroup$ 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. $\endgroup$ – N. F. Taussig Apr 27 '18 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$

  • $\begingroup$ You are welcome!! $\endgroup$ – Satish Ramanathan Apr 27 '18 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.