Finite fields. and we ve used it in various examples and homework problems. In these notes I will introduce more finite fields

Similar documents
1 Generalization bounds based on Rademacher complexity

Lecture 21. Interior Point Methods Setup and Algorithm

Lecture 21 Principle of Inclusion and Exclusion

Support Vector Machines MIT Course Notes Cynthia Rudin

Ph 20.3 Numerical Solution of Ordinary Differential Equations

16 Independence Definitions Potential Pitfall Alternative Formulation. mcs-ftl 2010/9/8 0:40 page 431 #437

Page 1 Lab 1 Elementary Matrix and Linear Algebra Spring 2011

Lesson 24: Newton's Second Law (Motion)

Note-A-Rific: Mechanical

The Weierstrass Approximation Theorem

Some Perspective. Forces and Newton s Laws

3.8 Three Types of Convergence

Feature Extraction Techniques

Math 1600A Lecture 3, Section 002

Chapter 6 1-D Continuous Groups

CHARACTER SUMS AND RAMSEY PROPERTIES OF GENERALIZED PALEY GRAPHS. Nicholas Wage Appleton East High School, Appleton, WI 54915, USA.

8.1 Force Laws Hooke s Law

Congruences and Modular Arithmetic

1 Bounding the Margin

Ocean 420 Physical Processes in the Ocean Project 1: Hydrostatic Balance, Advection and Diffusion Answers

Donald Fussell. October 28, Computer Science Department The University of Texas at Austin. Point Masses and Force Fields.

1 Proof of learning bounds

Reed-Muller Codes. m r inductive definition. Later, we shall explain how to construct Reed-Muller codes using the Kronecker product.

Kinematics and dynamics, a computational approach

Egyptian Mathematics Problem Set

Block designs and statistics

arxiv: v1 [math.nt] 14 Sep 2014

Model Fitting. CURM Background Material, Fall 2014 Dr. Doreen De Leon

Polygonal Designs: Existence and Construction

ma x = -bv x + F rod.

MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.436J/15.085J Fall 2008 Lecture 11 10/15/2008 ABSTRACT INTEGRATION I

This model assumes that the probability of a gap has size i is proportional to 1/i. i.e., i log m e. j=1. E[gap size] = i P r(i) = N f t.

Problem Set 2. Chapter 1 Numerical:

One Dimensional Collisions

A Note on Scheduling Tall/Small Multiprocessor Tasks with Unit Processing Time to Minimize Maximum Tardiness

Chaotic Coupled Map Lattices

26 Impulse and Momentum

ROTH S THEOREM ON ARITHMETIC PROGRESSIONS

a a a a a a a m a b a b

USEFUL HINTS FOR SOLVING PHYSICS OLYMPIAD PROBLEMS. By: Ian Blokland, Augustana Campus, University of Alberta

i ij j ( ) sin cos x y z x x x interchangeably.)

MULTIPLAYER ROCK-PAPER-SCISSORS

Probability and Stochastic Processes: A Friendly Introduction for Electrical and Computer Engineers Roy D. Yates and David J.

Module #1: Units and Vectors Revisited. Introduction. Units Revisited EXAMPLE 1.1. A sample of iron has a mass of mg. How many kg is that?

Characterization of the Line Complexity of Cellular Automata Generated by Polynomial Transition Rules. Bertrand Stone

M098 Carson Elementary and Intermediate Algebra 3e Section 11.1

lecture 36: Linear Multistep Mehods: Zero Stability

27 Oscillations: Introduction, Mass on a Spring

Dimensions and Units

Intelligent Systems: Reasoning and Recognition. Perceptrons and Support Vector Machines

Fast Montgomery-like Square Root Computation over GF(2 m ) for All Trinomials

Kinetic Theory of Gases: Elementary Ideas

NB1140: Physics 1A - Classical mechanics and Thermodynamics Problem set 2 - Forces and energy Week 2: November 2016

Non-Parametric Non-Line-of-Sight Identification 1

A Division Algorithm Using Bisection Method in Residue Number System

COS 424: Interacting with Data. Written Exercises

Bisection Method 8/11/2010 1

Chem/Biochem 471 Exam 3 12/18/08 Page 1 of 7 Name:

2 Q 10. Likewise, in case of multiple particles, the corresponding density in 2 must be averaged over all

Kinetic Theory of Gases: Elementary Ideas

Handout 7. and Pr [M(x) = χ L (x) M(x) =? ] = 1.

Physics 139B Solutions to Homework Set 3 Fall 2009

Kernel Methods and Support Vector Machines

On Certain C-Test Words for Free Groups

Introduction to Discrete Optimization

ALGEBRA REVIEW. MULTINOMIAL An algebraic expression consisting of more than one term.

Lecture 8 Symmetries, conserved quantities, and the labeling of states Angular Momentum

I. Understand get a conceptual grasp of the problem

National 5 Summary Notes

NUMERICAL MODELLING OF THE TYRE/ROAD CONTACT

arxiv:math/ v1 [math.nt] 6 Apr 2005

. The univariate situation. It is well-known for a long tie that denoinators of Pade approxiants can be considered as orthogonal polynoials with respe

PHY307F/407F - Computational Physics Background Material for Expt. 3 - Heat Equation David Harrison

A DISCRETE ZAK TRANSFORM. Christopher Heil. The MITRE Corporation McLean, Virginia Technical Report MTR-89W00128.

Birthday Paradox Calculations and Approximation

Force and dynamics with a spring, analytic approach

The Euler-Maclaurin Formula and Sums of Powers

The Fundamental Basis Theorem of Geometry from an algebraic point of view

TABLE FOR UPPER PERCENTAGE POINTS OF THE LARGEST ROOT OF A DETERMINANTAL EQUATION WITH FIVE ROOTS. By William W. Chen

13 Harmonic oscillator revisited: Dirac s approach and introduction to Second Quantization

THE POLYNOMIAL REPRESENTATION OF THE TYPE A n 1 RATIONAL CHEREDNIK ALGEBRA IN CHARACTERISTIC p n

Massachusetts Institute of Technology Quantum Mechanics I (8.04) Spring 2005 Solutions to Problem Set 4

First of all, because the base kets evolve according to the "wrong sign" Schrödinger equation (see pp ),

A note on the multiplication of sparse matrices

Ch 12: Variations on Backpropagation

Principal Components Analysis

Midterm 1 Sample Solution

ORIGAMI CONSTRUCTIONS OF RINGS OF INTEGERS OF IMAGINARY QUADRATIC FIELDS

Bloom Filters. filters: A survey, Internet Mathematics, vol. 1 no. 4, pp , 2004.

Lean Walsh Transform

Arithmetic Unit for Complex Number Processing

Handout 6 Solutions to Problems from Homework 2

Soft Computing Techniques Help Assign Weights to Different Factors in Vulnerability Analysis

Principles of Optimal Control Spring 2008

Introduction to Optimization Techniques. Nonlinear Programming

Analysis of Polynomial & Rational Functions ( summary )

Uniform Approximation and Bernstein Polynomials with Coefficients in the Unit Interval

One-to-one functions and onto functions

THE KALMAN FILTER: A LOOK BEHIND THE SCENE

Homotopy Analysis Method for Solving Fuzzy Integro-Differential Equations

Transcription:

Finite fields I talked in class about the field with two eleents F 2 = {, } and we ve used it in various eaples and hoework probles. In these notes I will introduce ore finite fields F p = {,,...,p } for every prie nuber p. I ll say a little about what linear algebra looks like over these fields, and why you ight care. First proble is the definition. One of the basic features of what you learned about in eleentary school about adding and ultiplying integers is that the last digit of the answer only depends on the last digits in the proble. So if I try to tell you that 27 38 = 28, you know iediately that there s a proble: because 7 8 = 56, the answer ust end in 6. In this way we can define addition and ultiplication odulo ten. Definition. Suppose a 9 and b 9 are integers. Choose any positive integers A and B with last digits a and b respectively. Write for the last digit of X = A +B, and y for the last digit of Y = A B. Then addition and ultiplication odulo are defined by a + b =, a b = y. Write Z/Z for the set {,,..., 9} endowed with this addition and ultiplication. If the contet akes the unabiguous, one usually writes just + and for addition and ultiplication odulo. The content of the definition is that the su and product odulo ten are welldefined. Then we could say for eaple because 3 29 = 377, 3 9 = 7. It s an eleentary algebra eercise to check that addtion and ultiplication are really well-defined (that is, independent of the choices of A and B); I won t do that. The coutative, associative, and distributive laws are all inherited fro Z, so they are true in Z/Z. The eleent is an additive identity, and additive inverses eist; and is a ultiplicative identity. The only aio for a field that is issing is the eistence of ultiplicative inverses. Soe of these inverses eist, even for eleents having no ultiplicative inverse in Z: for eaple 3 7 =, so 7 is a ultiplicative inverse of 3 in Z/Z. But there is trouble right here in River City: 2 5 =, and it follows easily that the nonzero eleents 2 and 5 have no ultiplicative inverses. (Can you tell which eleents of Z/Z do have ultiplicative inverses?) So Z/Z is not a field. There was nothing special about in this discussion. If n is any integer greater than, we can ake

