document.write( "Question 1068904: How many 9-bit strings are there which:
\n" ); document.write( " a) Start with the sub-string 101?
\n" ); document.write( " b) Have weight 5 and start with 101?
\n" ); document.write( " c) Have weight 5 or start with 101?
\n" ); document.write( "
\n" ); document.write( "

Algebra.Com's Answer #684213 by Edwin McCravy(20056)\"\" \"About 
You can put this solution on YOUR website!
How many 9-bit strings are there which:
\n" ); document.write( "a) Start with the sub-string 101?
There are 2 ways to choose each of of the 6 remaining bits,\r\n" );
document.write( "so the answer to a) is 26 = 64
b) Have weight 5 and start with 101?
Since 101 has weight 2, the last 6 bits must contain 3 1's\r\n" );
document.write( "There are \"6 places choose 3\" or 6C3 = 20 \r\n" );
document.write( "\r\n" );
document.write( "c) Have weight 5 or start with 101?
Case 1:  Have weight 5.\r\n" );
document.write( "\r\n" );
document.write( "From the 9 places to have digits, there are 5 places to \r\n" );
document.write( "have 1's.\r\n" );
document.write( "\r\n" );
document.write( "That's \"9 choose 5\" = 9C5 = 126\r\n" );
document.write( "\r\n" );
document.write( "Case 2:  Start with 101\r\n" );
document.write( "\r\n" );
document.write( "That's problem a), or 64 \r\n" );
document.write( "\r\n" );
document.write( "Case 3.  Have weight 5 and start with 101.\r\n" );
document.write( "\r\n" );
document.write( "That's problem b), or 20\r\n" );
document.write( "\r\n" );
document.write( "Let A = the set of 9-bit strings with weight 5.\r\n" );
document.write( "Let B = the set of 9-bit strings that start with 101.\r\n" );
document.write( "\r\n" );
document.write( "N(A or B) = N(A)+N(B)-N(A and B)\r\n" );
document.write( "\r\n" );
document.write( "N(A or B) = 126+64-20 = 170 \r\n" );
document.write( "\r\n" );
document.write( "Edwin
\n" ); document.write( "
\n" );