A Finite State Machine (FSM) — also called a Finite Automaton (FA) — is an abstract model of computation. It has a finite set of states, reads an input string symbol by symbol, and transitions between states according to a transition function.
| Component | Symbol | Meaning |
|---|---|---|
| States | Q | Finite set of configurations |
| Alphabet | Σ | Finite set of input symbols |
| Transition function | δ: Q × Σ → Q | Next state given current state + input |
| Start state | q⊂0; | Where the machine begins |
| Accept states | F ⊆ Q | States that signal acceptance |
A Deterministic FA (DFA): exactly one transition per (state, symbol) pair. An NFA: may have zero, one, or many transitions — including ε-transitions (no input consumed). Both recognise the same class of languages: regular languages.
Key theorem: Every NFA can be converted to an equivalent DFA (subset construction). NFAs are easier to design; DFAs are easier to implement.
1. Design an FSM over Σ={0,1} that accepts strings ending in "01".
2. Why can't a DFA recognise {a^n b^n | n ≥ 0}?
A DFA's transition function δ(q, a) returns
An FSM accepts an input string if
NFAs and DFAs recognise
The Pumping Lemma is used to
The language {a^n b^n | n >= 0} is not regular because