Least Period of Linear Recurring Sequences over a Finite Field

Similar documents
Algebra Review 2. 1 Fields. A field is an extension of the concept of a group.

Reducibility of Polynomials over Finite Fields

Polynomials. Chapter 4

Rings. EE 387, Notes 7, Handout #10

Cyclic codes: overview

Chapter 4 Finite Fields

MTH310 EXAM 2 REVIEW

3. Coding theory 3.1. Basic concepts

ECEN 604: Channel Coding for Communications

School of Mathematics and Statistics. MT5836 Galois Theory. Handout 0: Course Information

Mathematical Olympiad Training Polynomials

Computing the Periods of Preimages in Surjective Cellular Automata

Finite Fields. Mike Reiter

Gauss s Theorem. Theorem: Suppose R is a U.F.D.. Then R[x] is a U.F.D. To show this we need to constuct some discrete valuations of R.

Homework 8 Solutions to Selected Problems

An algorithm for computing minimal bidirectional linear recurrence relations

Efficient random number generation on FPGA-s

Rings. Chapter 1. Definition 1.2. A commutative ring R is a ring in which multiplication is commutative. That is, ab = ba for all a, b R.

ELG 5372 Error Control Coding. Lecture 12: Ideals in Rings and Algebraic Description of Cyclic Codes

Finite Fields. Sophie Huczynska. Semester 2, Academic Year

Generator Matrix. Theorem 6: If the generator polynomial g(x) of C has degree n-k then C is an [n,k]-cyclic code. If g(x) = a 0. a 1 a n k 1.

Introduction to finite fields

An Approach to Hensel s Lemma

LECTURE NOTES IN CRYPTOGRAPHY

MATH 431 PART 2: POLYNOMIAL RINGS AND FACTORIZATION

Lecture 7: Polynomial rings

2a 2 4ac), provided there is an element r in our

Finite Fields. Saravanan Vijayakumaran Department of Electrical Engineering Indian Institute of Technology Bombay

7.1 Definitions and Generator Polynomials

Design of Pseudo-Random Spreading Sequences for CDMA Systems

RINGS: SUMMARY OF MATERIAL

Linear Feedback Shift Registers

SUMS OF SECOND ORDER LINEAR RECURRENCES THOMAS MCKENZIE AND SHANNON OVERBAY

The Berlekamp algorithm

Division of Trinomials by Pentanomials and Orthogonal Arrays

The Cyclic Decomposition Theorem

Information Theory. Lecture 7

Abstract Algebra: Chapters 16 and 17

Test 2. Monday, November 12, 2018

Outline. MSRI-UP 2009 Coding Theory Seminar, Week 2. The definition. Link to polynomials

COMPUTER ARITHMETIC. 13/05/2010 cryptography - math background pp. 1 / 162

1. Algebra 1.5. Polynomial Rings

+ 1 3 x2 2x x3 + 3x 2 + 0x x x2 2x + 3 4

PURELY PERIODIC SECOND ORDER LINEAR RECURRENCES

Class Notes; Week 7, 2/26/2016

Abstract Algebra, Second Edition, by John A. Beachy and William D. Blair. Corrections and clarifications

Quasi-reducible Polynomials

On Permutation Polynomials over Local Finite Commutative Rings

A family Of Cyclic Codes Over Finite Chain Rings

Fault Tolerance & Reliability CDA Chapter 2 Cyclic Polynomial Codes

Chapter 3. Rings. The basic commutative rings in mathematics are the integers Z, the. Examples

Groups, Rings, and Finite Fields. Andreas Klappenecker. September 12, 2002

Correlation of Binary Sequence Families Derived from Multiplicative Character of Finite Fields

Math 201C Homework. Edward Burkard. g 1 (u) v + f 2(u) g 2 (u) v2 + + f n(u) a 2,k u k v a 1,k u k v + k=0. k=0 d

Polynomial Rings. (Last Updated: December 8, 2017)

Elliptic Curves I. The first three sections introduce and explain the properties of elliptic curves.

Moreover this binary operation satisfies the following properties

MA257: INTRODUCTION TO NUMBER THEORY LECTURE NOTES

Algebra Homework, Edition 2 9 September 2010


On the Number of Trace-One Elements in Polynomial Bases for F 2

Course 2BA1: Trinity 2006 Section 9: Introduction to Number Theory and Cryptography

FILTERED RINGS AND MODULES. GRADINGS AND COMPLETIONS.

Mathematical Foundations of Cryptography

U + V = (U V ) (V U), UV = U V.

AN INTRODUCTION TO THE THEORY OF FIELD EXTENSIONS

Basic elements of number theory

Algebra Review. Instructor: Laszlo Babai Notes by Vincent Lucarelli and the instructor. June 15, 2001

Basic elements of number theory

Galois fields/1. (M3) There is an element 1 (not equal to 0) such that a 1 = a for all a.

MT5836 Galois Theory MRQ

A CONSTRUCTION FOR ABSOLUTE VALUES IN POLYNOMIAL RINGS. than define a second approximation V 0

55 Separable Extensions

Some approaches to construct MDS matrices over a finite field

Cyclic codes. Vahid Meghdadi Reference: Error Correction Coding by Todd K. Moon. February 2008

Linear Cyclic Codes. Polynomial Word 1 + x + x x 4 + x 5 + x x + x

Name: MAT 444 Test 4 Instructor: Helene Barcelo April 19, 2004

Information redundancy

Number Theory. Modular Arithmetic

CHAPTER I. Rings. Definition A ring R is a set with two binary operations, addition + and

A Mass Formula for Cyclic Self-Orthogonal Codes

CYCLOTOMIC POLYNOMIALS

Math 4310 Solutions to homework 7 Due 10/27/16

3.4. ZEROS OF POLYNOMIAL FUNCTIONS

Finite Fields and Error-Correcting Codes

Section September 6, If n = 3, 4, 5,..., the polynomial is called a cubic, quartic, quintic, etc.

Chapter 4. Remember: F will always stand for a field.

Lecture Notes Math 371: Algebra (Fall 2006) by Nathanael Leedom Ackerman

Reverse Berlekamp-Massey Decoding

University of Ottawa

CYCLOTOMIC POLYNOMIALS

Linear Cyclic Codes. Polynomial Word 1 + x + x x 4 + x 5 + x x + x f(x) = q(x)h(x) + r(x),

Parity of the Number of Irreducible Factors for Composite Polynomials

Mathematics for Cryptography

Polynomial Rings. i=0. i=0. n+m. i=0. k=0

On the Primitivity of Trinomials over Small Finite Fields

On the Primitivity of some Trinomials over Finite Fields

x n k m(x) ) Codewords can be characterized by (and errors detected by): c(x) mod g(x) = 0 c(x)h(x) = 0 mod (x n 1)

COMMUTATIVE RINGS. Definition 3: A domain is a commutative ring R that satisfies the cancellation law for multiplication:

Research Article Characterization and Enumeration of Good Punctured Polynomials over Finite Fields

Transcription:

Degree Project Least Period of Linear Recurring Sequences over a Finite Field 2012-02-29 Author: Sajid Hanif Subject: Mathematics Level: Master Course code: 5MA12E

Abstract This thesis deals with fundamental concepts of linear recurring sequences over the finite fields. The theory of linear recurrence sequences (LRS) over finite field has great importance in cryptography, electric engineering and pseudo-random number generators. Linear recurring sequences and polynomials over finite field F q are closely related. The least period of recurring sequences are discussed with the reducibility of corresponding characteristic polynomials. Few examples are constructed to find the least period of linear recurring sequences having reducible or irreducible characteristic polynomials. 2

Contents 1 Introduction 4 2 Preliminaries 4 3 Linear recurring sequences 5 3.1 Feedback Shift Register....................... 5 3.2 Periodicity of linear recurring sequences.............. 6 3.3 Impulse response sequences..................... 8 3.4 Characteristic polynomial...................... 9 4 Least period for irreducible characteristic polynomial 10 5 Least period for reducible characteristic polynomial 14 5.1 Algorithm for finding minimal polynomial m(x).......... 17 6 Mathematica code 21 7 Conclusion 22 8 Bibiliography 23 3

1 Introduction The applications such as spread-spectrum communications, security and encryption need the generation of random numbers. The most common way to implement a random number generator is a linear recurring sequence(lrs). In this project we will simulate the theory about linear recurring sequences given in chapter 6 of [1] and will focus that How can we find the least period of linear recurring sequences? In section 2 we will define field and finite field. In section 3 we will study the generation of linear recurring sequences on switching circuits called feedback shift registers and also will discuss its periodic properties [1, p. 190]. And we will discuss the term impulse response sequence, and its periodic relation with periodicity of linear recurring sequences[1, p. 197]. In section 4 we will study how to find the least period of linear recurring sequences having irreducible characteristic polynomial [1, p. 204] and will implement on some linear recurring sequences. In section 5 we will study how to deal with a linear recurring sequences having reducible characteristic polynomial. Here we will study minimal polynomial and will use it for finding least period of recurring sequences having reducible characteristic polynomials [1, p. 214] and will establish some examples. 2 Preliminaries In this section we are going to define field and finite field. Definition 2.1. A field (F, +, ) is a set F, together with two binary operations, denoted by + and such that: 1. F is an abelian group with respect to both (+) and ( ). 2. The distributive laws hold. That is, for all a,b,c F, we have, a.(b + c) = a.b + a.c and (b + c).a = b.a + c.a Example 2.1. The set of all real numbers R is a field. Definition 2.2. A field F is said to be a finite field if number of elements of field F are finite. A finite field can also be defined as: For a prime p, let F p be the set {1, 2,..., p 1} of integers and let φ : Z/(p) F p be the mapping defined by φ([a]) = a for a = 0, 1, 2,..., p 1. Where Z/(p) is residue class ring and [a] denotes the residue class of integer a, and φ is isomorphism. Then F p, endowed with the field structure induced by φ, is a finite field, called the Galois field of order p. Example 2.2. The most simple and most important example is the finite field F 2. It has two elements 0 and 1 and operation table has the following form: and 4

