Solution
ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2013/iii/paper-20/1/solution
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 20 1 Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-07
Fix a finite alphabet . A regular expression is built recursively from , , and the letters , using union, concatenation, and Kleene star. Its interpretation is a formal language: the basic expressions denote , , and , while , , and denote , , and all finite concatenations of members of , including the empty concatenation. In particular, and are different expressions with different meanings.
Kleene theorem identifies exactly the languages described by regular expressions with those recognized by finite-state automata. Start with a deterministic finite automaton (DFA) having states , initial state , accepting set , and transition function . Let describe paths from to whose internal states lie among . At stage zero use the union of letters labelling direct transitions from to , with added if ; use if there are no such possibilities. Define the finite-state path expressions recursively byA path either avoids internally or decomposes at its visits to : an initial piece into , any number of return pieces at , and a final piece out. Each piece has no internal occurrence of . This proves the recursion by induction, including paths with or , where empty pieces are permitted. Thusis a regular expression for the DFA's accepted formal language. An empty accepting set gives the expression . This is the path form of state elimination for finite automata.
A nondeterministic finite automaton (NFA) replaces a single successor state by a set of possible successors. It accepts if there exists an accepting run with and . Rejection means that no accepting run exists, rather than that some run rejects. For an Epsilon-NFA, transitions labelled consume no symbol; acceptance means a path whose non-epsilon labels spell . In particular, acceptance of the empty word is tested using the epsilon closure of the initial state.
The same Kleene theorem holds for nondeterministic finite automata. For an NFA without epsilon transitions, the powerset construction has state set , initial state , transition on letter , and accepting subsets meeting . Induction on word length shows that its state is exactly the set of possible current NFA states. For an Epsilon-NFA, start from , where is epsilon closure, and useThis subset construction with epsilon transitions preserves the accepted formal language and gives a DFA with at most states. The already proved direction of Kleene theorem therefore gives a regular expression for every NFA language.
For the converse, recursively construct an Epsilon-NFA with a designated initial state and final state for a regular expression. Use two states with no connecting path for , one epsilon edge for , and one edge labelled for . Keep component state sets disjoint. Union uses a fresh initial state with epsilon edges into both components, and epsilon edges from their finals to a fresh final. Concatenation joins the first final to the second initial by an epsilon edge. For Kleene star, use fresh initial and final states, an epsilon edge directly between them for zero iterations, an edge into the old initial, and epsilon edges from the old final both back to the old initial and out to the new final. Each construction has exactly the intended union, concatenation, or iteration semantics. Induction on the regular expression proves correctness; the subset construction with epsilon transitions then gives a DFA. This proves both directions of Kleene theorem.
New to topics? Read the docs here!