wikiacademia

site

Sample PDA inputs

A machine that accepts any string of the form {anbn | n≥0} : :States: q1 q2 q3 q4 :Start State: q1 :Accept States: q4 :alphabet: a b :stack alphabet: $ a :rules: q1 e e q4 $ q1 e e q2 $ q2 b a q3 e q2 a e q2 a q3 b a q3 e q3 e $ q4 e
Some sample inputs: these accept: a a b b
a a a a a b b b b b

these reject: a a a b b b b b
a a a b b



A machine that accepts any string that consists of at least one 'a' followed by at least as many 'b's: :States: q1 q2 q3 q4 :Start State: q1 :Accept States: q4 :alphabet: a b :stack alphabet: $ a :rules: q3 b e q3 e q3 b a q3 e q2 b a q3 e q2 a e q2 a q1 e e q2 $ q3 e $ q4 e
Some sample inputs: these accept: a b
a a a b b b b b b b
these reject:
a a a b b
http://cs.marlboro.edu/ courses/ fall2006/ tutorials/ chomsky_hierarchy/ Sample_PDA_inputs
last modified Sunday November 19 2006 8:04 pm EST