Past exam of the mathematics course of the University of Cambridge 2019 ii Paper 1 12H Solution Created 2026-09-24 Updated 2026-09-29
Let be the extended transition function of a deterministic finite automaton. States are equivalent, or indistinguishable, whenThe quotient deterministic finite automaton by indistinguishable states has state set , initial state , accepting states , and transitionRight invariance of makes this well-defined, and the quotient accepts .
To prove minimality, choose for each state of the accessible automaton a word with . Run the same word in any DFA accepting , and assign the class the reached state of . If two distinct classes reached the same state of , every continuation would have the same acceptance result after and . Since and accept the same language, this would make and indistinguishable in , a contradiction. Thus has at least one distinct state for every class in , proving that the quotient is the minimal deterministic finite automaton.
For divisibility by seven, take states , initial state , accepting set , and transitionsAfter reading a word, the state is its binary value modulo seven, so this binary divisibility automaton accepts exactly the multiples of seven, with leading zeros allowed. Every state is accessible: the three-bit words representing reach the corresponding residues.
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 3 12F Solution Created 2026-09-24 Updated 2026-09-29
A deterministic finite automaton is a tuple with finite state set , finite input alphabet , transition function , initial state , and accepting-state set . It accepts a word when the extended transition function of a deterministic finite automaton carries to a state in . A regular language is a language accepted by some deterministic finite automaton.
The pumping lemma for regular languages says that if a regular language is accepted by an automaton with states, every accepted word of length at least has a decomposition with , , and in the language for every . Indeed, among the states visited before and after the first symbols, two are equal by the pigeonhole principle. The intervening nonempty word labels a loop, which may be traversed any number of times without changing the final accepting state.
In base two, the powers of two have representations , so their language is the regular expression and is regular.
Suppose instead that their base-ten representations formed a regular language. Apply the pumping lemma to a sufficiently long decimal power of two , and put . Pumping gives decimal integers represented by , all powers of two. A direct place-value calculation shows thatfor a constant independent of . The lengths, and hence the exponents in , tend to infinity. Dividing by givesFor large , the right side has absolute value less than one while the left side is an integer, so it must vanish. This would make a power of two equal to , impossible for by unique prime factorization. Thus the decimal powers of two are not a regular language.
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 2023 ii Paper 3 12I i Solution Created 2026-09-24 Updated 2026-09-25