EE4253 Digital Communications
Department of Electrical and Computer Engineering - University of New Brunswick, Fredericton, NB, Canada
One of the practical applications of polynomials is in the definition and description of linear recursive sequence generators. These sequential circuits, based on shift registers and exclusive-OR (XOR) gates, find use in the generation of random numbers, with many applications in modern cryptography and digital communications.
A Pseudo-Random Number Generator
The generation of binary sequences with random properties using this approach is limited somewhat in that the output of any digital sequential circuit is deterministic (predictable), and a shift register with N-stages can only take on 2N different states. Consequently, the bit sequences produced in this way will only appear random in the short term. Ultimately the circuit output is periodic, although that period can be arbitrarily long and may span many human lifetimes. These are properly called pseudo-random sequences.
The ideal random sequence generator will produce the longest possible period before repeating. Note that if the state of the above circuit becomes all zeros it will never change, so this condition must be avoided. Therefore, the maximal length sequence is given by L = 2N-1, where N is the number of flip flops. In the above example, with five flip flops, the maximal length sequence with a 31-bit period was obtained.
A maximal length sequence has the statistical properties expected of random bits, such as "an equal number of 1's and 0's", which is almost true, but not exactly possible with the odd number of bits L = 2N-1. The above sequence has 16 ones and 15 zeros. This difference is less important if N is very large.
What Circuits Give Maximal Length Sequences?
The circuit above essentially does polynomial division, giving a quotient which is periodic, much as in decimal we find 1/7 = 0.142857142857142857...
The sequential circuit is defined by the divisor, a polynomial P(x) which is reflected in the XOR gates in the circuit. Each coefficient in the polynomial describes a 'tap' connection to the shift registers. In the above circuit, the taps are 101111 and the polynomial describing this circuit is:
P(x) = x5 + x3 + x2 + x + 1
It is necessary to identify the polynomials which describe maximum length sequences.
1. The polynomial P(x) must be prime.
If a polynomial P(x) of degree N gives a maximum length sequence, the length will be L = 2N-1.
On the other hand, there are some prime polynomials which do not work here. A second distinction is necessary.
2. The polynomial P(x) must be a primitive prime.
For a prime P(x) to give a maximum length sequence of length L, P(x) must be a factor of xL+1 (and of no other smaller L). Such a prime is called primitive.
With P(x) = x5 + x3 + x2 + x + 1
The polynomial P(x) is prime.
We might expect a sequence of length L = 25-1 = 31.
With P(x) = x4 + x3 + x2 + x + 1
The polynomial P(x) is prime.
we might expect a sequence of length L = 24-1 = 15.
Question: What polynomials might give maximal length sequence of L=31?
Answer: Only prime polynomials of degree 5 need be considered, giving length L = 25-1 = 31.
Furthermore, only primitive polynomials will be used: those primes which which are factors of x31+1 and which are not factors of any smaller xL+1
The prime factors of x31+1 are: (Try it!)
Only these six prime factors of degree 5 could give sequences of length 31. They must each be checked to be certain they do not factor a smaller xL+1. In this case, all six of them do lead to a maximal length sequence.
Finally, note the symmetry between pairs of these six results. There are three pairs of polynomials which are mirror images of each other. This is another property of primitive primes.
See all prime polynomials from 0..511
Online Linear Recursive Sequence Tool
Mon May 20 02:46:53 ADT 2013
Last Updated: 23 NOV 2003
|Richard Tervo [ firstname.lastname@example.org ]||Back to the course homepage...|