I encontered the following problem that I'm unable to solve. The goal is to construct a stack automata, that accepts language $$ L = \left\{u\mathrm{\underline{c}}v \mid u,v \in \{\mathrm{\underline{a}},\mathrm{\underline{b}}\}^* \text{ and } u \neq v \right\} \subset \{\mathrm{\underline{a}},\mathrm{\underline{b}},\mathrm{\underline{c}}\}^* $$ I tried everything, but nothing works. I hit the problem of having just a stack, not a queue...
2026-03-26 07:37:34.1774510654
Stack automata with nonequality
63 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
A word is in the language, if it satisfies
This leads to the following automaton:
After encountering the first $c$, start to count down the stack.
3.1. If the word ends before the first $c$, discard.
3.2. If a second $c$ is encountered, discard.
3.3. If the word ends, before the stack is empty, accept.
(Note that discarding for a nondeterministic automaton only means that the specific computation failed. It does not imply that the word is not in the language.)