Past exam of the mathematics course of the University of Cambridge 2005 ii Paper 2 12J Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2006 ii Paper 1 4G Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2007 ii Paper 4 4G Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2009 ii Paper 4 4H iii Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2009 ii Paper 4 4H i Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2018 ii Paper 4 3H Solution Created 2026-09-24 Updated 2026-10-03
A binary linear-feedback shift register of length stores bits. At each clock it outputs one bit, shifts the state, and inserts a fixed linear combination over of the stored bits. Equivalently, its output obeys a recurrence
The Berlekamp-Massey algorithm processes the observed symbols from left to right. It maintains the shortest current connection polynomial , its degree , and a saved polynomial from the most recent degree increase. At step it computes the discrepancyIf , the current recurrence already predicts the new symbol. If , a shifted multiple of the saved polynomial is added to to cancel the discrepancy; when , the algorithm also replaces by and saves the old polynomial.
For the observed binary sequence, the nonzero-discrepancy updates areAll discrepancies through then vanish. Thus the shortest recurrence isor, equivalently, . The connection polynomial is , and with the reciprocal convention the feedback polynomial is
Past exam of the mathematics course of the University of Cambridge 2021 ii Paper 2 12K b Solution Created 2026-09-24 Updated 2026-10-03
A linear-feedback shift register is a linear mapFor the stated matrix , a word lies in exactly when . If is its cyclic shift, periodicity givesThus is shift-invariant and is a binary cyclic code.
Past exam of the mathematics course of the University of Cambridge 2022 ii Paper 4 3K Solution Created 2026-09-23 Updated 2026-09-25
A general binary feedback shift register of length has stateand a feedback function . One update outputs the oldest bit, shifts the state, and insertsThe initial fill is . It is a linear-feedback shift register whenfor fixed .
The Berlekamp-Massey algorithm reads an intercepted sequence from left to right while maintaining the shortest connection polynomial that reproduces the prefix. At each new symbol it computes the discrepancy between the observed bit and that predicted by the current recurrence. A zero discrepancy leaves the polynomial unchanged; a nonzero discrepancy adds a suitably shifted copy of the connection polynomial saved at the previous increase in linear complexity. After at least twice the unknown register length, it recovers the shortest recurrence, after which the entire keystream can be predicted.
Applying those discrepancy updates toreturns the connection polynomialEquivalently, the sequence obeysIndeed this predicts successively . No recurrence of length one or two fits the prefix, so its linear complexity is three.
Past exam of the mathematics course of the University of Cambridge 2023 ii Paper 2 12I c i Solution Created 2026-09-24 Updated 2026-09-25
Since generates , it cannot lie in a proper subfield, so its minimal polynomial over has degree . Write it asThe identity and characteristic two giveMultiplying by and applying the linear map yieldsThis is a binary linear recurrence of order at most , so is the output of a linear-feedback shift register of length at most .
Past exam of the mathematics course of the University of Cambridge 2025 ii Paper 4 3K Solution Created 2026-09-23 Updated 2026-10-03
A binary linear-feedback shift register of degree has a state
and recurrenceIts feedback polynomial is
and recurrenceIts feedback polynomial is
There are states, and the zero state is fixed. A nonzero periodic orbit therefore visits at most the other states, proving the period bound for a linear-feedback shift register.
For a maximal orbit with , the all-one state cannot itself be fixed. From that state the incoming bit is in . If an odd number of the were one, the incoming bit would be one and the all-one state would be fixed. Hence an even number of the are one; including the leading coefficient, the feedback polynomial has an odd number of nonzero coefficients. This is the feedback-polynomial parity condition for maximal period.
The given prefix has seven consecutive zeros followed by a one. Any register of degree at most seven would therefore enter the all-zero state before producing the final one, which is impossible. Degree eight is attained bywith initial state . It produces the next bit and has feedback polynomialThus this is the minimal linear-feedback shift register for the prefix 100000001.