1

if given a language $L$ recognized by NFA $N_0$ over an alphabet $\Sigma$. Is it possible to find a general way of constructing an NFA $N_1$ that accept $L^C$ such that $L^C= \{w \in \Sigma^{*} |\mid w \notin L \}$?

Yuval Filmus
  • 280,205
  • 27
  • 317
  • 514
John C.
  • 113
  • 3

1 Answers1

1

Is there a general way to do it? The answer is yes: one way to do it is to find a DFA that accepts $L$ (for example with the powerset construction), make it complete (by adding a sink state), and swap final states and non-final states. The automaton is deterministic, but it is a special case of non deterministic.

Is there a polynomial time way to do it? I don't know, since the construction above can be exponential time in the number of states (because of the powerset construction).

Nathaniel
  • 18,309
  • 2
  • 30
  • 58