Two questions regarding one-counter automata

240 Views Asked by At

Let's assume we have a non-deterministic one-counter automaton without epsilon transitions. I have two questions:

  1. Is there an algorithm (if yes, what is it?) that answers whether this automaton accepts $\Sigma^*$ where $\Sigma$ is the alphabet of the automaton?

  2. Let's assume that both $L$ and $\Sigma^* \setminus L$ are recognized by certain such automata. Does it mean that $L$ is regular? Why/why not?

1

There are 1 best solutions below

3
On

Since a comment seems to have answered part 1 of your question, I'll tackle part 2.

Consider the language $L = \{ a^n b^n \}$. It's almost trivial to construct a one counter automaton to recognize this language; to accept $\Sigma^* - L$, switch all accepting states in the machine that accepts $L$ to rejecting, and all rejecting to accepting. This language is the classic example though of a language which cannot be recognized by a finite automata, and therefore not regular (see: pumping lemma).