Automata formula sheet
Every rule and formula of the trainer on one page, for revision before the exam or to print.
Automata formula sheet · CleverSphere
Simulate a DFA
Topic page →- ·Start in the state with the arrow
- ·Exactly one transition per symbol
- ·Accepted if the last state is accepting
Shortest word
Topic page →- ·Breadth-first search from the start state
- ·The first accepting state reached gives the length
- ·No accepting state reachable: empty language
Reading regular expressions
Topic page →- ·a* : any number of a, including none
- ·a+ : at least one a
- ·a|b : a or b
- ·Star binds tighter than concatenation, concatenation tighter than union
Chomsky hierarchy
Topic page →- ·Type 3: A → a or A → aB
- ·Type 2: exactly one variable on the left
- ·Type 1: the right side is never shorter than the left
- ·Type 0: no restriction
Construct a DFA
Topic page →- ·Think: what must be remembered?
- ·Complete: every state, every symbol
- ·A trap state for words that can no longer match
- ·More states than the minimum are fine as long as the language is right
Write a regular expression
Topic page →- ·(a|b)* stands for all words
- ·Ends with: (a|b)*w, starts with: w(a|b)*, contains: (a|b)*w(a|b)*
- ·Check the ε case separately
Subset construction
Topic page →- ·Start state: the set of NFA start states
- ·Transition: union of all next states
- ·Accepting: the set contains an accepting state
- ·Write down reachable sets only
Minimise a DFA
Topic page →- ·Remove unreachable states
- ·Start: accepting against non-accepting
- ·Split blocks when transitions lead to different blocks
- ·Repeat until nothing changes
Regular or not?
Topic page →- ·Finitely many cases to remember: regular
- ·Unbounded counting or comparing: usually not regular
- ·Proving non-regularity: pumping lemma
Pumping lemma
Topic page →- ·Pick w with |w| ≥ p
- ·Split w = xyz with |xy| ≤ p and |y| ≥ 1
- ·For every split find an i with xyⁱz ∉ L
CYK algorithm
Topic page →- ·Bottom row: variables for single symbols
- ·Check every split for each substring length
- ·Word generated if S is in the top cell
www.cleversphere.ch/tools/automata-trainer
