1. ## A combinations problem

Hello everyone! I’m only beginning to study statistics. The problem is easy, yet I need help

A shelf contains 6 separate compartments. In how many ways can 4 indistinguishable marbles be placed in the compartments?

I solved this problem the following way:

1) All 4 marbles in 1 compartment = 6 ways
2) 3 marbles in one compartment and 1 marble in another compartment = 6*5 = 30 ways
3) 2 marbles in one compartment and 2 in another compartment = 6 choose 2 = 15 ways
4) 2 marbles in one compartment, 1 marble in another compartment, and 1 marbles yet in another compartment = 6*((5*4)/2) = 60 ways
5) 4 marbles in four different compartments = 6 choose 4 = 15 ways

So, 6+30+60+15+15=126 ways

The textbook, however, gives the following formula (n compartments and r marbles):

(n + r – 1) CHOOSE (n – 1)

Thus, 9 CHOOSE 5 = 126

Please, help me understand where the formula comes from.

2. Originally Posted by Olga
Hello everyone! I’m only beginning to study statistics. The problem is easy, yet I need help

A shelf contains 6 separate compartments. In how many ways can 4 indistinguishable marbles be placed in the compartments?

.....

The textbook, however, gives the following formula (n compartments and r marbles):

(n + r – 1) CHOOSE (n – 1)

Thus, 9 CHOOSE 5 = 126

Please, help me understand where the formula comes from.
I think like this:

To divide a group of r items into n subgroups you only need n-1 walls.
Let | be a wall and o an item, then with r = 4 and n = 6 it can look like

|o||oo||o or maybe ooo||||o|

Number of distinct ways to arrange r items and n-1 walls is

(r + n - 1)!/(r!(n-1)!) = (r + n - 1) CHOOSE (r) = (r + n - 1) CHOOSE (n - 1)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts