0

I read from this question that counter automata is a push down automata with only one symbol allowed on the stack (plus a fixed bottom symbol).

My question is counter machine means counter coexist with stack? I mean "DFA $+ 1$ counter" is same thing with "DFA $+1$ stack" . For example to generate this language $\{a^n b^n \mid n\geq 0\}$ we need counter + stack.

I also from that question Languages recognized by one counter automata form a proper subset of the context free languages. What does it mean? Could you give one example.

S. M.
  • 1
  • 4
  • 19

1 Answers1

1

You can recognize $\{a^nb^n\}$ with just a counter (which is incremented by an $a$ and decremented by a $b$). No additional stack is needed. (If you used a stack, it would only contain $a$s; in general a counter is functionally equivalent to a stack whose alphabet consists of only one symbol.)

The answer to the question you link to provides an example of a deterministic context free language which cannot be recognised by a one-counter automaton: $\{a^nb^ma^mb^n\}$.

rici
  • 12,150
  • 22
  • 40