2 Definition 2. Suppose a < n and b < n are integers. Choose any positive integers A and B with last digits in base n equal to a and b respectively. (This eans that the reainder when A is divided by n is equal to a.) Write for the last base n digit of X = A + B, and y for the last base n digit of Y = A B. Then addition and ultiplication odulo n are defined by a + n b =, a n b = y. Another way to say this is that is the reainder when a +b (or A +B) is divided by n; and y is the reainder when a b (or A B) is divided by n. Write Z/nZ for the set {,,...,n } endowed with this addition and ultiplication. The addition and ultiplication in Z/nZ are coutative and associative and distributive, and we have identities = and additive inverses. (The reason = is that we are assuing n >.) The only question (for deciding whether Z/nZ is a field) is whether nonzero eleents have ultiplicative inverses. Theore 3. With the addition and ultiplication just defined, Z/nZ is a field if and only if n is a prie nuber. Proof. Suppose first that n is not prie: say n = r s, with < r,s < n. Then r n s =, and it follows easily that r and s cannot have ultiplicative inverses odulo n. So Z/nZ is not a field. Now assue that n = p is a prie nuber. We can t ake countereaples in this way, but there could be a ore subtle reason for Z/pZ not to be a field: we need to prove that every nonzero eleent of Z/pZ really has a ultiplicative inverse. A basic fact about prie nubers and ultiplication of integers is if and y are integers not divisible by p, then y is not divisible by p. In ters of ultiplication in Z/pZ, this eans if and y are nonzero in Z/pZ, then p y is not zero. Using the distributive law, we can translate this forulation to if = Z/pZ and z = z Z/pZ, then p z = p z. That is, if is not zero in Z/pZ, then the p ultiples of { p, p, p 2,... p (p )} ust all be distinct. Therefore they ust be all of the p eleents of Z/pZ. In particular, one of the ust be equal to : there is a z with p z =. This eleent z is the ultiplicative inverse of. QED The field Z/pZ is called F p. Here is a result which connects finite fields with counting probles, and is one of the reasons they are so interesting. Theore 4. Suppose V is an -diensional vector space over F p. a) The cardinality of V is V = p. Suppose T :V W is a linear ap. Write n for the diension of the null space of T, and r for the diension of the range.

3 r b) The cardinality of the range of T is p. n c) The preiage of every vector in the range of T has p eleents. r n This ehibits V as the union of p disjoint pieces, each of size p ; so V has r n n+r p p = p = p eleents, (where n + r = is Theore 3.4 in the tet). So what finite fields can eist? Suppose F is any finite field. Start with the eleent F and add F repeatedly, getting a string,, +, ++, +++,... of eleents of F. The first two eleents are distinct because of the aio = for a field. But the field is finite, so the string has to repeat itself eventually. It isn t hard to see that the string ust be periodic of soe period n > : that the first n ters (which could naturally be called (,, 2,...,n )) are all distinct, and then (n )+ =, and the sequence repeats. The nuber n defined in this way is called the characteristic of the finite field F. It s not hard to see Theore 5. Suppose n is the characteristic of the finite field F. Then F contains Z/nZ, with the addition and ultiplication given in Definition 2. In particular (because F has ultiplicative inverses) the characteristic ust be a prie nuber p, and so F contains F p. The field F is then a vector space of soe positive (since = ) diension over F p ; so F = p. This uch is easy. What s a bit ore subtle is Theore 6. Suppose p is a prie nuber, is a positive integer, and q = p. Then there is (up to isoorphis) eactly one field F q having p eleents. Neither the eistence nor the uniqueness of F q is obvious. Here are the addition and ultiplication tables for F 4 = {,,, +}. + + + + + Addition in F 4 + + + + + + + Multiplication in F 4