+ 0 1 0 0 1 1 1 0. 0 1 0 0 0 1 0 1 3 Linear recurring sequences In this section we will discuss about linear recurring sequences and we discuss how to generate linear recurring sequences on special switching circuit called feedback shift registers, how can we generate a periodic sequence by feedback shift registers? And we will discuss about impulse response sequence and properties of corresponding characteristic polynomial of a linear recurring relation. Definition 3.1. Let k be a positive integer, and let a, a 0, a 1,..., a k 1 be given elements of a finite field F q. A sequence s 0, s 1,... of elements of F q satisfying the relation s n+k = a k 1 s n+k 1 + a k 2 s n+k 2 +... + a 0 s n + a for n = 0, 1, 2,.... (3.1) is called a linear recurring sequence in F q with order k. Definition 3.2. If a = 0 in (3.1) then the linear recurrence relation is homogeneous otherwise the linear recurrence relation is inhomogeneous. And the sequence s 0, s 1,... itself is called a homogeneous or in homogeneous, linear recurring sequence in F q respectively. 3.1 Feedback Shift Register A feedback shift register is a special kind of electronic switching circuit handling information in the form of elements of F q. A feedback shift register consists of four types of devices. The first is an adder, which has two inputs and one output. The output being the sum in F q of two inputs. The second is a constant multiplier, which has one input and one output. The output being the product of input with a constant element in F q. The third is a constant adder, which is same as a constant multiplier, But adds a constant element of F q to the input. The fourth type is a delay element, which has one input and one output and is regulated by an external synchronous clock so that its input at a particular time seems as its output after one unit time. A feedback shift register is made by interconnecting a finite number of adders, constant multipliers, constant adders, and delay elements along a closed loop such that two outputs are never connected to each other. A feedback shift register that generates a linear recurring sequence satisfying (3.1) is shown in following example. 5

Example 3.1. Consider the following homogeneous linear recurrence relation. s n+6 = s n+5 + 2s n+4 + s n+1 + 3s n for n = 0, 1, 2,.... (3.2) The circuit diagram of this linear recurrence relation is shown in following figure. Figure 1: Feed back shift register for (3.2). Figure 2: The Building blocks of feedback shift registers. Adder, Constant multiplier by a, Constant adder for adding a, Delay element respectively. 3.2 Periodicity of linear recurring sequences Definition 3.3. Let S be an arbitrary non empty set, and let s 0, s 1,... be a sequence of elements of S. If there exist integers r > 0 and n 0 0 such that s n+r = s n for all n n 0, then the sequence is called ultimately periodic and r is called a period of the sequence.and the smallest number of all possible periods of an ultimately periodic sequence is called least period of the sequence. Lemma 3.1. Every period of an ultimately periodic sequence is divisible by the least period. [1, p. 193] Lemma 3.2. The sequence s 0, s 1,... is periodic if and only if there exists an integer r > 0 such that s n+r = s n for all n = 0, 1, 2,.... [1, p. 193] Theorem 3.3. Let F q be any finite field and k any positive integer. Then every kth-order linear recurring sequence in F q is ultimately periodic with least period r satisfying r q k, and r q k 1 if the sequence is homogeneous. [1, p. 193] Theorem 3.4. If s 0, s 1,... is a linear recurring sequence in a finite field satisfying the linearly recurrence relation (3.1), and if the coefficient a 0 in (3.1) is non zero, then the sequence s 0, s 1,... is periodic. [1, p. 194] 6

Definition 3.4. Let s 0, s 1,... be a kth-order linear recurring sequence in F q satisfying (3.1). If n is a non-negative integer, then after n time units the delay element D j = 0, 1,..., k 1 will contain s n+j. It is therefore natural to call the row vector s n = (s n, s n+1,..., s n+j 1 ) the nth state vector of the linear recurring sequence. The state vector s 0 = (s 0, s 1,..., s k 1 ) is also referred as the initial state vector. Example 3.2. Consider the linear recurrence relation s n+4 = s n+1 + s n, n = 0, 1,..., in F 2 with initial state vector (0,0,1,1). Here we have initial values s 0 = 0, s 1 = 0, s 2 = 1, s 3 = 1. Then, s 4 = s 1 + s 0 = 0 + 0 = 0. s 5 = s 2 + s 1 = 1 + 0 = 1. s 6 = s 3 + s 2 = 1 + 1 = 0. s 7 = s 4 + s 3 = 0 + 1 = 1. s 8 = s 5 + s 4 = 1 + 0 = 1. s 9 = s 6 + s 5 = 0 + 1 = 1. s 10 = s 7 + s 6 = 1 + 0 = 1. s 11 = s 8 + s 7 = 1 + 1 = 0. s 12 = s 9 + s 8 = 1 + 1 = 0. s 13 = s 10 + s 9 = 1 + 1 = 0. s 14 = s 11 + s 10 = 0 + 1 = 1. s 15 = s 12 + s 11 = 0 + 0 = 0. s 16 = s 13 + s 12 = 0 + 0 = 0. s 17 = s 14 + s 13 = 1 + 0 = 1. s 18 = s 15 + s 14 = 0 + 1 = 1. We obtain the string of binary digits 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1,... of least period 15. 7

3.3 Impulse response sequences We can isolate a homogeneous recurring sequence in F q satisfying a given kth order recurring relation such as (3.1), that yields the maximal value for the least period, in all possible homogeneous recurring sequences in F q. This is the impulse response sequence d 0, d 1,... indomitable distinctively by its initial values d 0 =... = d k 2 = 0, d k 1 = 1(d 0 = 1 if k = 1) and the linear recurrence relation d n+k = a k 1 d n+k 1 + a k 2 d n+k 2 +... + a 0 d n for n = 0, 1, 2,.... (3.3) Example 3.3. Consider the linear recurrence relation s n+3 = s n+1 + s n, n = 0, 1,..., in F 2 with initial state vector (0,0,1). Then, s 3 = s 1 + s 0 = 0 + 0 = 0. s 4 = s 2 + s 1 = 1 + 0 = 1. s 5 = s 3 + s 2 = 0 + 1 = 1. s 6 = s 4 + s 3 = 1 + 0 = 1. s 7 = s 5 + s 4 = 1 + 1 = 0. s 8 = s 6 + s 5 = 1 + 1 = 0. s 9 = s 7 + s 6 = 0 + 1 = 1. s 10 = s 8 + s 7 = 0 + 0 = 0. The impulse response sequence d 0, d 1,... corresponding to above recurrence relation is given by the string of binary digits 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0,... of least period 7. Figure 3: Feedback shift register for Example 3.3. Theorem 3.5. The least period of a homogeneous linear recurring sequence in F q divides the least period of the corresponding impulse response sequence. [1, p. 197] 8

Example 3.4. Consider the linear recurrence relation s n+5 = s n+1 + s n, n = 0, 1,..., in F 2. For least period of impulse response sequence we take (0, 0, 0, 0, 1) initial state vector and we will see that 21 is the least period of impulse response sequence. Now for least period of recurring sequence we may take (1, 1, 0, 1, 1) initial state vector and we will get 3 as the least period of recurring sequence and if we take (1, 1, 1, 0, 1) initial state vector then we get 7 as the least period of recurring sequence. It is clear that 3 and 7 divides 21. We may take all other possible initial state vectors but every time we will see that least period of recurring sequence divides least period of corresponding impulse sequence. By (Theorem 3.5) and above example we can make a conclusion about the relation between initial state vector and least period of recurring sequence that, If we take different initial state vectors for a linear recurring relation we will see that the least period of recurring sequence divides the least period of impulse response sequence. It means if least period of impulse response sequence is a prime number then every possible non zero initial state vector of that recurring relation gives the same least period equal to the least period of impulse response sequence. 3.4 Characteristic polynomial Definition 3.5. Let s 0, s 1,... be a kth-order homogeneous linear recurring sequence in F q satisfying the linear recurring relation s n+k = a k 1 s n+k 1 + a k 2 s n+k 2 +... + a 0 s n for n = 0, 1, 2,.... (3.4) where a j F q for 0 j k 1. The polynomial f(x) = x k a k 1 x k 1 a k 2 x k 2... a 0 F q (3.5) is called the characteristic polynomial of the linear recurring sequence. This polynomial depends on the given recurrence relation. Example 3.5. The characteristic polynomial of linear recurrence relation s n+6 = s n+5 + s n+4 + s n+3 + s n+1 + s n for n = 0, 1, 2,... F 2 is f(x) = x 6 + x 5 + x 4 + x 3 + x + 1. Theorem 3.6. Let s 0, s 1,... be a kth-order homogeneous linear recurring sequence in F q that satisfies the linear recurrence relation (3.4) and is periodic with period r. Let f(x) be the characteristic polynomial of the sequence. Then the identity f(x)s(x) = (x r 1)h(x), (3.6) holds with s(x) = s 0 x r 1 + s 1 x r 2 +... + s r 2 + s r 1 F q and k 1 h(x) = j=0 where we set a k = 1. [1, p. 201] k j 1 i=0 a i+j+1 s i x j F q. (3.7) 9

Definition 3.6. The smallest integer e for which polynomial f(x) divides x e 1 is called order of polynomial f(x). Theorem 3.7. Let s 0, s 1,... be a homogeneous linear recurring sequence in F q with characteristic polynomial f(x) F q [x]. Then the least period of the sequence divides ord(f(x)), and the least period of the corresponding impulse response sequence is equal to ord(f(x)). If f(x) = 0, then both sequences are periodic. [1, p. 203] 4 Least period for irreducible characteristic polynomial In this section we will discuss about the least period of recurring sequences having irreducible corresponding characteristic polynomials. Definition 4.1. A polynomial f F q [x] is said to be irreducible polynomial in F q [x] if f has a positive degree and f = ab with a, b F q [x] implies that either b or c a constant polynomial, where q is a field. To check the reducibility of a polynomial over the finite field we can use Berlekamp s algorithm or Zassenhaus algorithm. [3] Theorem 4.1. Let s 0, s 1,... be a homogeneous linear recurring sequence in F q with non zero initial state vector, and suppose the characteristic polynomial f(x) F q is irreducible over F q and satisfies f(0) = 0. Then the sequence is periodic with least period equal to ord(f(x)). [1, p. 203] Proof. By (Theorem 3.7) the sequence s 0, s 1,... is periodic and its least period r divides ord(f(x)). This implies that r ord(f(x)). Conversely from (3.6) f(x)s(x) = (x r 1)h(x), f(x) divides (x r 1)h(x). Since s(x) is a non zero polynomial, therefore h(x) is also a non zero polynomial. As f(x) is an irreducible characteristic polynomial of the recurring sequence and deg(h(x)) < deg(f(x)), therefore f(x) divides (x r 1). So, by definition of order of polynomial r ord(f(x). Hence least period r of recurring sequence is equal to ord(f(x)). Theorem 4.2. Let f(x) F q [x] be an irreducible polynomial over F q with deg(f(x)) = k. Then ord(f(x)) divides q k 1. [1, p. 204] Example 4.1. Consider the linear recurrence relation s n+3 = s n+1 + s n, n = 0, 1, 2,..., in F 2 [x]. The corresponding characteristic polynomial is f(x) = x 3 x 1 = x 3 + x + 1 F 2. The polynomial f(x) is irreducible over F 2. And order of f(x) is 7. And for 10

least period. s n+3 = s n+1 + s n. Take initial state vector (0, 1, 1). Then, s 3 = s 1 + s 0 = 1. So, the string of binary digits s 4 = s 2 + s 1 = 0. s 5 = s 3 + s 2 = 0. s 6 = s 4 + s 3 = 1. s 7 = s 5 + s 4 = 0. s 8 = s 6 + s 5 = 1. s 9 = s 7 + s 6 = 1. 0111001011... of least period 7. We can take (1, 1, 1), (1, 1, 0), (1, 0, 0) or (1, 0, 1) initial state vectors, but every time we will see 7 is the least period of above recurring relation. Example 4.2. Consider an other linear recurrence relation s n+5 = s n+4 + s n+2 + s n+1 + s n n = 0, 1, 2,..., in F 2. The corresponding characteristic polynomial is f(x) = x 5 + x 4 + x 2 + x + 1 in F 2 [x]. The polynomial f(x) is irreducible over F 2 and f(x) divides x 31 1 so, by definition of order of polynomial ord(f(x))=31. Now we will find the least period of this recurring sequence, for this s n+5 = s n+4 + s n+2 + s n+1 + s n. Take initial state vector (1, 1, 1, 1, 1). Then, s 5 = s 4 + s 2 + s 1 + s 0 = 0. s 6 = s 5 + s 3 + s 2 + s 1 = 1. s 7 = s 6 + s 4 + s 3 + s 2 = 0. s 8 = s 7 + s 5 + s 4 + s 3 = 0. s 9 = s 8 + s 6 + s 5 + s 4 = 0. s 10 = s 9 + s 7 + s 6 + s 5 = 1. s 11 = s 10 + s 8 + s 7 + s 6 = 0. 11

So, the string of binary digits s 12 = s 11 + s 9 + s 8 + s 7 = 0. s 13 = s 12 + s 10 + s 9 + s 8 = 1. s 14 = s 13 + s 11 + s 10 + s 9 = 0. s 15 = s 14 + s 12 + s 11 + s 10 = 1. s 16 = s 15 + s 13 + s 12 + s 11 = 0. s 17 = s 16 + s 14 + s 13 + s 12 = 1. s 18 = s 17 + s 15 + s 14 + s 13 = 1. s 19 = s 18 + s 16 + s 15 + s 14 = 0. s 20 = s 19 + s 17 + s 16 + s 15 = 0. s 21 = s 20 + s 18 + s 17 + s 16 = 0. s 22 = s 21 + s 19 + s 18 + s 17 = 0. s 23 = s 22 + s 20 + s 19 + s 18 = 1. s 24 = s 23 + s 21 + s 20 + s 19 = 1. s 25 = s 24 + s 22 + s 21 + s 20 = 1. s 26 = s 25 + s 23 + s 22 + s 21 = 0. s 27 = s 26 + s 24 + s 23 + s 22 = 0. s 28 = s 27 + s 25 + s 24 + s 23 = 1. s 29 = s 28 + s 26 + s 25 + s 24 = 1. s 30 = s 29 + s 27 + s 26 + s 25 = 0. s 31 = s 30 + s 28 + s 27 + s 26 = 1. s 32 = s 31 + s 29 + s 28 + s 27 = 1. s 33 = s 32 + s 30 + s 29 + s 28 = 1. s 34 = s 33 + s 31 + s 30 + s 29 = 1. s 35 = s 34 + s 32 + s 31 + s 30 = 1. 111110100010010101100001110011011111... of least period 31. And we will get same least period if we take other possible initial state vector. 12

Example 4.3. Consider the following recurrence relation s n+3 = s n+1 + 2s n n = 0, 1, 2,..., in F 3. The corresponding characteristic polynomial is f(x) = x 3 +2x+1 in F 3 [x]. The polynomial f(x) is irreducible over F 3 and f(x) divides x 26 1 so, by definition of order of polynomial ord(f(x))=26. Now we will find the least period of this recurring sequence, for this Take initial state vector (0, 1, 2). Then, s n+3 = s n+1 + 2s n. s 3 = s 1 + 2s 0 = 1. s 4 = s 2 + 2s 1 = 1. s 5 = s 3 + 2s 2 = 2. s 6 = s 4 + 2s 3 = 0. s 7 = s 5 + 2s 4 = 1. s 8 = s 6 + 2s 5 = 1. s 9 = s 7 + 2s 6 = 1. s 10 = s 8 + 2s 7 = 0. s 11 = s 9 + 2s 8 = 0. s 12 = s 10 + 2s 9 = 2. s 13 = s 11 + 2s 10 = 0. s 14 = s 12 + 2s 11 = 2. s 15 = s 13 + 2s 12 = 1. s 16 = s 14 + 2s 13 = 2. s 17 = s 15 + 2s 14 = 2. s 18 = s 16 + 2s 15 = 1. s 19 = s 17 + 2s 16 = 0. s 20 = s 18 + 2s 17 = 2. s 21 = s 19 + 2s 18 = 2. s 22 = s 20 + 2s 19 = 2. s 23 = s 21 + 2s 20 = 0. s 24 = s 22 + 2s 21 = 0. s 25 = s 23 + 2s 22 = 1. 13

s 26 = s 24 + 2s 23 = 0. s 27 = s 25 + 2s 24 = 1. s 28 = s 26 + 2s 25 = 2. So, the string of binary digits of least period 26. 01211201110020212210222001012... 5 Least period for reducible characteristic polynomial Now in this section we will discuss about the least period of recurring sequences having reducible characteristic polynomials. If f(x) F q [x] with deg(f(x)) = k is reducible, then ord(f(x)) need not divide q k 1. Consider f(x) = x 3 + x 2 + x + 1 F 2 [x]. Then f(x) is reducible since x 3 + x 2 + x + 1 = (x 2 + 1)(x + 1). And ord(f(x))=4, which is not a divisor of 2 4 1 = 15. So above example does not satisfy (Theorem 3.7). To overcome this problem we will use minimal polynomial for finding least period of recurring sequences having reducible characteristic polynomial. Given an arbitrary sequence s 0, s 1,... of elements of F q,we associate with it its generating function, which is purely formal expression of the type G(x) = s 0 + s 1 x + s 2 x 2 +... + s n x n +... = s n x n (5.1) with an indeterminate x. The idea is that in G(x) we have preserved all the terms of the sequence in the correct order, so that G(x)should reflect the properties of the sequence. Definition 5.1. For a characteristic polynomial f(x) of a recurring relation, we can defined its reciprocal characteristic polynomial as n=0 f (x) = 1 a k 1 x a k 2 x 2 a 0 x k F q [x]. (5.2) The characteristic polynomial f(x) and the reciprocal characteristic polynomial f (x) are related by f (x) = x k f( 1 ). (5.3) x 14

Theorem 5.1. Let s 0, s 1,... be a kth-order homogeneous linear recurring sequence in F q satisfying the linear recurrence relation (3.4), let f (x) F q [x] be its reciprocal characteristic polynomial, and let G(x) F q [x] be its generating function in (5.1). Then the identity holds with k 1 g(x) = G(x) = g(x) f (x). (5.4) j=0 i=0 j a i+k j s i x j F q [x], (5.5) where we set a k = 1. Conversely, if g(x) is any polynomial over F q with deg(g(x)) < k and if f (x) F q [x] is given by f (x) = 1 a k 1 x a k 2 x 2... a 0 x k F q [x], (5.6) then the formal power series G(x) F q [x] defined by (5.4) is the generating function of a kth-order homogeneous linear recurring sequence in F q satisfying the linear recurrence relation (3.4). [1, p. 211] Definition 5.2. A polynomial in which the coefficient of the term of highest degree is +1 and the coefficients of the other terms are integers is called monic polynomial. Theorem 5.2. Let s 0, s 1,... be a homogeneous linear recurring sequence in F q. Then there exists a uniquely determined monic polynomial m(x) F q [x] having the following property: a monic polynomial f(x) F q [x] of positive degree is a characteristic polynomial of s 0, s 1,... if and only if m(x) divides f(x). [1, p. 214] Proof. Let f 0 (x) F q [x] be the characteristic polynomial of a homogeneous linear recurrence relation satisfied by the sequence, and let h 0 (x) F q [x] be the polynomial in (3.7) determined by f 0 (x) and the sequence. If d(x) = gcd(f 0 (x), h 0 (x)) is the monic polynomial in F q [x], then we can write and f 0 (x) = m(x)d(x (5.7) h 0 (x) = b(x)d(x) (5.8) Where m(x), b(x) F q [x]. we will prove that m(x) is the required polynomial. Now let f(x) F q [x] be an arbitrary characteristic polynomial of the given sequence, and let h(x) F q [x] be the polynomial in (3.7) determined by f(x) and the sequence. By applying (Theorem 5.1), we obtain that the generating function G(x) of the sequence satisfies G(x) = g 0(x) f (x) = g(x) f (x) (5.9) 15

with g 0 (x) and g(x) determined by (5.5). Therefore g(x)f0 (x) = g 0 (x)f (x). Now from (5.5) g( 1 k 1 x ) = j a i+k j s i x j. and j=0 i=0 x k 1 g( 1 k 1 x ) = xk 1 k 1 = j=0 i=0 j=0 i=0 j a i+k j s i x j j a i+k j s i x k j 1 Put k j 1 = l then j = k l 1 and since j = 1, 2,, k 1, so l = k 1, k 2,, 1. Then we have x k 1 g( 1 k 1 x ) = l=0 k l 1 i=0 a i+l+1 s i x l. and using (3.7) we get x k 1 g( 1 ) = h(x). (5.10) x Now using (5.10) and (5.3) we have h(x)f 0 (x) = x deg(f(x)) 1 g( 1 x )xdeg(f0(x)) f 0 ( 1 x ) Therefore we have = x deg(f0(x)) 1 g 0 ( 1 x )xdeg(f(x)) f ( 1 x ) = h 0 (x)f(x). Since f 0 (x) = m(x)d(x) and h 0 (x) = b(x)d(x). Therefore (5.11) becomes h(x)f 0 (x) = h 0 (x)f(x) (5.11) h(x)m(x) = b(x)f(x). (5.12) and since m(x) and b(x) are relatively prime, this means that m(x) divides f(x). Conversely, suppose that f(x) is a monic polynomial with positive degree in F q [x]. And f(x) is divisible by m(x), so we have f(x) = m(x)c(x). Where c(x) F q [x]. Now in reciprocal polynomial form we have f (x) = m (x)c (x). Also from (5.12) we have h 0 (x)m(x) = b(x)f 0 (x) and using relation (5.10) and (5.3), we get g o (x)m (x) = x deg(f0(x)) 1 h 0 ( 1 x )xdeg(m(x)) m( 1 x ) 16

= x deg(m(x)) 1 b( 1 x )xdeg(f0(x)) f 0 ( 1 x ). Now in above relation first two factors including with negative sign becomes an other polynomial, let say a(x),here a(x) F q [x] and using (5.3) we arrive at g o (x)m (x) = a(x)f 0 (x). (5.13) From (5.13) and generating function described in (Theorem 5.1) and, we get Because f (x) = m (x)c (x). Since G(x) = g 0(x) f0 (x) = a(x) m (x). G(x) = a(x)c (x) m (x)c (x) = a(x)c (x) f. (x) deg(a(x)c (x)) = deg(a(x) + deg(c (x)) < deg(m(x)) + deg(c(x)) = deg(f(x)). Because f(x) = m(x)c(x). Now from the converse statement of (Theorem 5.1) f(x) is a characteristic polynomial of the sequence. and it is clear that m(x) is unique with desired properties. Definition 5.3. The uniquely determined polynomial m(x) over F q associated with the sequence s 0, s 1,... according to (Theorem 5.2) is called the minimal polynomial of the sequence. Theorem 5.3. Let s 0, s 1,... be a homogeneous linear recurrence sequence in F q with minimal polynomial m(x) F q [x]. Then the least period of the sequence is equal to ord(m(x)). [1, p. 216] 5.1 Algorithm for finding minimal polynomial m(x) To find the minimal polynomial of a homogeneous recurrence relation we will do following steps as we have done in (Theorem 5.2). 1. First we will find the characteristic polynomial f(x) according to recurrence relation. 2. Then we will expand the (3.7) to find the polynomial h(x). Here (s 0, s 1,..., s n ) is the initial state vector and a 0, a 1,..., a n are the coefficient of polynomial f(x). 3. After finding h(x), we will find d(x) = gcd(f(x), h(x)). 17

4. And then in the last we will get minimal polynomial m(x) by dividing f(x) by d(x). 5. In the end we will find the least period of m(x) and using (Theorem 5.3) we will get the least period of given linear recurring sequence. Example 5.1. Consider the recurrence relation s n+4 = s n+3 + s n+1 + s n n = 0, 1, 2,..., in F 2 The corresponding characteristic polynomial is f(x) = x 4 + x 3 + x + 1 in F 2 [x]. The polynomial f(x) is reducible in F 2 [x]. Since f(x) = (x + 1)(1 + x)(1 + x + x 2 ) for this polynomial first we will find minimal polynomial m(x) of f(x) by following method. For finding minimal polynomial we have to find the polynomial h(x). And we can find the coefficient of h(x) by using (3.7). k 1 h(x) = j=0 k j 1 i=0 a i+j+1 s i x j F q. If we take (s 0, s 1, s 2, s 3 ) = (1, 1, 0, 1) as initial state vector. and we have coefficient of polynomial f(x) as a 3 = 1, a 2 = 0, a 1 = 1, a 0 = 1 and deg f(x) = k = 4. So, a k = a 4 = 1 as described in (Theorem 3.6). Then, For j = 0 above relation gives For j = 1 For j = 2 For j = 3 4 1 a i+1 s i. i=0 = (1, 0, 1, 1)(1, 1, 0, 1) = 0. a i+2 s i. 3 1 x i=0 = x(0, 1, 1)(1, 1, 0) = x. a i+3 s i. x 2 2 1 i=0 = x 2 (1, 1)(1, 1) = 0. = x 3 (1)( 1) = x 3. Therefore by above calculation we get h(x) = x 3 + x = x 3 + x Now, F 2 [x]. 18

d(x) = gcd(f(x), h(x)) = x 2 + 1. and m(x) = f(x) d(x) = x2 + x + 1. and m(x) = x 2 + x + 1 satisfy the linear recurrence relation s n+2 = s n+1 + s n. since m(x) is irreducible and m(0) = 0 and ord(m(x)) = 3. Therefore by (Theorem 4.1) 3 is the least period of s n+2 = s n+1 + s n. And least period of s n+4 = s n+3 + s n+1 + s n will be 3 by (Theorem 5.3). Example 5.2. Consider an other recurrence relation s n+6 = s n+4 + s n+3 + s n n = 0, 1, 2,..., in F 2 The corresponding characteristic polynomial is f(x) = x 6 + x 4 + x 3 + 1 in F 2 [x]. Since f(x) = (x + 1)(x 5 + x 4 + x 3 + 1), therefore f(x) is reducible in F 2 [x]. So firstly we have to find minimal polynomial m(x) as we have done in previous example. For finding minimal polynomial we have to find the polynomial h(x). And we can find the coefficient of h(x) by using (3.7). k 1 h(x) = j=0 k j 1 i=0 a i+j+1 s i x j F q. If we take (s 0, s 1, s 2, s 3, s 4, s 5 ) = (1, 1, 0, 0, 1, 1) as initial state vector. and we have coefficient of polynomial f(x) as a 5 = 0, a 4 = 1, a 3 = 1, a 2 = 0, a 1 = 0, a 0 = 1 and deg f(x) = k = 6. So, a k = a 6 = 1 as described in (Theorem 3.6). Then, For j = 0 above relation gives For j = 1 For j = 2 5 a i+1 s i i=0 = (0, 0, 1, 1, 0, 1)(1, 1, 0, 0, 1, 1) = 1. 4 a i+1 s i x i=0 = (0, 1, 1, 0, 1)(1, 1, 0, 0, 1)x = x. 3 a i+1 s i x 2 i=0 = (1, 1, 0, 1)(1, 1, 0, 0)x 2 = 0. 19

For j = 3 For j = 4 For j = 5 2 a i+1 s i x 3 i=0 = (1, 0, 1)(1, 1, 0)x 3 = x 3. 1 a i+1 s i x 4 i=0 = (0, 1)(1, 1)x 4 = x 4. ( 1)(1)x 5 = x 5. Therefore by above calculation we get h(x) = x 5 + x 4 + x 3 + 1 F 2 [x]. Now, d(x) = gcd(f(x), h(x)) = x + 1. and m(x) = f(x) d(x) = x5 + x 4 + x 2 + x + 1. and m(x) = x 5 + x 4 + x 2 + x + 1 satisfy the linear recurrence relation s n+5 = s n+4 + s n+2 + s n+1 + s n. since m(x) is irreducible and m(0) = 0 and ord(m(x)) = 31.Therefore by (Theorem 4.1) 31 is the least period of s n+5 = s n+4 + s n+2 + s n+1 + s n. And least period of s n+6 = s n+4 + s n+3 + s n will be 31 by (Theorem 5.3). 20

6 Mathematica code (* The least period of impulse response sequence.*) (* Polynomil *) f[x] = xˆ6 + xˆ4 + xˆ2 + x + 1; (* Field *) F = 2; (* Degree of polynomial *) d = Exponent [f[x], x] 6 (* Recurrence relation according to polynomial *) a[n_] := a[n] = Mod [a[n + 1] + a[n + 2] + a[n + 4] + a[n + 9], F]; (* Initial state vector *) a [0] = 0; a [1] = 0; a [2] = 0; a [3] = 0; a [4] = 0; a [5] = 1; a [2] = 0 0 (* Least period *) lista = {}; Do[ AppendTo [ lista, a[k]], {k, 0, 6}] i = 1; lastpart = Take [ lista, -6]; While [ lastpart!= {0, 0, 0, 0, 0, 1}, AppendTo [ lista, a[i + 5]]; i ++; lastpart = Take [ lista, -6]]; i 22 (* Impulse response sequence *) lista {0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0,0, 0, 0, 0, 1} lastpart = Take [ lista, -6] {0, 0, 0, 0, 0, 1} 21

7 Conclusion By this project, now we have found two different corresponding ways for finding least period of linear recurring sequences having reducible or irreducible characteristic polynomials. If we have to find the least period of a linear recurring sequence having irreducible characteristic polynomial then instantly we will find order of that corresponding polynomial, which is the least period of that sequence by (Theorem 4.1). And if we have to find the least period of a linear recurring sequence having reducible characteristic polynomial then we will find minimal polynomial of that characteristic polynomial and use the further process as we have done in examples of section 5. This work will helpful in cryptography, radar and communication system, security systems and in many branches of electrical engineering. In all these applications the least period of recurring sequence has great importance. For example if we study the radar and communication system we have to use linear recurring sequence with least period r in order to measure the distance of an object or aircraft from the radar station. In this system the result will be accurate if we will use linear recurring sequences having long periods[2, p. 365]. 22

8 Bibiliography References [1] RUDOLF LIDL and HARALD NIEDERREITER. Introduction to finite fields and their applications. Cambridge university press,2000. [2] RUDULF LIDL and GUNTER PILZ. Applied abstract algebra. Springer, 1998. [3] Sajid Hanif and Muhammad Imran. Factorization Algorithms for Polynomials over Finite Fields. Linnæus university,2010. http://lnu.divaportal. org/smash/record.jsf?pid=diva2:414578. 23

SE-351 95 Växjö / SE-391 82 Kalmar Tel +46-772-28 80 00 dfm@lnu.se Lnu.se/dfm