Past exam of the mathematics course of the University of Cambridge 2021 iii Paper 120 1 Solution 2026-09-28
The Knaster-Tarski theorem states that the fixed points of a monotone map on a complete lattice form a complete lattice. LetFor every , monotonicity gives , hence . Applying once more gives , so . The definition of then gives , and therefore . Thusis the least fixed point. The order-dual argument shows thatis the greatest fixed point.
More generally, for a family of fixed points, let be the set of prefixed points satisfying and for every . Its meet is again prefixed. Since for every , the element also lies in , so the preceding argument gives . It is the join of within the fixed-point order. The dual construction gives the meet of within that order, proving completeness.
For the Myhill-Nerode theorem, let and define the Myhill-Nerode equivalenceThis is an equivalence relation and a right congruence: implies for every letter .
If a deterministic finite automaton accepts , any two words reaching the same state are equivalent, because every continuation has the same subsequent run. Hence has at most as many classes as the automaton has states. Conversely, if has finitely many classes, define an automaton with state set , initial state , transitionand accepting states with . Right congruence makes the transition well defined, and induction on word length shows that the state reached by is , so the automaton accepts exactly . Therefore is a regular language exactly when has finite index. Moreover, every automaton for has at least one state for each equivalence class, so this quotient is the minimal deterministic finite automaton.
Past exam of the mathematics course of the University of Cambridge 2021 ii Paper 2 4F Solution Created 2026-09-23 Updated 2026-09-25
For a deterministic finite automaton the extended transition function of a deterministic finite automaton is recursivelyThe accepted language isFor a nondeterministic finite automaton, is the set of all states reachable from while reading ; recursively,Thus
Past exam of the mathematics course of the University of Cambridge 2021 ii Paper 3 4F Solution Created 2026-09-23 Updated 2026-09-25
A regular expression is built from , , and alphabet symbols using union, concatenation, and Kleene star; its language is defined by applying the corresponding set operations recursively. A deterministic finite automaton is a tuple and acceptsKleene theorem says that the languages denoted by regular expressions are exactly those accepted by finite automata.
Regular languages are closed under finite union, using a product automaton or nondeterministic choice, and under finite intersection, using the product automaton with accepting set .
They are not closed under countable unions or intersections. Every language over a finite alphabet is a countable union of singleton languages, each regular, so a nonregular language such as is a counterexample. It is alsoa countable intersection of regular languages, giving the second counterexample.
Past exam of the mathematics course of the University of Cambridge 2023 ii Paper 3 12I iv Solution Created 2026-09-24 Updated 2026-09-25
Suppose first that is a regular language, accepted by a deterministic finite automaton . If two words reach the same state, then every continuation is accepted from both or rejected from both. Thus they are equivalent under , and the number of equivalence classes is at most the finite number of states of .
Conversely, suppose has finitely many classes. Define a deterministic automaton byandThe transition is well defined: if , then for every suffix ,so . Likewise, membership in is independent of the representative by taking the empty suffix in the definition of . Induction givesso the automaton accepts exactly . It has finitely many states, and therefore is regular. This proves the Myhill-Nerode theorem in the stated formulation. The assumption merely says that the initial state is not accepting.
Past exam of the mathematics course of the University of Cambridge 2026 iii Paper 120 3 g Solution Created 2026-09-24 Updated 2026-09-25
Given a finite input word , construct the typed term effectively and beta-normalize it. The Strong normalization theorem for simply typed lambda calculus guarantees termination, and confluence gives exactly one of the finitely many normal forms . Compare that normal form syntactically with the listed accepting states in . This algorithm accepts exactly when , so is recursive. Equivalently, this is the standard theorem that every language recognized by a deterministic finite automaton is a regular language and hence decidable.
Prime-exponent encoding of a finite list Created 2026-10-05 Updated 2026-10-06
For a finite list of nonnegative integers, encode its length with the exponent of two and its entries with the following prime numbers: , where is the th prime number. Unique prime factorization recovers both the length and entries. Requiring positive exponents on exactly the prescribed consecutive primes also makes validity decidable. Nesting list descriptors therefore gives a Gödel encoding of deterministic finite automata and other finite syntactic objects.
Pumping lemma for regular languages Created 2026-09-24 Updated 2026-09-24
For a deterministic finite automaton with states, every accepted word with has a decomposition such that , , and is accepted for every integer .
Right-linear grammar 2026-10-05
A right-linear grammar has productions of the form or , where are nonterminals and is a terminal word, possibly empty. Each right-hand side has at most one nonterminal, at its right end. Such grammars generate exactly regular languages: regard nonterminals as states and expand each terminal word into a finite path to another state or an accepting endpoint. Conversely the transition graph of a deterministic finite automaton gives these productions directly.
Subset construction with epsilon transitions 2026-10-03
The subset construction converts an epsilon-NFA into a deterministic finite automaton. Its states are subsets of NFA states, its initial state is the epsilon closure of the NFA initial state, and every symbol transition is followed by another epsilon closure.