WordGPT

Stars and bars: 10 candies for 3 children

Exercise ยท Level 3 (Medium)

In how many ways can 10 identical candies be given to 3 children (a child may get none)?

x1+x2+x3=10,ย xiโ‰ฅ0x_1+x_2+x_3=10,\ x_i\ge0

wordgptpro.com

Solution

  1. Draw the 10 candies as stars and add 2 bars to separate the three children, e.g. โ‹†โ‹†โ‹†โˆฃโ‹†โ‹†โ‹†โ‹†โˆฃโ‹†โ‹†โ‹†\star\star\star|\star\star\star\star|\star\star\star means 3, 4, 3. Every arrangement of 10 stars and 2 bars is one way.

  2. Choose the places for the 2 bars among 12 positions:

    (122)=66\binom{12}{2}=66
    (1)
  3. In general nn identical items for kk people: (n+kโˆ’1kโˆ’1)\binom{n+k-1}{k-1}.

Answer(122)=66\binom{12}{2}=66

wordgptpro.com

Need a hint?

Put the candies in a row and place 2 dividers between them.

There are C(12, 2) = 66 ways to share 10 identical candies among 3 children.

How to work it out

  1. Draw the 10 candies as stars and add 2 bars to separate the three children, e.g. โ‹†โ‹†โ‹†โˆฃโ‹†โ‹†โ‹†โ‹†โˆฃโ‹†โ‹†โ‹†\star\star\star|\star\star\star\star|\star\star\star means 3, 4, 3. Every arrangement of 10 stars and 2 bars is one way.

  2. Choose the places for the 2 bars among 12 positions:

    (122)=66\binom{12}{2}=66
    (1)
  3. In general nn identical items for kk people: (n+kโˆ’1kโˆ’1)\binom{n+k-1}{k-1}.

LaTeX source of the formulas on this page
\[ \binom{12}{2}=66 \]

Questions

What is the answer to: Stars and bars: 10 candies for 3 children?

There are C(12, 2) = 66 ways to share 10 identical candies among 3 children.

What is the key idea?

A distribution is an arrangement of stars and bars: choose where the bars go.

Is there a hint?

Put the candies in a row and place 2 dividers between them.

Related problems

More probability and puzzles

    Stars and bars: 10 candies for 3 children: answer and solution | WordGPT