(New page: = Distinguished/Indistinguished Problem = This page is mainly discussing an interesting permutation problem in the back of the book. We have done such problems in our homework, but when ...)
 
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
= Distinguished/Indistinguished Problem  =
 
= Distinguished/Indistinguished Problem  =
  
This page is mainly discussing an interesting permutation problem in the back of the book. We have done such problems in our homework, but when I did those problems I always feel confused and may miss out some situations. So that's the reason why I want to write this summary.<br>I will discuss this problem by giving out some examples and hope this will clarify your confusion.<br>Problem Type A: Distinguished Boxes vs Indistinguished Items<br> Example1: If we have 9 distinguished boxes and 6 indistinguished items, how many ways can we arrange the items into the boxes.<br> This kind of problem is similar to the “fruit basket problem” we discussed in lecture. Treat the indistinguished items as stars(*) and we use bars to separate items into boxes.<br> So we need 6 stars and 8 bars for this example and therefore,
+
This page is mainly discussing an interesting permutation problem in the back of the book. We have done such problems in our homework, but when I did those problems I always feel&nbsp;confused and overwhelmed. So that's the reason why I want to write this summary.  
  
{| cellspacing="1" cellpadding="1" border="1" style="width: 514px; height: 40px;"
+
I will discuss this problem in detail by giving out some examples and hope this will clarify your confusion as well.
|-
+
| *<br>
+
| *
+
| *<br>
+
| *<br>
+
| *<br>
+
| *<br>
+
| *<br>
+
| *<br>
+
| &#124;<br>
+
| &#124;<br>
+
| &#124;<br>
+
| &#124;<br>
+
| &#124;<br>
+
| &#124;<br>
+
|}
+
  
<br> #ways = C((6+8), 8) = C(14, 8) = 3003.  
+
Let's first begin with the easiest one.  
  
 
<br>  
 
<br>  
  
<br>Problem Type D: Distinguished Boxes vs Distinguished Items<br> Example4: If we have 3 distinguished boxes and 5 distinguished items, how many ways can we arrange the items into the boxes.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Step1: You need to count how many items in each box: e.g. (2 in box1, 2 in box2, 1 in box3) and find all the probability of all kinds of item arrangement.<br> We can simplify (2 in box1, 2 in box2, 1 in box3) into (2,2,1).<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Step2: for each fixed combination from step1, calculate the total ways of different arrangement of this kind of fixed combination:<br> #ways(2,2,1) = C(5,2)*C(3,2) = 15 <br> Step3: Iterate step 1 and 2 for all combinations.<br> Here we can use a trick to make things a bit easier. We know that #ways from step2 are the same for (2, 1, 2) and (1, 2, 2).<br> <br> So box arrangement in the form of (0, 1 4), we have P(3, 3) = 3! = 6.<br> #ways(0,1,4) = C(5,0)*C(5,1)*C(4,4) = 5
+
== Problem Type A: Distinguished Boxes vs Indistinguished Items ==
  
 +
'''<u>Example1</u>''': If we have 3 distinguished boxes and 5 indistinguished items, how many ways can we distribute the items into the boxes?
 +
 +
This kind of problem is similar to the “fruit basket problem” we discussed in lecture. Treat the indistinguished items as stars(*) and we use bars to separate items into boxes.
 +
 +
So we need 5 stars and 2 bars for this example and therefore,
 +
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #ways = C((5+2), 2) = C(7, 2) = 21.
 +
 +
<br>
 +
 +
== Problem Type B: Indistinguished Boxes vs Indistinguished Items  ==
 +
 +
'''<u>Example2</u>''': If we have 3 indistinguished boxes and 5 indistinguished items, how many ways can we distribute the items into the boxes?
 +
 +
This problem seems to be easy but actually, at least for me, it's easy to make mistakes and leave out some possible combinations.
 +
 +
So for this kind of problem, you need to sit down&nbsp;and calm down and try to list every possible combinations yourself.
 +
 +
To make our work easier, let's simplify (x items in box1, y items in box2, z items in box3) into (x,y,z).
 +
 +
OK, let's begin:
 +
 +
&nbsp; &nbsp; &nbsp; &nbsp; (0,0,5), (0,1,4), (0,2,3), (0,3,2), (1, 1, 3), (1, 2, 2), (1,3,1), (2,0,3) END&lt;strike&lt;/strike&gt;
 +
 +
