Solution to How many strings of length 4 on the alphabet {A,B,C,D} do not contain AB as … - Sikademy
Author Image

Archangel Macsika

How many strings of length 4 on the alphabet {A,B,C,D} do not contain AB as a substring

The Answer to the Question
is below this banner.

Can't find a solution anywhere?

NEED A FAST ANSWER TO ANY QUESTION OR ASSIGNMENT?

Get the Answers Now!

You will get a detailed answer to your question or assignment in the shortest time possible.

Here's the Solution to this Question

N=4\cdot 4\cdot 4\cdot 4=256 - number of all strings above {A,B,C,D}

Let we find number of strings with substring "AB"

N1=card({AB**}\{ABAB})=4\cdot 4 -1=15;

N2=card({*AB*})=4\cdot 4 =16

N3=card({**AB}\{ABAB})=16-1=15;

N4=card({ABAB})=1;

N-=N1+N2+N3+N4=47;

N+=N-(N-)=256-47=209- number of words without "AB"

Answer=209

Related Answers

Was this answer helpful?

Join our Community to stay in the know

Get updates for similar and other helpful Answers

Question ID: mtid-5-stid-8-sqid-1425-qpid-1163