# Probability of placing marbles in a compartment

1. Jun 7, 2014

### azizlwl

1. The problem statement, all variables and given/known data
1. (a) A shelf contains 6 separate compartments. In how many ways can 4 distinguishable marbles be placed in the compartments?(b) Work the problem if there are n compartments and r marbles. This type of problem arises in physics in connection with Bose-Einstein statistics.

Ans.
(a) 126 (b)n+r-1(C)n-1

3. The attempt at a solution

a) 1 1 1 1 - 6.5.4.3/4! = 15
1 1 2 -6.5.4/2! = 60
1 3 -6.5 = 30
2 2 -6.5/2! = 15
4 -6 = 6
------
= 126
-----

(b) ?. Hope somebody can help me.

2. Jun 7, 2014

### LCKurtz

I assume (b) means the binomial coefficient $\binom{n+r-1}{n-1}$. If $n=6$ and $r=4$ that formula gives the same answer as (a). Unfortunately, I think they are both incorrect.

With no explanation, I can't follow that. The reason I think the formulas are wrong is this. Let's take the case of $4$ slots and $2$ marbles, $A$ and $B$. So $n=4$ and $r=2$ and formula (b) gives $\binom 5 3 = 10$. But it's easy enough to list them:
Code (Text):

_ _ _ _
A B
B A
A   B
B   A
A      B
B      A
A B
B A
A    B
B    A
A B
B A

They might not align perfectly, but there are 12 of them, not 10.

I suggest thinking about how many ways there are to choose the drawers to use and how many ways to arrange the marbles once you have selected the drawers.

3. Jun 7, 2014

### Ray Vickson

Plus the cases in which a slot has both marbles (not forbidden by the problem statement as far as I can see). Then, if two marbles are in slot 1, is there a difference between AB and BA (also not stated)? In other words if one marble lies on top of the other, does the vertical arrangement matter? Or, if one marble is placed in the slot before the other, does the order make a difference? My guess would be no, but it would be nice if this were clarified; of course, it might be clear to the OP from context and surrounding material in the chapter where the problem occurs.

Added in edit: Presumably the OP's remarks about Bose-Einstein statistics allow multiple occupancy of each slot, because in quantum mechanics that is one of the allowed features of "bosons".

Last edited: Jun 7, 2014
4. Jun 7, 2014

### ehild

Check the problem text if those marbles were indistinguishable.

(The Bose-Einstein statistics refer to indistinguishable particles and multiple occupancy, as Ray pointed out)

ehild

5. Jun 7, 2014

### LCKurtz

Have to admit, I was wondering if the OP had told us everything...

6. Jun 8, 2014

### vela

Staff Emeritus
The problem statement should say the marbles are indistinguishable otherwise the answer to (a) should be at least $6^4$ and more if the order of the marbles in each slot matters.

7. Jun 8, 2014

### LCKurtz

Welcome to today's version of Guess what the problem is!. We have 4 indistinguishable marbles and 6 distinguishable compartments, meaning that you can distinguish them by the number of marbles in them. Consider the partitions of $4$:

$$1+1+1+1$$ (uses 4 compartments). There are $\binom 6 4 = 15$ ways to choose the compartments and 1 way to fill them.
$$2 + 1 + 1$$ (uses 3 compartments). There are $\binom 6 3 = 20$ ways to choose the compartments and 3 ways to fill them (since order counts on the compartments).
$$3+1$$ (uses 2 compartments). There are $\binom 6 2=15$ ways to choose the compartments and 2 ways to fill them.
$$2+2$$ (uses 2 compartments) There are $\binom 6 2=15$ ways to choose the compartments and 1 way to fill them.
$$4$$ (uses 1 compartment). There are $\binom 6 1 = 6$ ways to choose the compartments and 1 way to fill them.

$15\cdot 1 + 20\cdot 3 +15\cdot 2 +15\cdot 1 + 6\cdot 1 = 126$

Now that I look at it again, I think that is what the OP had in mind with his attempt at solution.

8. Jun 8, 2014

### haruspex

Yes, I'm sure that's the right statement. So the remaining matter is to help azizlwl find the general formula.
The way I think of this problem is to consider that there are r marbles and n-1 boundaries (i.e. the separators between the compartments). Imagine them all laid out in a straight line... some number or marbles (0 or more), then the first boundary, some more marbles then the next boundary, and so on.
Altogether, there are n-1+r 'things' in the line, of which n-1 are boundaries. Each choice of which n-1 are boundaries corresponds to a unique pattern of counts.

9. Jun 9, 2014

### azizlwl

Sorry so much about my posting. The question was copied from a book. Yes it should be indistinguishable marbles. Yes i got the answer correct for (a). My problem is how to derive the equation for the question (b).
And here the second question from the same book. I got the answer for (a) but no clue at all for question (b).

2. (a) A shelf contains 6 separate compactments. In how many ways can 12 indistinguishable marbles be placed in the compactments so that no compactment is empty. (b) Work problem if there are n compactments and r marbles where r>n. This type of problem arises in physics in connection with Fermi-Dirac statistics.

Ans.
(a) 462 (b) r-1 (C) n-1

(a)Since no compactment is empty, 6 nos of marbles are set aside to fill at least 1 marble for each compactment.

1 1 1 1 1 1 6!/6! = 1
1 1 1 1 2 6.5.4.3.2/4! = 30
1 1 1 3 6.5.4.3/3! = 60
1 1 4 6.5.4/2! = 60
1 5 6.5 = 30
2 1 1 2 6.5.4.3/2!2! = 90
2 1 3 6.5.4 = 120
2 4 6.5 = 30
2 2 2 6.5.4/3! = 20
3 3 6.5/2! = 15
6 6 = 6
------
r-1 (C) n-1= 11C5= 462
------

(b) ?

Last edited: Jun 9, 2014
10. Jun 9, 2014

### LCKurtz

So do you understand Haruspex's post #8 relative to your part (b)?

11. Jun 10, 2014

### LCKurtz

You should start a new thread with a new question.