The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
0 votes

What is the number of ways to distribute ten identical sweets to three children?

  1. If each children gets at least one sweet.
  2. If 1 condition is omitted.

P.S. I do not know the answer.

in Combinatory by Active (2.2k points)
edited by | 372 views
36?? if each one receives at least one sweet.
@Red_devil Please have a look at updated question.

4 Answers

+2 votes
Best answer

This is a classic bars and bars problem. Refer this link to understand this concept

In context to this problem, this is how it is solved using stars and bars.

There are 10 identical sweets.

_  _  _  _  _  _  _  _  _  _

(In analogy to stars and bars, these are the stars)

Now, these 10 sweets are distributed among 3 children say A,B and C

Let's put 2 bars in between those places (Thereby dividing the 10 sweets into 3 sections. Each section determines how many sweets a child gets). Such that, to the left of bar 1 are sweets of A. Between the bars is sweets of B. Sweets to the right on bar 2 are C's.

Consider this one possible arrangement

_  _  _ | _  _  _  _ | _  _  _  

Thus A gets 3 here, B gets 4 and C gets 3.

Now, these 2 bars can be anywhere (for 2nd case when you don't have any restriction).

So, give them slots too.

Now, we have 10+2 = 12 slots (In general n+k-1)

We have to choose 2 positions for bars (In general k-1)

Hence we have the formula 

{\tbinom  {n+k-1}{k-1}}={\tbinom  {n+k-1}{n}} 

(They are equal due to combination property)

Similarly, by restricting the positions of bars (for case 1) you can find the answer.

by Loyal (7.9k points)
selected by
0 votes
1) (3+7-1)C(7)

by Active (2.1k points)
Please tell me from where to read this concept.
read combinations with repetition ,read generating functions also.
0 votes
Counting Concept:

x1+x2+x3......+xn=k       ( k are all identical objects)

then number of non negative integral solution   =(k+n-1)C(n-1)


then number of  positive integral solution=(k-1)C(n-1)
by Active (3k points)
Please elaborate. I didn't get your solution.

 @Rohit Gupta 8


means three boys and we have to distribute 10 sweet among three then after distribution sum of all sweet of all boys must be 10.....

then according to bionomial solution we got 10-1+3C10....

and for first condition that every one must have least one ....then 10-3=7


0 votes
by (199 points)
This is absolutely a wrong answer. The catch here is word "Identical".

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,781 questions
53,593 answers
70,880 users