• edited by
24,031 views
69 69 votes

Consider the NFA $M$ shown below.

Let the language accepted by $M$ be $L$. Let $L_1$ be the language accepted by the NFA $M_1$ obtained by changing the accepting state of $M$ to a non-accepting state and by changing the non-accepting states of $M$ to accepting states. Which of the following statements is true?

  1. $L_1 = \{0,1\}^*-L$
  2. $L_1 = \{0,1\}^*$
  3. $L_1 \subseteq L$
  4. $L_1 = L$

8 Answers

Best answer
91 91 votes

Answer is B .

As the problem said:

As in above NFA language $L_1$ is $\{0,1\}^*$ . [we don't know $L$, we need not to find out]

Option A is wrong as $L$ is accepting $1$ and $L_1$ is also accepting $1$ 

Option C is wrong as $L_1$ accepting ^,null, but $L$ is not .

Option D is wrong for same reason as option C is wrong.

• edited by
28 28 votes

In case of a Deterministic Finite Automata (DFA) when we change
the accepting states into non-accepting states and non-accepting
states into accepting states, the new DFA obtained accepts the complement
of the language accepted by the initial DFA. It is because we have one
single movement for a particular input alphabet from one state so the strings
accepted by the transformed DFA will be all those which are not accepted by
the actual DFA. 

But it is not the case with the NFA’s (Non-Deterministic Finite
Automata). In case of NFA we need to have a check on the language accepted by the
NFA. The NFA obtained by changing the accepting states to non-accepting states and
non-accepting states to accepting states is as follows:-  

nfa

Here we can see that as
i.  The initial state is an accepting state hence null string is always accepted by
    the NFA.
ii. There is a movement from state 1 to state 2 on both {0, 1} input alphabets and
    further any  number of 1’s and 0’s or even none in the string lets the string be
    at an accepting state(state 2).

Hence the language accepted by the NFA can be any string with any combination of 0’s
and 1’s including a null string i.e. {null, 0, 1, 00, 01, 10, 11,……………..}

so L1= {0, 1}*.

So,answer is B

0 0 votes

In case of DFA we can say that by changing the final and non final states you get complement of the given language but in case of NFA it is not true because : 

For NFA, A string is accepted if there exists at least one path that leads to a final state. It is only rejected if all possible paths lead to non-final states.So, simply interchanging the states does not work here so we have to manually analyse based on the given NFA 

As we can see from the diagram that both L and the new language L1 accept 1 so (A) can't be true now C and D is also not possible simply because L1 accepts more language than L does hence we can say (B) is correct also can verify that language id indeed {0,1}* 

(Like string 0 is not accepted by L but L1 accepts it)

Answer:
Position:
Show:

Related questions

61 61 votes
5 answers 5 answers
14.7k
14.7k views
Kathleen asked Sep 17, 2014
14,730 views
A program consists of two modules executed sequentially. Let $f_1(t)$ and $f_2(t)$ respectively denote the probability density functions of time taken to execute the two ...
104 104 votes
9 answers 9 answers
25.8k
25.8k views
Kathleen asked Sep 17, 2014
25,841 views
Consider the following deterministic finite state automaton $M$.Let $S$ denote the set of seven bit binary strings in which the first, the fourth, and the last bits are $...
59 59 votes
6 answers 6 answers
18.7k
18.7k views
Kathleen asked Sep 17, 2014
18,734 views
A single tape Turing Machine $M$ has two states $q0$ and $q1$, of which $q0$ is the starting state. The tape alphabet of $M$ is $\{0, 1, B\}$ and its input alphabet is $\...
89 89 votes
6 answers 6 answers
28.1k
28.1k views
Kathleen asked Sep 17, 2014
28,086 views
Let $G=\left(\left\{S\right\}, \left\{a,b\right\},R,S\right)$ be a context free grammar where the rule set R is $S \to a S b \mid S S \mid \epsilon$Which of the following...