closed by
632 views
1 votes
1 votes

How many bit strings of length 8 contain either three consecutive 0's or four consecutive 1's ?

MY APPROACH :-
Initially, for 3 consecutive 0's:
000_ _ _ _ _ =>2^5 = 32 WAYS
1000_ _ _ _ =>2^4 = 16 WAYS
_1000_ _ _ =>2^4 = 16 WAYS
_ _1000_ _ =>2^4 = 16 WAYS
_ _ _1000_ =>2^4 = 16 WAYS
_ _ _ _1000 =>2^4 = 16 WAYS
So totally 112 ways

Similarly, for 4 consecutive 1's
1111 _ _ _ _ =>2^4 = 16 WAYS
01111 _ _ _ =>2^3 = 8 WAYS
_01111_ _ =>2^3 = 8 WAYS
_ _01111_ =>2^3 = 8 WAYS
_ _ _01111 =>2^3 = 8 WAYS
So totally 64 ways

Intersections possible:-
0001111X =>2*3! = 12 WAYS

so, total ways = 112 + 48 - 12 = 148 ways

But answer is given as 147 ways.

Where am I wrong?

closed by

Related questions

7.0k
views
2 answers
3 votes
Akriti sood asked Nov 7, 2016
6,960 views
A palindrome is a string whose reversal is identical to the string. How many bit strings of length n are palindromes? 2⌈n⁄2⌉ 2(⌊ n/2⌋ ) 2⌈n⁄2⌉ -1 2(⌊ n/2⌋) -1
365
views
1 answers
0 votes
atulcse asked Jan 12, 2022
365 views
How many 5-digit even numbers have all digits distinct?
397
views
1 answers
0 votes
tonystark asked Oct 16, 2018
397 views
Given only a Generating Function in closed form can we find the sequence it represents? If so, how? Please explain with an example.If not, given a GF( ... information does it convey to us about a series if the series is not provided ?
3.2k
views
1 answers
0 votes
Sammohan Ganguly asked May 29, 2018
3,174 views
Among the integers $1,2,3,....,200$ if $101$ integers are chosen,then show that there are two among the chosen,such that one is divisible by the other.