For every input probability mass function, conditional entropy is nonnegative, soTaking the maximum over input laws proves bit per channel use. This bound comes from the binary input alphabet itself; no specific transition probabilities or decoder are needed.
Past exam of the information theory course of the University of Oxford 2023 2 c ii Solution 2026-10-25
For fixed , the asymptotic equipartition property gives . The strong law of large numbers applied to , which are bounded because their numerical alphabet is finite, gives . The union bound therefore yieldsSince , eventually . Each word in has probability mass at most , soRearranging provesfor sufficiently large . The key is that the factor is a fixed number below one, however small is. This is an instance of typical sets with an additional high-probability constraint.
First, the binary translation of a quaternary prefix code is still a prefix code: every translated codeword length is even, and a binary prefix relation would split into complete two-bit blocks, giving a prefix relation between the original quaternary codewords. Binary Huffman coding is optimal among binary prefix codes, soFor the other direction, let and round these binary codeword lengths to quaternary lengths . The Kraft inequality givesThe quaternary converse of the Kraft inequality supplies a quaternary prefix code with lengths . Optimality of the quaternary Huffman code then impliesThus binary translation of an optimal quaternary code costs at most one extra bit per source symbol:The quaternary Huffman code uses the usual adjustment of adding zero-weight dummy leaves when needed. If the alphabet has one symbol, both optimal codes may use the empty codeword, giving the trivial endpoint.
Use the standard deterministic channel encoder and channel decoder, with message labels and code rate . The Fano's inequality hint printed here replaces by , which is false in general: take uniform on and in the common alphabet . The error probability is one and its binary entropy is zero, so the proposed bound asserts . The correct Fano's inequality alone gives , which does not immediately give the requested additive . The following erasure-pattern counting bound for maximal decoding error proves the displayed claim directly.
The case is immediate because . Suppose , put , and let be the message that the channel decoder returns on the all-erased output. Choose uniformly among the other messages. Every one of these messages is decoded correctly with probability at least , by the assumed maximal decoding error probability bound.
Let be the random set of unerased coordinates and . For each fixed with , at most output words are possible. A deterministic channel decoder can correctly identify at most one message per output word, so its conditional success probability, averaged over these messages, is at most . When , success is zero because was excluded.
For every integer ,If , this is immediate. If , write . The elementary inequality for giveswhere the middle inequality is . This proves the needed scalar bound.
Taking the expectation over erasure patterns, and using , yieldsConsequently the requested bound is valid:The use of maximal decoding error probability matters: excluding one message preserves the lower bound on success. The deterministic channel decoder convention also matters; allowing independent randomized guessing would invalidate this particular finite-length claim at .
Past exam of the mathematics course of the University of Cambridge 2005 iii Paper 37 4 a Solution Created 2026-10-03 Updated 2026-10-14
A discrete memoryless channel is specified by discrete input and output alphabets and a transition probability , with and . Its successive outputs are conditionally independent given the inputs, with the same transition rule at every use:Operationally, its channel capacity is the supremum of communication rates in bits per use attainable by increasingly long block codes with decoding error probability tending to zero. For finite alphabets, the equivalent Shannon characterization iswhere is Shannon entropy, is classical conditional entropy, and the maximization is over the input probability distribution.
For the channel in question, the transition matrix, with input symbols indexing rows, isEvery row has the same Shannon entropy, namely the binary entropy . Consequently for every input probability distribution. Since the output has three symbols, the maximum entropy on a finite alphabet givesChoose a uniform input. Each column of sums to one, so for every output symbol and the upper bound is attained. FinallyThus the cyclic ternary channel capacity isachieved by a uniform input probability distribution. This is a weakly symmetric channel capacity calculation: the matrix rows are permutations and the column sums agree. The channel is not the usual ternary symmetric-error channel, since an error has only one possible changed output for each input.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 20 1 Solution 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.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 21 2 ii Solution Created 2026-10-03 Updated 2026-10-06
Yes: regular languages are closed under the shuffle of formal languages. The construction must allow letters common to both alphabets to be assigned to either input word.
Take complete deterministic finite automata recognizing . Construct a nondeterministic finite automaton on over . Its initial state is and its accepting states form . On a letter , its possible moves from areBoth moves are allowed when belongs to both alphabets. They may coincide; that causes no difficulty.
For every run, record whether each move updated the first or the second coordinate. The letters assigned to each coordinate, in their original order, form two words . The final coordinate states are exactly the states reached by reading in . Thus an accepting run expresses the input as an interleaving of a word of and a word of .
Conversely, given such an interleaving, assign each input position to the word from which it came. The corresponding choices of transitions form a run ending in . This proves equality between the recognized formal language and the shuffle of formal languages, in both directions. No assumption of disjoint alphabets is needed. If one contributing word is the empty word, no move need update that coordinate; the initial pair is accepting exactly when both empty words are accepted.
Apply the powerset construction to this nondeterministic finite automaton to obtain a deterministic finite automaton. In particular,
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 21 2 i Solution Created 2026-10-03 Updated 2026-10-06
The minimal deterministic finite automaton is unique up to an isomorphism preserving the initial state, transitions and accepting states. We use complete deterministic finite automata over the fixed alphabet; the PDF's abbreviation FDA has this meaning. State names themselves cannot be unique.
For words , introduce the Myhill-Nerode equivalenceIt is an equivalence relation, and appending the same letter to equivalent words preserves it: a suffix after is the suffix after . Since is a regular language, take any recognizing deterministic finite automaton. Words reaching the same state are equivalent, since every further suffix gives the same computation. Thus has finite index.
The canonical residual automaton has one state for each class, initial state , transition , and accepting states those with . These choices are well-defined by Myhill-Nerode equivalence. Induction on the input length shows that reading reaches , so the deterministic finite automaton recognizes , and all its states are accessible states of a deterministic finite automaton. The same state can be described by the left quotient of a formal languageTwo states are different precisely when some suffix distinguishes their acceptance behavior.
Every recognizing deterministic finite automaton has at least as many states as there are classes: pick a representative from each class; two different representatives cannot reach the same state. The canonical residual automaton attains this bound, and therefore is a minimal deterministic finite automaton.
For uniqueness, let be any minimal deterministic finite automaton. All its states are accessible, since removing inaccessible states leaves a complete recognizing deterministic finite automaton with fewer states. Map a state reached by to . This is well-defined because two words reaching the same state are equivalent. It is surjective because every class has a representative. Both sets have the minimal number of states, so it is a bijection. It preserves the initial state and transitions by construction, and preserves accepting states by taking the empty word as the suffix. This is the required isomorphism with the canonical residual automaton, provingThe empty word is included throughout, and empty or universal regular languages have the corresponding one-state complete deterministic finite automata.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 120 1 a i Solution Created 2026-10-03 Updated 2026-10-06
Use the synchronous group multiplier automata belonging to the automatic structure for a group. Write for the padded convolution of words: the shorter tape is completed with a symbol outside the alphabet, and reading stops when both words over an alphabet have ended. Our convention isLet be at least the number of states of each of these finite-state automata, including .
Choose a shortest representative of . In the first orientation, accepts ; in the other orientation it accepts . If , the accepting run has more than transitions after the tape containing has ended. Two states in that suffix coincide. Delete the intervening nonempty loop. Every deleted column contains on the fixed tape and a genuine letter on the tape containing , so the resulting input remains a valid padded convolution of words. The group multiplier automaton still accepts, giving a shorter representative of the same . This contradicts minimality. Thus a representative can always be chosen withThis argument does not require a symmetric alphabet: the second orientation uses the same with its tapes interchanged in the input, rather than a presumed .
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 120 1 b Solution Created 2026-10-03 Updated 2026-10-06
Fix the first tape of the group multiplier automaton to be . Construct its possible runs by dynamic programming, one column at a time. A record consists of a state and a flag indicating whether the output tape has ended. At column , the first symbol is and the second symbol may be any letter of the alphabet, or ; after the second tape first uses it must continue to use . At later columns the first symbol is , and an additional column must have a genuine letter on the second tape. Never add a column.
Keep one predecessor record and its output symbol for each reachable state-and-flag pair in each layer. Two runs reaching the same record have exactly the same possible future completions, so this merging loses no accepting output. The merged dead state of a finite automaton can be discarded. At each layer , test whether a reached state is accepting; the initial layer is included when . Upon success, follow predecessor records backwards and omit padding symbols to recover .
The automatic structure for a group supplies a representative in of , so an accepted padded convolution of words exists and this search terminates. The output is the required representative:The search uses only the finite transition table; it does not presuppose a solution to the word problem for a group.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 120 1 d Solution Created 2026-10-03 Updated 2026-10-14
The regular language is nonempty because it represents every element of the group. Find any accepted word using breadth-first search in its finite-state automaton. If is the empty word, it already represents the identity.
Otherwise begin with and repeatedly apply the linear-time multiplication in an automatic structure to the lettersThese letters belong to by symmetry of the alphabet. All intermediate words lie in , and the final word representsHence an identity representative can be constructed effectively:This is a finite preliminary computation depending only on the fixed automatic structure for a group; it uses no test for whether an arbitrary word represents the identity.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 130 2 iii Solution Created 2026-10-03 Updated 2026-10-05
A run of a word is a maximal consecutive block of equal letters. For every , use the following finite coloring of , with at most nine colors:We show that this run-count obstruction to interval-active lines excludes every monochromatic combinatorial line with an interval active set . If , its three words already have different first coordinates, so their colors differ. Suppose and denote the letter immediately to the left by . All contributions to away from the two possible boundaries of are independent of its active letter ; no internal active boundary contributes a change.
If , the only variable contribution is , which is at and at another letter. If , write for the letter immediately to the right. The variable contribution isWhen , its values are and . When , it equals at or , and equals at the third letter. In every case these values are distinct modulo . Hence no dimension works for alphabet size three and nine colors, which disproves the proposed universal strengthening. For the PDF's illustrative line, choosing either adjacent letter merges one active run with a neighboring run, while choosing any other letter merges neither; this is exactly the boundary effect measured above. Recording the first letter also handles active intervals meeting the beginning, including the entire coordinate set.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 130 2 i Solution Created 2026-10-03 Updated 2026-10-05
We prove the Hales-Jewett theorem by mathematical induction on the alphabet size. A combinatorial line has a nonempty active coordinate set, with one common letter in all those coordinates. More generally, a -dimensional combinatorial subspace has disjoint nonempty active coordinate sets, each with an independently variable letter.
First prove the alphabet insensitivity lemma, rather than assume it. Fix distinct letters , colors, and dimension . Partition the coordinates into consecutive blocks of lengths , chosen from left to right. Put and chooseConstruct the variable blocks from right to left. When working on block , the later blocks have already become -parameter words, while all earlier coordinates remain unrestricted. For each , take the color vector of the word having in block , indexed by every earlier word and every assignment to the later parameters. There are entries and hence at most different vectors. The pigeonhole principle gives with identical vectors. Fix the first positions of this block to , fix its last positions to , and make the intervening positions a new variable block. Substituting or there gives exactly the two equal color vectors.
This equality holds for every earlier word and every later parameter assignment. Restricting the earlier coordinates in subsequent steps therefore preserves it. Likewise, the insensitivity already proved in a later block survives every restriction of earlier coordinates. At the end, we obtain a -dimensional combinatorial subspace whose induced finite coloring is unchanged whenever any parameter switches between and , with all other parameters fixed. Multiple switches preserve the color by successive single switches. This is the alphabet insensitivity lemma in full.
For alphabet size , one coordinate is already a monochromatic combinatorial line. Suppose the Hales-Jewett theorem has been proved for alphabet size , and let . Apply the proved alphabet insensitivity lemma with letters to get a -dimensional combinatorial subspace in . Restrict its parameter words to . The induction hypothesis gives a monochromatic combinatorial line in these parameters. The union of its active parameter blocks is nonempty, so its image is a combinatorial line in the original coordinates. Its additional point with active letter has the same color as the point with active letter , by insensitivity. Therefore all points have one color, provingThe construction supplies a finite recursive bound; optimal bounds are not needed.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 130 4 i Solution Created 2026-10-03 Updated 2026-10-05
Use the product topology on , with discrete, and the left shift . A basic cylinder set specifies finitely many coordinates. This is a compact metric space, and is a homeomorphism. Write for the forward orbit closure. A minimal point means that is a minimal dynamical system, equivalently that every point of has a dense forward orbit in ; it need not be a fixed point.
There is a convention needed in the source: the bounded-gaps property concerns every finite integer interval , hence every finite word over an alphabet. Literally allowing would make the displayed condition impossible for finite , although a constant coloring is a minimal point. Under the standard finite-word interpretation, the property is precisely uniform recurrence.
Suppose first that is a minimal dynamical system. Its nonempty compact forward-invariant subset must equal . As the ambient left shift is invertible, all integer translates of belong to . Let have length , and let . This is a nonempty clopen set. Each forward orbit in meets , so covers . By compactness, finitely many suffice; let be the largest index in this finite cover. For any integer , the point lies in , so some satisfies . The prescribed word therefore occurs at positions , entirely inside . Taking proves the bounded-gaps property for every interval of length at least .
Conversely suppose is uniformly recurrent. Every finite word from any integer translate of occurs arbitrarily far to the right, so every such translate belongs to . Moreover, the property that every length- block contains a specified word of passes to every : a finite block of is a limit of blocks of forward translates of , and the finite discrete alphabet forces eventual exact agreement on that block. Given , look for its word inside . An occurrence starts at for some , so agrees with on . Taking for arbitrarily large proves that belongs to the forward orbit closure of every . That closure is a closed forward-invariant subset of , so it also contains every forward translate of and hence all of . Every forward orbit is therefore dense in , provingThe same conclusion holds if orbit closure is defined using all integer iterates: the bounded-gaps condition makes the forward and two-sided closures equal.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 130 1 iii Solution Created 2026-10-03 Updated 2026-10-05
Let be a word length supplied by the Hales-Jewett theorem for alphabet and two colors. For , embed into by the coordinate duplication for combinatorial lines mapPull back any two-color finite coloring to this word space. The Hales-Jewett theorem gives a monochromatic combinatorial line with nonempty active set . Its image is a combinatorial line whose active set isand hence has size , a positive even integer. ThereforeThe empty set's presence in the family causes no difficulty: the line just constructed has at least two active coordinates.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 130 1 i Solution Created 2026-10-03 Updated 2026-10-05
Hales–Jewett and the arithmetic-progression consequence. For a finite alphabet and a positive integer , the Hales-Jewett theorem gives an integer such that every -color finite coloring of contains a monochromatic combinatorial line. A combinatorial line has a nonempty active coordinate set: all those coordinates receive the same freely varying letter, and the remaining coordinates are fixed.
We first prove the alphabet insensitivity lemma. Fix two letters , with , and a desired dimension . There is a combinatorial subspace of dimension on which changing to in any variable coordinate, with all other variable coordinates arbitrary, preserves the color.
For the construction, divide the coordinates into consecutive blocks. Choose their lengths from left to right byProcess the blocks from right to left. When processing block , the later blocks already form a -dimensional combinatorial subspace. Color each word in block by the vector of its original colors for every prefix word of length and every assignment to those later variables. There are contexts, and at most such color vectors.
The words , , contain two, indexed by , with the same vector by the pigeonhole principle. Fix the first coordinates to , the coordinates after to , and make coordinates the active set of one new variable. Its values now have identical colors for every prefix and later-variable context. The active set is nonempty. Insensitivity already obtained in later blocks survives, because it held for every unrestricted earlier prefix. After all blocks have been processed, changing in any of the variables preserves the color. This proves the lemma.
Now induct on . For , a one-coordinate combinatorial line is automatically monochromatic. For , let be a length supplied by the theorem for alphabet and colors. Apply the alphabet insensitivity lemma for the letters to obtain a -dimensional combinatorial subspace. Restrict its variables to . Induction gives a monochromatic combinatorial line in those variables. Its values have the same color, and its value has the same color as its value by successively switching the active variables. Lifting this line to the original coordinates proves
For the Van der Waerden theorem, fix a progression length and use the alphabet . Pull back an -color finite coloring of alongA combinatorial line with active set maps to the arithmetic progression , where and its common difference is . The Hales-Jewett theorem makes this progression monochromatic. Length one is trivial, so every finite coloring of the positive integers contains monochromatic arithmetic progressions of every finite length.
The active-coordinate obstruction. Color a word red when its first coordinate is , and blue otherwise. Any combinatorial line whose active coordinate set contains has a red word at variable value and a blue word at variable value , since . ThusHere adequacy is the adequate family of active coordinate sets property; an active coordinate set is always nonempty.
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 1 4F Solution Created 2026-09-24 Updated 2026-09-29
An alphabet is a finite nonempty set of symbols. A word over an alphabet is a finite sequence of symbols from , including the empty word ; the set of all words is . A formal language over is any subset .
A regular expression is defined recursively from , , and the individual symbols by the operations of finite union, concatenation, and Kleene star. Its language is defined by
There are only countably many regular expressions: each is a finite word over a finite collection of symbols and punctuation. On the other hand, for every nonempty finite alphabet, is countably infinite, so its power set is uncountable by the Cantor theorem. Thus there are uncountably many languages but only countably many languages denoted by regular expressions. Consequently
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 3 4F i Solution Created 2026-09-24 Updated 2026-09-29
A context-free grammar is a quadruple consisting of a finite set of nonterminal symbols, a disjoint finite alphabet of terminal symbols, a start symbol , and a finite set of productions with and . A sentence is a terminal word over an alphabet with , and the generated formal language is .
The first language is context-free. For example, the productionsgenerate exactly : each recursive production adds two s to the left and two s to the right.
Past exam of the mathematics course of the University of Cambridge 2023 ii Paper 2 3I a i Solution Created 2026-09-24 Updated 2026-09-25
A Bernoulli source is a sequence of independent and identically distributed random variables with a common probability mass function on the finite alphabet .
The source is reliably encodable at rate if, for each block length , there are an encoder with at most outputs and a decoder such that the block error probabilitytends to zero as .
Past exam of the mathematics course of the University of Cambridge 2026 iii Paper 224 2 a Solution Created 2026-09-24 Updated 2026-09-25
Let be probability mass functions on a finite alphabet, with absolutely continuous with respect to . A decision region accepts the null law . Writefor its type-I and type-II errors. Stein's lemma states that for every fixed ,where logarithms and relative entropy use base two.
For achievability, letUnder , the normalized log-likelihood ratio converges in probability to by the weak law of large numbers, so . On , , whence .