edited by
12,479 views
50 votes
50 votes

Match the following NFAs with the regular expressions they correspond to:

P
Q
R
S

 

  1. $\epsilon + 0\left(01^*1+00\right)^*01^*$

  2. $\epsilon + 0\left(10^*1+00\right)^*0$

  3. $\epsilon + 0\left(10^*1+10\right)^*1$

  4. $\epsilon + 0\left(10^*1+10\right)^*10^*$

  1. $P-2, Q-1, R-3, S-4$
  2. $P-1, Q-3, R-2, S-4$
  3. $P-1, Q-2, R-3, S-4$
  4. $P-3, Q-2, R-1, S-4$
edited by

11 Answers

Best answer
39 votes
39 votes

$S-4$ is confirmed

$R-3$ is true coz everything it accepts ends with $1$; this is made mandatory only by $3$
this rules out option B and option D 

use string $01010$ and compare $P$ Vs $Q$; this makes $Q-2$ as confirmed.

Hence, option C is correct.

edited by
13 votes
13 votes
Lets go step by step by step, eliminating the given options:

Min string accepted by P is 00 , therefore 3, and 4 cant be the RE for it as they say 01 must be included.

Min string accepted by Q is 00 , therefore again 3, 4 cant be RE for Q for the same reason mentioned above.

So by now, we left only 2 options, answer has to be A or C.

2nd min accepted by P is 001, but RE in 2 says string start and end with 0. Therefore RE for P is 1 making 2 as RE for Q.

Therefore answer is Option C.
3 votes
3 votes
Correct Ans is (C)

Trace the given regular expressions with the diagrams
0 votes
0 votes

for P 00 and 001* is accepted.so this can be generated with option 1 only

for S 01 and 010* can be generated.so this can be generated with option 4 only

Now we will compare rest of the options to distinguish them.

for Q 00 is accepted so option should be 2

for R 01 is accepted so option should be 3

(C) is the ans

Answer:

Related questions

67 votes
67 votes
4 answers
1
Kathleen asked Sep 12, 2014
14,465 views
Given below are two finite state automata ( $\rightarrow$ indicates the start state and $F$ indicates a final state)$$\overset{Y}{\begin{array}{|l|l|l|}\hline \text{} & ...
34 votes
34 votes
2 answers
2