edited by
12,382 views
12 12 votes

The number of bit strings of length $8$ that will either start with $1$ or end with $00$ is?

  1. $32$              
  2. $128$             
  3. $160$          
  4. $192$

2 Answers

Best answer
18 18 votes
string starting with 1 - 8 places 1 place fixed .7 places have 2 choices . 2^7=128

ending with 00- 8 places 2 fixed. =2^6=64

common strings will be there that have been counted twice are . starting with 1 and ending with 00. such number of string will be .

fix 3 position rest have 2 choices=32

total = 128+64-32=160
selected by
0 0 votes

Here we can apply Mutual Inclusion-Exclusion, (no need to worry if u don't know)

For sets we know n(a U b)= n(a) + n(b) - n(a ∩ b)

in this answer    # = Total number of .

 

# bit strings of length 8 that will start with  1 (let it be n(a)) = 2^7 = 128 (because we have 1 choice for 1st position and we have 2 choices each for other 7 position).

# bit strings of length 8 that will end with  00 ( let it be n(b))= 2^6 = 64 (similar reason as above)

Now in both the above bit strings we have common bit strings when string start with 1 and end with 00, and we have to count this only once to cover all cases, so

# bit strings of length 8 that will start and end with  00 (  n(a ∩ b)) = 2^5 = 32 .

#bit strings of length 8 that will start  with 1 or end with 00= n(a U b)= n(a) + n(b) - n(a ∩ b) = 128+ 64 - 32 = 160

so, 160 is the answer 

Answer:
Position:
Show:

Related questions

52 52 votes
6 answers 6 answers
13.4k
13.4k views
Misbah Ghaya asked Nov 29, 2016
13,390 views
How many substrings (of all lengths inclusive) can be formed from a character string of length $n$? Assume all characters to be distinct, prove your answer.
43 43 votes
6 answers 6 answers
16.6k
16.6k views
Kathleen asked Sep 23, 2014
16,595 views
The number of binary strings of $n$ zeros and $k$ ones in which no two ones are adjacent is$^{n-1}C_k$$^nC_k$$^nC_{k+1}$None of the above
51 51 votes
8 answers 8 answers
17.1k
17.1k views
Kathleen asked Sep 14, 2014
17,095 views
A multiset is an unordered collection of elements where elements may repeat any number of times. The size of a multiset is the number of elements in it, counting repetiti...
7 7 votes
2 answers 2 answers
5.7k
5.7k views
go_editor asked Jul 1, 2016
5,725 views
Let $\text{A}$ be a finite set having $x$ elements and let $\text{B}$ be a finite set having $y$ elements. What is the number of distinct functions mapping $\text{B}$ int...