retagged by
718 views
1 votes
1 votes

retagged by

3 Answers

2 votes
2 votes

This DFA will accept all strings of length n (n ≥ 3) which has minimum of 2 consecutive 1's in

last  (n-1) positions

no.of possibilities in first position=2

no.of acceptable strings with 6 positions =     (total possible strings – no.of rejected strings)

total possible strings =2^6 =64

no.of rejected strings

string which contain only 0’s=1

strings which contain only one 1 = 6         (_0_0_0_0_0_)→ we can place 1 anywhere.==> 6c1

strings which contain two 1’s but not consecutively = 10      (_0_0_0_0_)→ 5c2

strings which contain three 1’s but not consecutively= 4      (_0_0_0_)→ 4c3

now total no.of rejected strings = 1+6+10+4=21

no.of accepted strings of length 7 = 2*(64-21) = 2*43 =86

 

so the answer is 86 strings

edited by
0 votes
0 votes
State $1$ can accept $1$ character in $2$ ways.

State $2$ can accept $1,2,3,4$ or $5$ characters in one way since allowed length is $7$.

State $3$ can accept $1,3$ or $5$ characters in one way.

State $4$ can accept $0,1,2,3$ or $4$ characters in $2^n$ ways where $n$ is the number of characters accepted.

Counting the possible $7$ character strings:

$0/1 \rightarrow 1 \rightarrow 1 \rightarrow 16$ ways

$0/1 \rightarrow 1 \rightarrow 011 \rightarrow 4$ ways

$0/1 \rightarrow 1 \rightarrow 01011 \rightarrow 1$ way

$0/1 \rightarrow 01 \rightarrow 1 \rightarrow 8$ ways

$0/1 \rightarrow 01 \rightarrow 011 \rightarrow 2$ ways

$0/1 \rightarrow 001 \rightarrow 1 \rightarrow 4$ ways

$0/1 \rightarrow 001 \rightarrow 011 \rightarrow 1$ way

$0/1 \rightarrow 0001 \rightarrow 1 \rightarrow 2$ ways

$0/1 \rightarrow 00001 \rightarrow 1 \rightarrow 1$ way

Total : $2 \times 39 = 78$ strings.
edited by

Related questions

410
views
1 answers
1 votes
anupamsworld asked Jun 12, 2022
410 views
Consider the following statements(I) The two main function of data link layer are data link control and media access control(II) DLL guarantees reliable delivery of packets, ... [C] Both are true [D] NonePlease explain your choice.
410
views
1 answers
1 votes
Souvik33 asked Dec 4, 2022
410 views
Consider the following statementS: $\left \{ a^{n}b^{n+k}|n\geq 0,k\geq 1 \right \} \cup \left \{a^{n+k}b^{n}|n\geq 0,k\geq 3 \right \}$ is DCFLThe above statement is:TRUEFALSE
466
views
0 answers
0 votes
Pranavpurkar asked Nov 16, 2022
466 views
Consider the following language:$L$ $=$ { $<M>$ $|$ $L(M)$ has atleast $10$ strings }Which of the following is true about L?A)L is decidable ... recursive D)None of these