SOLUTION: How many 9-bit strings are there which: a) Start with the sub-string 101? b) Have weight 5 and start with 101? c) Have weight 5 or start with 101?

Algebra.Com
Question 1068904: How many 9-bit strings are there which:
a) Start with the sub-string 101?
b) Have weight 5 and start with 101?
c) Have weight 5 or start with 101?

Answer by Edwin McCravy(20056)   (Show Source): You can put this solution on YOUR website!
How many 9-bit strings are there which:
a) Start with the sub-string 101?
There are 2 ways to choose each of of the 6 remaining bits,
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
There are "6 places choose 3" or 6C3 = 20 

c) Have weight 5 or start with 101?
Case 1:  Have weight 5.

From the 9 places to have digits, there are 5 places to 
have 1's.

That's "9 choose 5" = 9C5 = 126

Case 2:  Start with 101

That's problem a), or 64 

Case 3.  Have weight 5 and start with 101.

That's problem b), or 20

Let A = the set of 9-bit strings with weight 5.
Let B = the set of 9-bit strings that start with 101.

N(A or B) = N(A)+N(B)-N(A and B)

N(A or B) = 126+64-20 = 170 

Edwin

RELATED QUESTIONS

How many 12-bit strings (that is, bit strings of length 12) are there which: have weight (answered by ikleyn)
How many 11-bit strings (that is, bit strings of length 11) are there which: a)Start... (answered by ikleyn)
How many 12-bit strings (that is, bit strings of length 12) are there which have weight 7 (answered by ikleyn)
A "bit" is a computer term for one of the digits 0 or 1. A "bit-string" of length 9 is a... (answered by swincher4391)
How many strings of five upper class English letters are there for each of the following... (answered by Edwin McCravy)
A bit is a 0 or a 1. A bit string of length 7 is a sequence of 7 digits, all of which are (answered by collegegirl11)
how many bit string of length eight either start with a 1 bit or end with the two bits... (answered by Alan3354,Jk22)
We want to build 13 letter “words” using only the first n = 9 letters of the... (answered by math_tutor2020)
For a string of n digits in a binary system (1s and 0s), what is the equation determining (answered by jim_thompson5910)