&nbsp; &nbsp; &nbsp; &nbsp; #ways = 5.
 +
 +
== <br>Problem Type C: Indistinguished Boxes vs Distinguished Items  ==
 +
 +
'''<u>Example3</u>''': If we have 3 distinguished boxes and 5 distinguished items, how many ways can we arrange the items into the boxes?<br>&nbsp; &nbsp; &nbsp; &nbsp; ''&nbsp; '''Step1''':'' You need to find out all possible box combinations. {(0,0,5), (0,5,0), (5,0,0)}, {(0,1,4), ..., (4,1,0)}, {(0,2,3), ...(3,2,0)}, {(1, 1, 3), (1,3,1), (3,1,1)},{(1, 2, 2),(2, 1, 2), (2, 2, 1)}
 +
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; We can call {...} a set.
 +
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '''''Step2'''''<i>:</i> For each box combination set from step1, calculate the total ways of different item arrangements for one particular elements in the set:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #ways(x,y,z) = C(5,x)*C(5-x,y).
 +
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; We notice that for each elements in the set, the values for #way are the same, therefore,
 +
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; total ways of arrangement for a set = #ways*(# of elements of the set).
 +
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '''''Step3:''''' Iterate step 2 for all sets and then add everything up.
 +
 +
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Final Calculation:
 +
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for set1: #way(0,0,5) = C(5,0)*C(5-0,0) = 1; total ways for set1 = #way(0,0,5)*C(3,1)(choose a box for the 5 items) = 1*3 = 3;
 +
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for set2: #way(0,1,4) = C(5,0)*C(5-0,1) = 5; total ways for set1 = #way(0,1,4)*(C(3,1)*C(2,1))(choose a box for the 0 item and then one box fore the 1 item) = 5*6 = 30;
 +
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for set3: #way(0,2,3) = C(5,0)*C(5-0,2) = 10; total ways for set1 = #way(0,2,3)*(C(3,1)*C(2,1))(choose a box for the 0 item and then one box fore the 2 item) = 10*6 = 60;
 +
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for set4: #way(1,1,3) = C(5,1)*C(5-1,1) = 20; total ways for set1 = #way(1,1,3)*C(3,1)(choose a box for the 3 items) = 20*3 = 60;
 +
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for set5: #way(1,2,2) = C(5,1)*C(5-1,2) = 30; total ways for set1 = #way(1,2,2)*C(3,1)(choose a box for the 3 items) = 30*3 = 90;
 +
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Total = 3+30+60+60+90 = 243.
 +
 +
<br>
 +
 +
== Problem Type D: Indistinguished Boxes vs Distinguished Items  ==
 +
 +
'''<u>Example4</u>''': If we have 3 distinguished boxes and 5 distinguished items, how many ways can we arrange the items into the boxes?
 +
 +
The foregoing problem solutions have made a strong foundation for solving this problem.
 +
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; First we can go to problem Type B, and we will get the number of different box arrangements, which is 5.
 +
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Then we can calculate the item arrangements for each box arrangement listed in B.
 +
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(0,0,5): There is only one way of this combination;
 +
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(0,1,4): #ways = C(5,1)*C(4,4) = 5;
 +
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(0,2,3): #ways = C(5,2)*C(3,3) = 10;
 +
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(1,1,3): #ways = C(5,1)*C(4,1) = 20;
 +
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WAIT!! If we compute in this way, we are treated the two boxes containing the same number of items differently,
 +
 +
so to get the correct number, we need to devide 20 by 2!, and then we get #ways = 20/2 = 10;
 +
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(1,2,2): #ways = C(5,1)*C(5,2)/2! = 15;
 +
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Total = 1+5+10+20+10+15 = 41.
 +
 +
Pianpian Cao<br>
 
<br>
 
<br>
 +
-------
 +
[[Category:MA375Spring2012Walther]]
 +
[[Category:bonus point project]]

Latest revision as of 09:41, 6 May 2012

Distinguished/Indistinguished Problem

This page is mainly discussing an interesting permutation problem in the back of the book. We have done such problems in our homework, but when I did those problems I always feel confused and overwhelmed. So that's the reason why I want to write this summary.

I will discuss this problem in detail by giving out some examples and hope this will clarify your confusion as well.

Let's first begin with the easiest one.


Problem Type A: Distinguished Boxes vs Indistinguished Items

