1
$\begingroup$

Given an input NFA, can one construct an NFA that is universal (that is, accepts all its inputs) if and only if, the input NFA isn't universal?

I tried to use the fact that NFA-universality is PSPACE-complete, and the fact that PSPACE = coPSPACE. I am also interested in the details of a simple construction.

$\endgroup$
2
  • $\begingroup$ Are you asking whether there is a PTIME reduction from NFA nonuniversality to NFA universality? $\endgroup$ Commented Jan 7, 2024 at 20:20
  • $\begingroup$ @BaderAbuRadi 1) I'd be fine with not necessary PTIME, but that would be cool 2) "nonuniversality" is a cool name, I wish I thought of it/encountered it before 3) I'd be interested in details of some simple construction as well, if possible $\endgroup$ Commented Jan 7, 2024 at 20:23

1 Answer 1

2
$\begingroup$

Consider the language $ALL_{NFA} = \{\langle A\rangle: \text{$A$ is an NFA with $L(A) = \Sigma^*$}\}$.

If you want a non-PTIME reduction from $\overline{ALL_{NFA}}$ to $ALL_{NFA}$, then you can simply do the following naive approach. On input $\langle A\rangle$ for the reduction, the reduction checks whether $L(A) \neq \Sigma^*$, and outputs an NFA $B$ that accepts all its inputs only when $L(A)\neq \Sigma^*$. Clearly, this works but comes at a high cost: we are deciding $\overline{ALL_{NFA}}$ to output the NFA $B$ accordingly. As the non-universality check can be performed in PSPACE, the latter reduction is a PSPACE reduction. More abstractly, if you don't care about the complexity of the reduction, you can use the fact that every non-trivial language is $R$-hard (see my answer here).

I am not aware of a simple PTIME reduction from $\overline{ALL_{NFA}}$ to $ALL_{NFA}$. There is ofcourse a PTIME reduction that goes through Savitch's theorem which states that for any function $f\in \Omega(log n)$, it holds that $NPSPACE[f(n)]\subseteq SPACE[f^2(n)]$. Indeed, it is well-known that the latter theorem implies that PSPACE = NPSPACE, and since PSAPCE = coPSPACE, we get in total that NPSPACE = coNPSPACE. The latter allows us to show that $ALL_{NFA}$ is PSPACE-complete -- membership in PSPACE follows from Savitch's theorem and the fact that $\overline{ALL_{NFA}}\in \text{PSPACE}$, see for example here. Then, PSPACE-hardness is well-known and can be shown directly, see for example here. Putting everything together, we get the exsitence of a PTIME reduction from $\overline{ALL_{NFA}}$ to $ALL_{NFA}$. Is there a simpler direct redcution? Who knows, maybe (and I would like to see one), but I suspect that the output NFA of that reduction needs to be at least of quadratic size, but I am not sure. I tried to use Savitch's theorem to show the latter, but then noted that Savitch's theorem has no known tight lower bound -- see here.

$\endgroup$
7
  • $\begingroup$ $ALL_{NFA}$ seems to be naturally-$coNPSPACE$ (via slight generalization of this construction or this question), so I guess "most natural" path would be through Immerman, not Savitch? $\endgroup$ Commented Jan 17, 2024 at 7:16
  • $\begingroup$ oh, I guess all 3 together give the construction. String encodes transitions and state of whole NFA with accepting everything that doesn't follow the rules, Search for input string up to $2^n$ of length and n bits for the counter $\endgroup$ Commented Jan 17, 2024 at 7:25
  • $\begingroup$ Immerman gives us NPSPACE(s(n)) = coNPSPACE(s(n)). Savitch gives us NPSPACE = coNPSPACE - a bit weaker, but sufficient. All the later space complexity classes are nondeterministic. Anyway, we ended up using the fact that $\overline{ALL_{NFA}}$ is in PSPACE, using Savitch. Meaning, going from a nondeterministic polynomial space class to a determinstic one goes through Savitch by using coNPSPACE = PSAPCE, and we blow up the space quadratically along the way. So even if you use Immerman, you also used savitch as it is implicit in coNPSPACE = PSAPCE. $\endgroup$ Commented Jan 17, 2024 at 10:06
  • $\begingroup$ Anyway, I think one can show that $ALL_{NFA}$ is harder than any language in NPSPACE directly, and thus avoiding determinization quadratic blow-up from Savitch, by modifying the reduction I wrote here to be a reduction from nondeterministic Turing machines: cs.stackexchange.com/questions/160065/… $\endgroup$ Commented Jan 17, 2024 at 10:11
  • $\begingroup$ Savitch gives $PSPACE(f^2) \ge_p NPSPACE(f)$, while Immerman gives $coNPSPACE(f+\log n) \ge_p NPSPACE(f)$. Linked encoding works for $\ge_p coNPSPACE$ just as good as for $\ge_p coPSPACE$, there's no need to go through $PSPACE$, but the encoding itself seems to quadratically increase the number of states, sadly $\endgroup$ Commented Jan 17, 2024 at 10:13

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.