• edited by
26,820 views
87 87 votes

Consider the non-deterministic finite automaton (NFA) shown in the figure.

State $X$ is the starting state of the automaton. Let the language accepted by the NFA with $Y$ as the only accepting state be $L1$. Similarly, let the language accepted by the NFA with $Z$ as the only accepting state be $L2$. Which of the following statements about $L1$ and $L2$ is TRUE?

  1. $L1 = L2$
  2. $L1 \subset L2$
  3. $L2 \subset L1$
  4. None of the above

7 Answers

Best answer
108 108 votes

Misprints : Edge $Y \rightarrow Z$ ( $0$ edge )
                   Edge $Z \rightarrow Y$ ( $1$ edge )

Answer: A.

Explanation:

Writing $Y$ and $Z$ in terms of incoming arrows (Arden's method) :

$Y = X0 + Y0 + Z1$

$Z = X0 + Z1 + Y0$

Hence $Y=Z$. So, option (A).

• edited by
25 25 votes
convert this nfa to dfa , you will get the dfa with same final states  for both the cases , so option A is correct
19 19 votes

converting NFA to DFA,

both DFAs are same so,L1=L2

3 3 votes

The core reason is that NFAs are ambiguous to analyze directly.


The Problem with NFAs

In an NFA, from one state you can go to multiple states simultaneously on the same input. So when you ask:

"Does this string get accepted?"

You can't just follow one path — there could be many possible paths, and the string is accepted if any one of them leads to an accepting state.

This makes it hard to compare languages directly.

SO convert nfa to dfa .....and then you can trace the strings easily 

0 0 votes

Alternate solution,

If we make a DFA out of it, then the states Y and Z are always combined together.

If Z is final state then Y is also the final state and vice versa.

Therefore, they represent the same language.

Answer:
Position:
Show:

Related questions

79 79 votes
6 answers 6 answers
22.4k
22.4k views
Ishrat Jahan asked Nov 3, 2014
22,383 views
Consider the regular grammar:$S \rightarrow Xa \mid Ya$$X \rightarrow Za$$Z \rightarrow Sa \mid \epsilon$$Y \rightarrow Wa$$W \rightarrow Sa$where $S$ is the starting sym...
86 86 votes
6 answers 6 answers
21.2k
21.2k views
Ishrat Jahan asked Nov 3, 2014
21,161 views
Let $P$ be a non-deterministic push-down automaton (NPDA) with exactly one state, $q$, and exactly one symbol, $Z$, in its stack alphabet. State $q$ is both the starting ...
51 51 votes
6 answers 6 answers
12.8k
12.8k views
Ishrat Jahan asked Nov 3, 2014
12,772 views
Let $L$ be a regular language and $M$ be a context-free language, both over the alphabet $Σ$. Let $L^c$ and $M^c$ denote the complements of $L$ and $M$ respectively. Whic...
73 73 votes
7 answers 7 answers
26.6k
26.6k views
Ishrat Jahan asked Nov 3, 2014
26,632 views
Consider a simple graph with unit edge costs. Each node in the graph represents a router. Each node maintains a routing table indicating the next hop router to be used to...