in Combinatory closed by
604 views
1 vote
1 vote

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?

in Combinatory closed by
604 views

1 comment

@Balaji Jegan

why for intersection $2\times 3!??$

I am getting only 8 strings here.

0
0

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true