1,278 views

1 Answer

5 votes
5 votes

Containing $101$ as a substring.

 

Not containing $101$ as substring.

 

To find the regular expression for above DFA, we remove trap state.

Now using Arden's theorems:

$\begin{align*} &A = \epsilon + A0 + C0 \quad \dots (1) \\ &B = A1 + B1 \quad \dots (2)\\ &C = B0 \quad \dots (3)\\ \\ \hline \\ &\Rightarrow \text{substitute C in (1)} \\ &A = \epsilon + A0 + B00 \quad \dots (4) \\ &(2) \Rightarrow B = A11^{*} \\ &\text{Now , substitute this B value in (4)} \\ &A = \epsilon + A0 + A11^{*}00 \quad \dots (4) \\ &\Rightarrow A = \epsilon + A\left ( 0 + 11^{*}00 \right ) \\ &\Rightarrow A = \left ( 0 + 11^{*}00 \right )^{*} \\ &\Rightarrow B = \left ( 0 + 11^{*}00 \right )^{*}11^{*} \qquad \text{using (2)} \\ &\Rightarrow C = \left ( 0 + 11^{*}00 \right )^{*}11^{*}0 \qquad \text{using (3)} \\ &\Rightarrow \text{Regular Exp} = A + B + C = \left ( 0 + 11^{*}00 \right )^{*}\left ( \epsilon + 11^{*} + 11^{*}0 \right ) \\ \end{align*}$

Related questions

0 votes
0 votes
2 answers
1
0 votes
0 votes
2 answers
2
0 votes
0 votes
2 answers
3
0 votes
0 votes
1 answer
4
Ayush Upadhyaya asked Mar 9, 2017
236 views
Give regular expression for all strings that contain no run of a's greater than two.The input alphabet set consists of {a,b,c)