pushdown-automaton

How do I design the transition functions for this pushdown automaton?

I'm studying for a test on PDA, and I want to know how to design a pushdown automaton that recognizes the following language: L = {a^max(0,n-m)b^n a^m| n,m >=0} How can I design a transition function to recognize if n-m is greater than 0? And please, if you have some course materials with exercises of this level solved, put a link, m...

Pushdown automaton branches

I'm asked to write a pushdown automaton program using java?I'm up to the simulation part. My pda is non deterministic.I need to set time limit for computation as it might go to one branch forever.This is the part I don't understand.In which case it will go to a branch forever?Can you please give me example how it moves to that situation?...

Deriving a state machine from a BNF grammar

I am trying to put together a proof of concept of an XSS-safe string interpolation scheme. Given a string with substitutions, "Hello <b>$planetoid</b>!" I want break it into literal portions and substitutions ("Hello<b>" planetoid "</b>!") and then run a state machine left to right over the literal portions. When I reach an interpol...

How do I implement pushdown automaton in C#?

I want to code this for PDA. How would I do that in C#? a^nbc^n (n>=0) ...

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

Hi, I'm stuck building the transition functions for this automaton. I suppose I should stack a 1 for each a and unstack it for each b The number of c's equals the number of ab pairs, so I think I should stack a 0 for each b I encounter. Thing is: how do I unstack 1s and add 0s at the same time? ...