Sei sulla pagina 1di 26

Digital Sequences

in Communication and Coding


Tuvi Etzion
Computer Science Department
Technion -Israel Institute of Technology
etzion@cs.technion.ac.il
Fall 2010
Lectures 2, 3 - Linear Shift Register Sequences
Tuvi Etzion - Computer Science Department, Technion Digital Sequences in Communication and Coding
Lectures 2, 3 - Outline

Finite elds and primitive polynomials

Generating function and characteristic polynomial

Periodicity of a sequence and the exponent of a polynomial

Pseudo Noise sequences

Cycles of shift registers

Shifts and decimation

Classication of sequences with period 2


n
1

Open problem
Tuvi Etzion - Computer Science Department, Technion Digital Sequences in Communication and Coding
Finite elds and primitive polynomials
Denition
A primitive polynomial of degree n over GF(p), p prime, is an
irreducible polynomial of degree n with coecient taken from
GF(p) whose root is a generator of the nite eld GF(p
n
).
Denition
A generator of the nite eld GF(p
n
) is called a primitive element
of GF(p
n
).
Tuvi Etzion - Computer Science Department, Technion Digital Sequences in Communication and Coding
Finite elds and primitive polynomials
Example
f (x) = x
4
+ x + 1 is an irreducible polynomial over GF(2). Let
be a root of f (x), i.e., f () =
4
+ + 1 = 0 and hence

4
= + 1.

2
1
3

2
1
3

2
1

0
0 0 0 1
5
0 1 1 0
10
0 1 1 1

1
0 0 1 0
6
1 1 0 0
11
1 1 1 0

2
0 1 0 0
7
1 0 1 1
12
1 1 1 1

3
1 0 0 0
8
0 1 0 1
13
1 1 0 1

4
0 0 1 1
9
1 0 1 0
14
1 0 0 1

7
=
6
= (
3
+
2
) =
4
+
3
=
3
+ + 1.

5
+
7
=
13
.

j
=
i +j
, where exponents are taken modulo 2
n
1.
Tuvi Etzion - Computer Science Department, Technion Digital Sequences in Communication and Coding
Finite elds and primitive polynomials
Denition
Let F an arbitrary nite eld with a unit element 1. The smallest
integer p such that 1 + 1 + + 1(p times)= 0 is the
characteristic of the eld.
Theorem (Fermat)
Every element of a nite eld F of order p
n
, p prime, satises
the identity

p
n
=
or equivalently is a root of the equation
x
p
n
= x .
Thus
x
p
n
x =

F
(x ) .
Tuvi Etzion - Computer Science Department, Technion Digital Sequences in Communication and Coding
Finite elds and primitive polynomials
Lemma
In any eld of characteristic p we have (x + y)
p
= x
p
+ y
p
.
Lemma
Let x
r
1 and x
s
1 be two polynomials over GF(p).
1. x
s
1 divides x
r
1 if and only if s divides r .
2. gcd(x
r
1, x
s
1) = x
d
1, where d = gcd(r , s).
Theorem
x
p
m
x is equal to the product of all monic polynomial, irreducible
over GF(p), whose degree divides m.
Tuvi Etzion - Computer Science Department, Technion Digital Sequences in Communication and Coding
Feedback shift registers
Tuvi Etzion - Computer Science Department, Technion Digital Sequences in Communication and Coding
Generating function and primitive polynomial
Denition
FSR
n
over GF(q) is linear if
f (x) =
n

i =1
c
i
x
n+1i
, c
i
GF(q)
Denition
LFSR
n
sequence {a
k
} satises a linear recursion
a
k
=
n

i =1
c
i
a
ki
, k = 0, 1, . . .
Tuvi Etzion - Computer Science Department, Technion Digital Sequences in Communication and Coding
Generating function and primitive polynomial
Denition
The generating function of {a
k
} is dened by
G(x) =

k=0
a
k
x
k
Denition
The characteristic polynomial of {a
k
} is dened by
c(x) = 1
n

i =1
c
i
x
i
Tuvi Etzion - Computer Science Department, Technion Digital Sequences in Communication and Coding
Generating function and primitive polynomial
Theorem (1)
Given a shift register sequence {a
0
, a
1
, . . .} with initial state
a
n
, a
n+1
, . . . , a
1
let
g(x) =
n

i =1
c
i
x
i
(a
i
x
i
+ a
i +1
x
i +1
+ + a
1
x
1
) .
Then, degree(g) n 1 and G(x) =
g(x)
c(x)
.
Tuvi Etzion - Computer Science Department, Technion Digital Sequences in Communication and Coding
Generating function and primitive polynomial
Proof.
G(X) =

k=0
a
k
x
k
=

k=0
_
n

i =1
c
i
a
ki
_
x
k
=
n

i =1
c
i
x
i

k=0
a
ki
x
ki
=
n

i =1
c
i
x
i

k=i
a
k
x
k
=
n

i =1
c
i
x
i
_
G(x) +
1

k=i
a
k
x
k
_
Therefore,
G(x) = G(x)
n

i =1
c
i
x
i
+
n

i =1
c
i
x
i
1

k=i
a
k
x
k
= G(x)
n

i =1
c
i
x
i
+ g(x)
G(x)
_
1
n

i =1
c
i
x
i
_
= g(x) = G(x) =
g(x)
1

n
i =1
c
i
x
i
=
g(x)
c(x)
.
Tuvi Etzion - Computer Science Department, Technion Digital Sequences in Communication and Coding
Generating function and primitive polynomial
g(x) =
n1

i =0
g
i
x
i
_

_
g
0
g
1
.
.
.
g
n2
g
n1
_

_
=
_

_
c
n
c
n1
c
2
c
1
0 c
n
c
3
c
2
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
0 0 c
n
c
n1
0 0 0 c
n
_

_
_

_
a
n
a
n+1
.
.
.
a
2
a
1
_

_
If c
n
= 0 then for every polynomial h(x) of degree less than n
there exists an initial state for which g(x) = h(x). This polynomial
is obtained by solving the related equation system.
Tuvi Etzion - Computer Science Department, Technion Digital Sequences in Communication and Coding
Generating function and primitive polynomial
A sequence of an FSR
n
is periodic with a period q
n
; for an
LFSR
n
we have q
n
1.
Denition
The exponent of a polynomial h(x) is the least integer e such that
h(x) | x
e
1
Theorem
If gcd(g(x), c(x)) = 1 then {a
k
} = e(c(x)).
Tuvi Etzion - Computer Science Department, Technion Digital Sequences in Communication and Coding
Generating function and primitive polynomial
Proof.
Since gcd(g(x), c(x)) = 1 it follows that g(x) = 0 and hence the
initial state is not the all-zero state.
1. By Theorem 1 we have
g(x)
c(x)
= G(x) =

k=0
a
k
x
k
=
_
1

k=0
a
k
x
k
__

i =0
x
i
_
=
A(x)
1 x

Hence, g(x)(1 x

) = c(x)A(x). Since gcd(g(x), c(x)) = 1


it follows that c(x) divides 1 x

, i.e., e(c(x)) {a
k
}.
2. Dene (x) g(x)
1x
e
c(x)
=

e1
k=0

k
x
k
.

k=0
a
k
x
k
= G(x) =
g(x)
c(x)
=
(x)
1 x
e
= (x)

i =0
x
ie
,
and hence {a
k
} e(c(x)).
Thus, {a
k
} = e(c(x)).
Tuvi Etzion - Computer Science Department, Technion Digital Sequences in Communication and Coding
Generating function and primitive polynomial
Corollary
If c(x) is an irreducible polynomial then the period of {a
k
} is the
same for each initial state, except for the all-zero state.
Corollary
If a sequence has an irreducible characteristic polynomial, over
GF(q), of degree n, then the period of the sequence is a factor of
q
n
1.
Corollary
If 2
n
1 is a prime then every irreducible polynomial of degree n
corresponds to a shift register sequence of maximum length 2
n
1.
Tuvi Etzion - Computer Science Department, Technion Digital Sequences in Communication and Coding
Pseudo Noise sequences
Theorem
If the period of an LFSR
n
sequence is q
n
1 then its characteristic
polynomial is irreducible.
Proof
Since the sequence examines all the q
n
1 nonzero states before it
return to the initial state, each nonzero n-tuple appears as a
window of length n in the sequence. Hence, we can choose the
n-tuple (10 0) as the initial state. Therefore, g(x) = 1,
gcd(g(x), c(x)) = 1, and the period of the sequence q
n
1 is the
exponent of c(x).
Tuvi Etzion - Computer Science Department, Technion Digital Sequences in Communication and Coding
Pseudo Noise sequences
Proof.
Assume that c(x) is a reducible polynomial, i.e., c(x) = s(x)t(x),
where gcd(s(x), t(x)) = 1 and hence there exist two polynomials
(x) and (x) for which (x)t(x) +(x)s(x) = 1. Hence,
1
c(x)
=
(x)
s(x)
+
(x)
t(x)
Assume s(x), t(x), have degrees n
1
> 0, n
2
> 0, respectively,
where n = n
1
+ n
2
.
(x)
s(x)
is power series with period
1
at most
q
n
1
1.
(x)
t(x)
is power series with period
2
at most q
n
2
1.
Hence,
1
c(x)
=
(x)
s(x)
+
(x)
t(x)
is a power series with period equal to
the least common multiplier of
1
and
2
. This least common
multiplier is at most (q
n
1
1)(q
n
2
1) < q
n
1, a contradiction;
and thus c(x) is irreducible.
Remark: If c(x) = (s(x))
2
then e(c(x)) = 2e(s(x)).
If c(x) = (s(x))

(home assignment).
Tuvi Etzion - Computer Science Department, Technion Digital Sequences in Communication and Coding
Pseudo Noise sequences
Denition
A sequence whose characteristic polynomial is primitive is called an
M-sequence (for maximal length) or a PN sequence (for pseudo
noise).
For an M-sequence {a
k
} we denes
A
0
= (a
0
a
1
. . . a
1
),
0
= (a
0
a
1
. . . a
n1
)
A
k
= (a
k
a
k+1
. . . a
1
a
0
. . . a
k1
),
k
= (a
k
a
k+1
. . . a
k+n1
),
for 0 k < .
Tuvi Etzion - Computer Science Department, Technion Digital Sequences in Communication and Coding
Pseudo Noise sequences
Denition
The companion matrix for
c(x) = x
n
c(x
1
) = x
n

i =1
c
i
x
ni
= x
n

n1

i =0
c
ni
x
i
is dened by
C =
_

_
0 0 0 c
n
1 0 0 c
n1
0 1 0 c
n2
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
0 0 1 c
1
_

_
a
k
=
n

i =1
c
i
a
ki
=
k+1
=
k
C =
k
=
0
C
k
for each 0 k < .
Tuvi Etzion - Computer Science Department, Technion Digital Sequences in Communication and Coding
Pseudo Noise sequences
Let be a root of c(x) = x
n

n1
i =0
c
ni
x
i
and let
_

k
_
=
_
_
_
_
_
b
0
b
1
.
.
.
b
n1
_
_
_
_
_
the representation of
k
by the basis 1, ,
2
, . . . ,
n1
, i.e.,

k
=
n1

i =0
b
i

i
.
Therefore,

k+1
=

n1
i =0
b
i

i +1
=

n1
i =1
b
i 1

i
+ b
n1

n1
i =0
c
ni

i
= b
n1
c
n
+

n1
i =1
(b
i 1
+ b
n1
c
ni
)
i
. It implies that
(
k+1
) = C(
k
) for every 0 k < . If u = (1, 0, . . . , 0)
T
then
(
k
) = C
k

0
= C
k
u.
Tuvi Etzion - Computer Science Department, Technion Digital Sequences in Communication and Coding
Pseudo Noise sequences
Lemma
The powers of C are closed under addition.
Proof.
_

k
_
= C
k
u =
__

