Problem Set 1
Download: Problems 1.
Problem Set 2
Download: Problems 2.
Finite Automata
A simple, fragile parser for regular expressions. This produces a non-optimized, non-deterministic automata (NDFSM), in .dot format!
Using it like this:
python regexp.py 'bbb((((a*)b)|c)*)' | dot -Tpng > machine.png
writes to standard error the following:
concat(b,concat(b,concat(b,kleene(union(concat(kleene(a),b),c)))))
and produces the following image:
A non-deterministic finite states machine
Download: regexp.py.
Online Book by S. Dasgupta, C. H. Papadimitriou, and U. V. Vazirani: Download