Pushdown automaton for (a^n b^n)^m c^m -


i'm stuck building transition functions automaton.

i suppose should stack 1 each , unstack each b

the number of c's equals number of ab pairs, think should stack 0 each b encounter. thing is: how unstack 1s , add 0s @ same time?

don't push 0 onto stack each time encounter b. instead, push 0 onto stack each time encounter b , stack empty or top of stack 0.

so, using nomenclature aabbabcc:

read push 1 read push 1 read b pop 1 read b pop 1 stack empty push 0 read push 1 read b pop 1  top of stack 0 push 0 read c pop 0 read c pop 0 

stack empty accept string.


Comments

Popular posts from this blog

List<T>().Add problem C# -

Javascript natural sort array/object and maintain index association -