document.write( "Question 339861: Five white and four black balls are arranged in a row. What is the probability that the end balls are of different colors? \n" ); document.write( "
Algebra.Com's Answer #243530 by jrfrunner(365)\"\" \"About 
You can put this solution on YOUR website!
there are 9 total balls, so there are 9! total ways to arrange the balls
\n" ); document.write( "--
\n" ); document.write( "of these, we are interested in when the end balls are of different colors, so tha leaves 7 balls in the middle (4 white and 3 black)which can be arranged in 7!
\n" ); document.write( "--
\n" ); document.write( "the arrangements will be White*7!*Black or Black*7!*White
\n" ); document.write( "For White*7!*Black: that first white ball can be chosen in 5 different ways, and the last black ball can be chosen in 4 different ways,
\n" ); document.write( "so all together there are 5*7!*4=20*7! ways to do this
\n" ); document.write( "For Black*7!*White: that first black ball can be chosen in 4 different ways,
\n" ); document.write( "and the last white ball can be chose in 5 different ways
\n" ); document.write( "so all together there are 4*7!*5=20*7! ways to do this.
\n" ); document.write( "--
\n" ); document.write( "So the probability is defined as #ways(White*7!*Black or Black*7!*White)/9!
\n" ); document.write( "=(20*7!+20*7!)/9!=40*7!/9!=40/(9*8)=5/9
\n" ); document.write( "
\n" );