Example1: If we have 3 distinguished boxes and 5 indistinguished items, how many ways can we distribute the items into the boxes?

This kind of problem is similar to the “fruit basket problem” we discussed in lecture. Treat the indistinguished items as stars(*) and we use bars to separate items into boxes.

So we need 5 stars and 2 bars for this example and therefore,

          #ways = C((5+2), 2) = C(7, 2) = 21.


Problem Type B: Indistinguished Boxes vs Indistinguished Items

Example2: If we have 3 indistinguished boxes and 5 indistinguished items, how many ways can we distribute the items into the boxes?

This problem seems to be easy but actually, at least for me, it's easy to make mistakes and leave out some possible combinations.

So for this kind of problem, you need to sit down and calm down and try to list every possible combinations yourself.

To make our work easier, let's simplify (x items in box1, y items in box2, z items in box3) into (x,y,z).

OK, let's begin:

        (0,0,5), (0,1,4), (0,2,3), (0,3,2), (1, 1, 3), (1, 2, 2), (1,3,1), (2,0,3) END<strike</strike>

        #ways = 5.


Problem Type C: Indistinguished Boxes vs Distinguished Items

Example3: If we have 3 distinguished boxes and 5 distinguished items, how many ways can we arrange the items into the boxes?
          Step1: You need to find out all possible box combinations. {(0,0,5), (0,5,0), (5,0,0)}, {(0,1,4), ..., (4,1,0)}, {(0,2,3), ...(3,2,0)}, {(1, 1, 3), (1,3,1), (3,1,1)},{(1, 2, 2),(2, 1, 2), (2, 2, 1)}

          We can call {...} a set.

          Step2: For each box combination set from step1, calculate the total ways of different item arrangements for one particular elements in the set:
                  #ways(x,y,z) = C(5,x)*C(5-x,y).

                  We notice that for each elements in the set, the values for #way are the same, therefore,

                  total ways of arrangement for a set = #ways*(# of elements of the set).

          Step3: Iterate step 2 for all sets and then add everything up.


          Final Calculation:

            for set1: #way(0,0,5) = C(5,0)*C(5-0,0) = 1; total ways for set1 = #way(0,0,5)*C(3,1)(choose a box for the 5 items) = 1*3 = 3;

            for set2: #way(0,1,4) = C(5,0)*C(5-0,1) = 5; total ways for set1 = #way(0,1,4)*(C(3,1)*C(2,1))(choose a box for the 0 item and then one box fore the 1 item) = 5*6 = 30;

            for set3: #way(0,2,3) = C(5,0)*C(5-0,2) = 10; total ways for set1 = #way(0,2,3)*(C(3,1)*C(2,1))(choose a box for the 0 item and then one box fore the 2 item) = 10*6 = 60;

            for set4: #way(1,1,3) = C(5,1)*C(5-1,1) = 20; total ways for set1 = #way(1,1,3)*C(3,1)(choose a box for the 3 items) = 20*3 = 60;

            for set5: #way(1,2,2) = C(5,1)*C(5-1,2) = 30; total ways for set1 = #way(1,2,2)*C(3,1)(choose a box for the 3 items) = 30*3 = 90;

            Total = 3+30+60+60+90 = 243.


Problem Type D: Indistinguished Boxes vs Distinguished Items

Example4: If we have 3 distinguished boxes and 5 distinguished items, how many ways can we arrange the items into the boxes?

The foregoing problem solutions have made a strong foundation for solving this problem.

          First we can go to problem Type B, and we will get the number of different box arrangements, which is 5.

          Then we can calculate the item arrangements for each box arrangement listed in B.

                    for(0,0,5): There is only one way of this combination;

                    for(0,1,4): #ways = C(5,1)*C(4,4) = 5;

                    for(0,2,3): #ways = C(5,2)*C(3,3) = 10;

                    for(1,1,3): #ways = C(5,1)*C(4,1) = 20;

                    WAIT!! If we compute in this way, we are treated the two boxes containing the same number of items differently,

so to get the correct number, we need to devide 20 by 2!, and then we get #ways = 20/2 = 10;

                    for(1,2,2): #ways = C(5,1)*C(5,2)/2! = 15;

                    Total = 1+5+10+20+10+15 = 41.

Pianpian Cao


Alumni Liaison

Correspondence Chess Grandmaster and Purdue Alumni

Prof. Dan Fleetwood