edited by
13,421 views
43 votes
43 votes

Consider the following Finite State Automaton:

The language accepted by this automaton is given by the regular expression

  1. $b^*ab^*ab^*ab^*$

  2. $(a + b)^*$

  3. $b^*a(a+b)^*$

  4. $b^*ab^*ab^*$

edited by

6 Answers

Best answer
46 votes
46 votes

The answer is C.

You can see that both the states, $q_1$ and $q_2$ are final and are accepting $(a+b)^*$.

[Edit]

  1. $q_3$ is unreachable state, hence it can be removed.
  2. States $q_1$ and $q_2$ are indistinguishable, so, they can be merged. 
edited by
19 votes
19 votes

given DFA accept a but option A and D cant so A and D are eliminated 
option B accept epsilon but given DFA cant accept epsilon so B eliminated 
Hence Ans is C

q3 i unreachabl state wo we remove it now both q1 and q2 are equivalent so they can combine now we easily find regular expression for it : b*a(a+b)*

10 votes
10 votes
I will proceed with elimination of options
Option A: wrong because, string "ba" is accepted by given DFA. R.E given here can't generate it.
Option B: epsilon can't be accepted by given DFA. Given R.E generates epsilon
Option D: Same reason as option A. As "ba" can't be generated here too. The least it can generate are aa,baa,bbaa... so on..

Option C is correct. How???

After reaching q1, the DFA can accept any string generated by the alphabet{a,b}. b* is obvious from the given figure. to reach q1 we need atleast one a. Hence, b*a(a+b)^* is correct R.E
3 votes
3 votes

The answer is C

It is very clear from the diagram that q3 is unreachable. Hence it can be removed.

After its removal the diagram looks like

Based on Arden’s Theorem of converting DFA to Regular Expression,

It states that,

Let P and Q be two regular expressions over ∑.

If P does not contain a null string ∈, then,

R = Q + RP has a unique solution i.e. R = QP*

STEPS for constructing REGEX

  1. Form equation for each state and add  ∈ in the initial state equation
  2. Bring final state in the form of R = Q + RP

In case of having multiple final state,

1. Write Regex for each final state and add them all to arrive at the final solution

For the above problem,

q0 = q0.b + ∈  → 1 (Epsilon is added as part of step 1)

q1 = q0.a + q1.b + q2.a  -→ 2

q2 = q1.a + q2.b → 3

Now Compare equation 1 with R = Q+RP , (R = q0 ; Q= ∈ ; P = b)

thus q0 = ∈ . b*

q0 = b*  

Substituting q0 value in equation 1, we get

q1 = b*.a + q1.b + q2.a → 4

Since our problem contains two final state add the two state to arrive at the final solution

ADD equation 2 and 4

q1 + q2 = b*.a + q1.b + q2.a + q1.a + q2.b

q1 + q2  = b*.a + q1(a + b) + q2 (a+b)

q1 + q2  = b*.a + (q1 + q2)(a+b) → 5

Compare equation 5 with R = Q+RP , (R = q1 + q2 ; Q= a.b* ; P = (a+b)  )

Thus,

q1+q2 = b*.a(a+b)*   ///// R = Q + RP has a unique solution i.e. R = QP*

Answer:

Related questions

27 votes
27 votes
3 answers
1
go_editor asked Apr 23, 2016
8,474 views
Consider the following Finite State Automaton:The minimum state automaton equivalent to the above FSA has the following number of states:$1$$2$$3$$4$
32 votes
32 votes
4 answers
2
Kathleen asked Sep 21, 2014
11,563 views
A minimum state deterministic finite automaton accepting the language$L=\{w\mid w \in \{0, 1\}^*,$ number of $0$s and $1$s in $w$ are divisible by $3$ and $5$, respective...
39 votes
39 votes
2 answers
3
Kathleen asked Sep 21, 2014
14,171 views
Which of the following languages is regular?$\left\{ww^R \mid w \in \{0, 1\}^+\right\}$$\left\{ww^Rx \mid x,w \in \{0, 1\}^+\right\}$$\left\{wxw^R \mid x, w \in \{0, 1\}...
26 votes
26 votes
4 answers
4
Kathleen asked Sep 21, 2014
8,388 views
The language $L=\left\{0^i21^i \mid i \geq 0\right\}$ over the alphabet $\left\{0, 1, 2\right\}$ is:not recursiveis recursive and is a deterministic CFLis a regular langu...