4 Coputing in finite fields Addition and ultiplication in F p can be done using the algoriths for Z, followed by coputing the reainder after division by p. In order to do linear algebra, you also need to be able to invert eleents of F p. Theproofaboveof theeistence of ultiplicative inverses isnot constructive. Ifyou want to write a progra to do linear algebra in F 37972, you don t want to calculate the inverse of 7 by trying all 37972 nonzero eleents of the field. One way to proceed is using the (etended) Euclidean algorith. This requires approiately logp steps, in each of which the ost coplicated is a division-with-reainder of integers saller than p (a calculation requiring a soe ultiple of log p steps). This could be a reasonable way to calculate inverses for p of size around 2 32 or 2 64. For uch larger pries, the division-with-reainder steps can slow things down enough that other tricks are useful. There is a (not very difficult) theore saying that if = a F q, then q 2 a = a. So you can copute the inverse as a power. At first glance this looks slow, since it asks for q 3 ultiplications. But the right way to copute powers is to copute the 2 k powers using k+ k k a 2 = a 2 a 2 ; so log 2 q ultiplications to copute all of the 2 k powers of a for 2 k q 2. Now 2 write q 2 in base 2, and ultiply together the a k for k corresponding to the nonzero bits in q 2: for eaple, 25 6 8 a = a a a. This is about log 2 q additional ultiplications, for a total of 2log 2 q ultiplications in F q to copute a. At first glance this looks coparable to the Euclidean algorith in speed, but I don t know anything about practice. For relatively sall finite fields (I ve seen this done with q 2 8 ) you can ake a double array of values of + and, and do arithetic by looking up eleents of the array. Why do this? Iknow of two copletely different reasons. First, any problesin atheatics concern integers: how any integer solutions are there to soe equation? An integer solution autoatically provides a solution in Z/nZ for every positive integer n, and in particular a solution in F p for every prie nuber p. So people study equations in F p and try to use what they learn to say soething about integer solutions. This idea has been fantastically successful, in etreely surprising ways. (My own research involves soe differential equations that can arise fro quantu echanics; I try to understand what kinds of solutions those equations can have atheatically, in the hope that the atheatically interesting solutions ight have soe eaning in physics. The best answers to those questions that we know involve counting solutions over finite fields.) Yogi Berra said, In theory there is no difference between theory and practice. In practice there is.

A second reasonis just asatrick forcoputational efficiency: coputations with big integers can be replaced by (ore) coputations with sall integers, saving eory. Here is an eaple. Suppose you want to solve a linear algebra proble (like a syste of a hundred siultaneous equations in a hundred unknowns, with integer coefficients). Suppose you know that all the (ten thousand) coefficients in your equations are saller than 2 63, and that your hundred integer solutions are all saller than 2 63. You need 8 bytes of eory for each of the, coefficients, and 8 for each of the solutions: 8, 8 bytes of eory altogether. (That s not so uch, but you can change to a billion if you like.) Here s another way to proceed. Solve these sae equations in Z/nZ, for each of the nine values n = 229, 233, 239, 24, 247, 25, 253, 255, 256. At each step, each nuber in your calculation is saller than 256, and so fits in one byte of eory; so the calculation requires just, bytes of eory (saving a factor of eight). Because the arithetic involves saller nubers, you can hope that each calculation is faster than the original with 8-byte integers; but in any case you ve slowed down by no worse than a factor of nine. At the end, your nine solutions in Z/nZ can be cobined by the Chinese Reainder Theore to give a solution in Z/NZ, where N = 229 233 239 24 247 25 253 255 256. This cobined solution is the reduction odule N of the actual integer solution you wanted. Because N > 2 64, there is no reduction: you have found an eact integer solution of your proble. So you have anaged to reduce your use of eory by a factor of 8 at the cost of increasing tie by a factor of about 9 (or less if you can do sall arithetic faster). This is soeties a good bargain. 5

MIT OpenCourseWare http://ocw.it.edu 8.7 Linear Algebra Fall 23 For inforation about citing these aterials or our Ters of Use, visit: http://ocw.it.edu/ters.