k
__

k+1
_

_

k+n1
__
= C
k
Therefore,

i
+
j
=

=
i +k
+
j +k
=
+k
= C
i
+ C
j
= C

Tuvi Etzion - Computer Science Department, Technion Digital Sequences in Communication and Coding
Pseudo Noise sequences
Theorem
The mapping dened by (
i
) = C
i
for 0 i < and
(0
n
) = [0] is an isomorphism.
Proof.
(
i
+
j
) = (

) = C

= C
i
+ C
j
= (
i
) +(
j
) .
(
i

j
) = (
i +j
) = C
i +j
= C
i
C
j
= (
i
)(
j
) .
Corollary
The set {0
n
}

{
k
}
1
k=0
with vector addition and multiplication
dened by
0
n
= 0
n

k
=
k
0
n
= 0
n
0
n
, 0 k <

i

j
=
j

i
=
i +j
, 0 i , j <
is isomorphic to GF( + 1).
Tuvi Etzion - Computer Science Department, Technion Digital Sequences in Communication and Coding
Pseudo Noise sequences
Corollary
The set {0

{A
k
}
1
k=0
with vector addition and multiplication
dened by
0

= 0

A
k
= A
k
0

= 0

, 0 k <
A
i
A
j
= A
j
A
i
= A
i +j
, 0 i , j <
is isomorphic to GF( + 1).
Corollary
For a given two distinct cyclic shifts A
i
, A
j
, of a PN sequence we
have A
i
+ A
j
= A
k
(the shift-and-add property).
Corollary
The period of an LFSR
n
over GF(q) is = q
n
1 for each
nonzero initial state if and only if c(x) is a primitive polynomial.
Tuvi Etzion - Computer Science Department, Technion Digital Sequences in Communication and Coding
Pseudo Noise sequences
R-1. In every period, the number of +1s is nearly equal to the
number of -1s. (More precisely, the disparity is not to exceed
1. Thus |

p
n=1
a
n
| 1.)
R-2. In every period, half the runs have length one, one-fourth have
length two, one-eighth have length three, etc., as long as the
number of runs so indicated exceeds 1. Moreover, for each of
these lengths, there are equally many runs of +1s and of -1s.
R-3. The auto-correlation function C() is two-valued. Explicitly
p C() =
p

n=1
a
n
a
n+
=
_
p if = 0
K if 0 < < p
Theorem
A binary M-sequence S satises R-1, R-2, and R-3, when 0 is
replaced by +1 and 1 is replaced by -1.
Tuvi Etzion - Computer Science Department, Technion Digital Sequences in Communication and Coding
Pseudo Noise sequences
Proof.
First we note that each n-tuple except for 0
n
appears exactly once
in a period of S.
R-1 is implied since S has 2
n1
values of -1s and 2
n1
1 of +1s.
R-2 = let r

denote the number of run of length in S. Since


the number of n-tuples starting with 01

0 (10

1),
1 n 2, is 2
nk2
, it follows that r

= 2
n1
for
1 n 2, r
n1
= r
n
= 1 and hence the total number of
runs is 2
n1
.
R-3 is implied by the shift-and-add property, yielding K = 1.
Tuvi Etzion - Computer Science Department, Technion Digital Sequences in Communication and Coding
Cycles of shift registers
Theorem
For any n 1 and for each prime power q, and 1 k q
n
, there
exists a feedback shift register of order n over GF(q) which
generates a cycle of length k.
Proof.
If k = q
n
we can join to a PN sequence of length q
n
1 the cycle
[0
n
] between the states
0
= (10 0) and
1
= (0 0c
n
).
If 1 k < q
n
1 we have
k
1 =
t
=
kt
= 1 +
t
and
hence
kt
=
0
+
t
. Since
0
= (10 0) it follows that
t
and
kt
are conjugate states. Therefore, the consecutive states

t+1
,
t+2
, . . . ,
kt
form a cycle of length k.
Tuvi Etzion - Computer Science Department, Technion Digital Sequences in Communication and Coding

Potrebbero piacerti anche