mirror of
https://github.com/ParkerTenBroeck/automata.git
synced 2026-06-07 05:28:45 -04:00
first
This commit is contained in:
commit
7970cb197a
10 changed files with 595 additions and 0 deletions
17
example.txt
Normal file
17
example.txt
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
Q = {q0, q1} // states
|
||||
E = {a, b} // alphabet
|
||||
T = {z0, A, B} // stack symbols
|
||||
|
||||
// construct all possible permutations of A's and B's
|
||||
d(q0, epsilon, z0)={(q0, A z0), (q0, B z0)}
|
||||
d(q0, epsilon, A)={(q0, A A), (q0, B A)}
|
||||
d(q0, epsilon, B)={(q0, A B), (q0, B B)}
|
||||
|
||||
// transition to q1
|
||||
d(q0, epsilon, z0)={(q1, z0)}
|
||||
d(q0, epsilon, A)={(q1, A)}
|
||||
d(q0, epsilon, B)={(q1, B)}
|
||||
|
||||
// consume stack until empty
|
||||
d(q1, a, A)={(q1, epsilon)}
|
||||
d(q1, b, B)={(q1, epsilon)}
|
||||
Loading…
Add table
Add a link
Reference in a new issue