in Theory of Computation edited by
19,142 views
71 votes
71 votes

What is the complement of the language accepted by the NFA shown below?
Assume $\Sigma = \{a\}$ and $\epsilon$ is the empty string.

  1. $\phi$
  2. $\{\epsilon\}$
  3. $a^*$
  4. $\{a , \epsilon\}$
in Theory of Computation edited by
by
19.1k views

17 Comments

What will be the NFA for the complement of the lang?

All state transition arrows will be reversed and non-final states will be final and vice-versa. Is it correct?
0
0
arrows will not be reversed.....
4
4
edited by

Assume $\sum=\{a\}$ and $\epsilon$ is the empty string. 

      $L=\left\{a^{+}\right\}$

$(1)$ What is the complement of the language accepted by the $NFA?$ 

               $\overline{L}=\left\{\epsilon\right\}$
$(2)$ What is the language which accepts complement of $NFA?$ 

         

   

                 $L_{1}=\left\{\epsilon,(a+\epsilon)^{+}\right\}$ 

Please correct me if i'm wrong$?$   

2
2
No,  it is not correct as it is epsilon-nfa. In nfa,   we do not get a complement by complementing the state diagram. You have to complement the language.  So,  language accepted here is L={a+}.

So,  it's complement would be L'={€}
18
18
which one is not correct??
0
0

@Lakshman Patel RJIT

why the answer is not $a^{*}??$

If we draw complement diagram , isnot it coming $a^{*}??$

I mean according to this diagram ,what it means?

Lightbox

2
2
edited by

@srestha ma'am

It is $\epsilon$-NFA

And when we just toggled the state, we can't get the complement of $\epsilon$-NFA.

In my above comment $2^{nd}$ statement is not correct.

Lightbox

It is not a complement of above $\epsilon$-NFA. Because it also accepts $L=\{a^{+}\}.$

---------------------------------------------------------------------------------

$L=\{a,aa,aaa,...\}=\{a^{+}\}$

We can draw the DFA for this.

$L=\{a^{+}\}$

Now, we can complement the DFA

$L=\{\epsilon\}$

Reference:

10
10

@Lakshman Patel RJIT

yes, that I know, but what this diagram accepts??

is it $a^{*}$ or $\epsilon ??$

Lightbox

0
0
edited by

@srestha Ma'am

it will give $L=\{\epsilon,(a+\epsilon)^{+}\}=\{\epsilon,a^{+}\} = \{a^{\ast}\}$

and below automata is also giving the same output

1
1
So, ur answer is not matching, hence not correct. right??

We can conclude that , we cannot do complement of NFA. Complement only possible for DFA.

right??
1
1
Yes
0
0

please check this - 

 1. Complement of language of a given NFA $\neq$  Language accepted by Complement of that given NFA.

2. Complement of language of a given DFA $=$  Language accepted by Complement of that given DFA.

 

1
1
I think you are right.
0
0

@MRINMOY_HALDER

 

 Complement of language of a given NFA ≠  Language accepted by Complement of that given NFA.

2. Complement of language of a given DFA =  Language accepted by Complement of that given DFA.

 

 

Can u explain these lines ?  Where u got these line?

1
1
"Complement of language of a given NFA ≠≠  Language accepted by Complement of that given NFA. "

I think it is may or may not be equal. Please verify.
2
2
Correct.

In the case of NFA, by complementing automata we will not get the complement of language. In some cases, it may give complement of the language but it’s not always true. That’s why there no concept of a complement of NFA.
1
1
L= { a, a.$\epsilon$.$\epsilon$.a, a.$\epsilon$.$\epsilon$.a.$\epsilon$.$\epsilon$.a, ……}={a,aa,aaa,….}
a.$\epsilon$=$\epsilon$.a=a. here $\epsilon$ is empty string(“”).
The complement of a NFA doesn't give us the complement of the language it is accepting. Better you find out the language it is accepting and then complement the language.

I think this is the most important part which is being ignored. 

5
5

14 Answers

89 votes
89 votes
Best answer
The language being accepted is $a^+$. So, complement of the language is $\{\epsilon\}$.
selected by
by

4 Comments

$1.\ \varepsilon- NFA\ to\ NFA$

$2.\ NFA\ to\ DFA$

$3.\ Compliment$

$Ans: \varepsilon$

20
20
very good explanation .
0
0
edited by
Don't Stuck at any where.... As a Gate aspirant you should read question carefully..

They are asking compliment of language , not asking about compliment of NFA Machine..

NFA accepts {a+}

Complement of the Language ={epsilon}

Complement of NFA MACHINE ={a*}
13
13
42 votes
42 votes
NFA accepts the language L=a+ and ∑={a}

the complement of L=∑*- a+=a*-a+={∊}

so answer is B
by

2 Comments

Complement does not work with NFA always. I don't think this approach is correct even though it works for this example.
0
0

@tusharp he did not make the complement of NFA, he made the complement of language which always works

3
3
13 votes
13 votes

Ans.

4 votes
4 votes
the language is a+ .....  compliment is {$\varepsilon$}
edited by
Answer:

Related questions