\n" );
document.write( "a) 4*3*2 * 3! = 144 ways\r
\n" );
document.write( "\n" );
document.write( "b) 4*3*2 = 24 ways\r
\n" );
document.write( "\n" );
document.write( "c) 3*2*2*3 = 36 ways\r
\n" );
document.write( "\n" );
document.write( "d) BBW: 3*2*2*3 = 36 PLUS BBR: 4*3*2*3 = 72, so the total here
\n" );
document.write( "is 36 + 72 = 108 ways\r
\n" );
document.write( "\n" );
document.write( "I will give you this table, you can complete the rest:\r
\n" );
document.write( "\n" );
document.write( " Draw Number of ways
\n" );
document.write( " ----- --------------
\n" );
document.write( " RWB (and the 5 other arrangments): 144
\n" );
document.write( " BBB 6
\n" );
document.write( " WWW 0
\n" );
document.write( " RRR 24
\n" );
document.write( " RRB (and RBR, BRR) 108
\n" );
document.write( " RRW (RWR, WRR) 72
\n" );
document.write( " RWW (WRW, RWW) 24
\n" );
document.write( " BBW (BWB, WBB) 36
\n" );
document.write( " RBB (BRB, BBR) 72
\n" );
document.write( " BWW (WBW, WWB) 18\r
\n" );
document.write( "\n" );
document.write( " TOTAL 504
\n" );
document.write( "
\n" );
document.write( "Example: RRW is computed as follows
\n" );
document.write( " 4 reds possible on first draw
\n" );
document.write( " * 3 R on 2nd draw
\n" );
document.write( " * 2 W on 3rd draw
\n" );
document.write( " * 3 (b/c you can draw RRW or RWR or WRR and end up 2 R + 1 W)
\n" );
document.write( " =======
\n" );
document.write( " 72 \r
\n" );
document.write( "\n" );
document.write( "If you need probabilities, divide each number of ways by 504 (=9*8*7, this comes from the total number of balls in the box at first draw, 2nd draw, 3rd draw).\r
\n" );
document.write( "\n" );
document.write( "
\n" );
document.write( "