document.write( "Question 1204839: There is a group of five children, where two of the children are twins. In how
\n" ); document.write( "many ways can I distribute 18 identical pieces of candy to the children, if the
\n" ); document.write( "twins must get 7 pieces of candy?
\n" ); document.write( "

Algebra.Com's Answer #841357 by Edwin McCravy(20056)\"\" \"About 
You can put this solution on YOUR website!
There is a group of five children, where two of the children are twins. In how
\n" ); document.write( "many ways can I distribute 18 identical pieces of candy to the children, if the
\n" ); document.write( "twins must get 7 pieces of candy?
\n" ); document.write( "
\r\n" );
document.write( "You didn't say \"the twins must get 7 pieces of candy EACH\" so I'll assume you\r\n" );
document.write( "mean they get 7 pieces of candy together.\r\n" );
document.write( "\r\n" );
document.write( "We put 7 pieces aside to give the twins.  So we have 11 pieces to distribute to\r\n" );
document.write( "the 3 non-twin children. \r\n" );
document.write( "\r\n" );
document.write( "Suppose non-twin child A gets \"a\" pieces of candy, non-twin child B gets \"b\"\r\n" );
document.write( "pieces of candy, and non-twin child C gets \"c\" pieces of candy. I will assume\r\n" );
document.write( "everybody gets at least one piece of candy.\r\n" );
document.write( "\r\n" );
document.write( "Then a+b+c=11, where a,b,c are all positive integers.\r\n" );
document.write( "\r\n" );
document.write( "Let x=a-1, y=b-1, z=c-1, so a=x+1, b=y+1, c=z+1\r\n" );
document.write( "\r\n" );
document.write( "a+b+c=11 so\r\n" );
document.write( "(x+1)+(y+1)+(z+1)=11\r\n" );
document.write( "x+y+z=8\r\n" );
document.write( "\r\n" );
document.write( "So x, y, and z are, respectively, 1 fewer than the number of pieces of candy\r\n" );
document.write( "that A,B, and C respectively get.\r\n" );
document.write( "\r\n" );
document.write( "We make a row of 8 stars and 2 bars, for example ***|****|*.  The number of\r\n" );
document.write( "stars left of the leftmost bar, is x. The number of stars between the two bars\r\n" );
document.write( "is y, and the number of bars right of the rightmost bar is z\r\n" );
document.write( "\r\n" );
document.write( "For the example ***|****|*, the 3 stars left of the first bar means that x=3 and\r\n" );
document.write( "a=4. The 4 stars between the bars mean z=4, and b=5.  The 1 star on the end\r\n" );
document.write( "means z=1 and c=2.\r\n" );
document.write( "\r\n" );
document.write( "Take another example.  ****||**** x=4, y=0, z=4, so a=5, b=1, c=5.\r\n" );
document.write( "Take another example. ||******** x=0, y=0, z=8, so a=1, b=1, c=9.\r\n" );
document.write( "\r\n" );
document.write( "There are 8 stars and 2 bars.  The two bars are undistinguishable and the 8\r\n" );
document.write( "stars are also undistinguishable. So there are 10!/(2!8!) = 45 ways to\r\n" );
document.write( "distribute the 11 pieces of candy to the three non-twins.\r\n" );
document.write( "\r\n" );
document.write( "Now we distribute the 7 pieces of candy to the twins. We could get the number of\r\n" );
document.write( "ways to distribute with stars and only 1 bar.  But it's easier just to realize\r\n" );
document.write( "that the first twin can get 1 through 6 pieces and the second twin gets the\r\n" );
document.write( "rest.  So there are 6 ways to distribute the 7 pieces of candy to the twins.\r\n" );
document.write( "\r\n" );
document.write( "So the answer is (45)(6) = 270 ways to distribute the 18 pieces of candy to\r\n" );
document.write( "the 5 children.\r\n" );
document.write( "\r\n" );
document.write( "Answer: 270 \r\n" );
document.write( "   \r\n" );
document.write( "Edwin
\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "
\n" ); document.write( "
\n" );