Global Optimization in Type Theory. Roland Zumkeller

Size: px
Start display at page:

Download "Global Optimization in Type Theory. Roland Zumkeller"

Transcription

1 Global Optimization in Type Theory Roland Zumkeller

2

3 revision 3

4

5 In memory of my grandfather Wolfgang Merkel 5

6

7 Contents Thank You! 9 List of Figures 11 Introduction 13 Chapter 1. Preliminaries Type Theory Lists Polynomials 21 Chapter 2. Numbers Integers Dyadics Rationals Reals 42 Chapter 3. Intervals Arithmetic Irrational Functions The Dependency Problem Branch and Bound 54 Chapter 4. Bernstein Polynomials The Bernstein Bases Differentiation and Integration Bounding Several Variables Examples 74 Chapter 5. Function Sets Taylor Models Chebyshev Balls Polynomial Models 90 Conclusion 95 Appendix A. Flyspeck 97 Appendix B. CoRN 101 When Strong Extensionality is Too Strong 101 Bibliography 105 Index 109 Errata and Changes 111 7

8

9 Thank You! I m deeply indebted to many people without whom this thesis would never have seen daylight. First I would like to thank Gilles Dowek for his class on programming languages at Polytechnique and encouraging me to undertake graduate studies. His clear way of both answering and asking questions has always been a model for me and tremendously stimulated my interest in academic research. Many thanks are due to my advisor, Benjamin Werner, whose comments and moral support were essential to me. Among many other lessons, he taught me that there is always a shorter, more elegant, way of saying things. Thanks to Thomas Hales for patiently answering many questions about his proof of the Kepler conjecture. His work gave the original motivation for this thesis and I m deeply honoured that he accepted to be on the committee. Thanks to Tobias Nipkow, who let me work in his team at TU Munich as an undergraduate student. He introduced me not only to the pleasures of functional programming, but also allowed me a first glance at formal proofs. Thanks to Bruno Barras and Hugo Herbelin for having kept their office doors always open. It was a privilege to have such easy access to enlightening explanations on Coq and beyond. Thanks to Georges Gonthier for many generous explanations on a variety of formalization questions. His unique perspective encouraged me to pay a lot more attention to many details. Thanks to Nathalie Revol for important feedback and advice, as well as for offering to read a draft version of this thesis. Thanks to César Muñoz for welcoming me at NASA s NIA institute during December I greatly appreciated this stimulating work environment. Thanks to Bas Spitters, Milad Niqui, and Russell O Connor. They taught me a lot about constructive mathematics and real numbers. Visiting their team at Nijmegen was a very enjoyable experience. Thanks to Assia Mahboubi and Guillaume Melquiond. They not only helped me to lessen my ignorance on several mathematical topics, but were also pleasant office neighbors. 9

10 Thanks to Sean McLaughlin for many discussions about computer science related topics and others. Thanks to Catherine Moreau and Martine Thirion, whose friendliness made me feel at home at LIX and in the INRIA/Microsoft Joint Lab. Thanks to Philipp, Wassim, Fethallah, Arash, Domingo, and others for lasting friendship. Thanks to Marwa. Thanks to my parents and family. 10

11 List of Figures 0.1 A seventeenth-century wine merchant The face-centered cubic packing Transitions in the computation of the binary gcd Taylor approximations of the logarithm function 83 11

12

13 Introduction Optimization as a mathematical discipline is concerned with effectively determining the minimum or the maximum of a given function. This problem arises in a great variety of fields, reaching from chemistry to pure mathematics. Scientific progress has often been driven by practical problems. Beyond academia, engineers use optimization methods to make sensible choices for physical parameters, and capitalist economy poses the question of how to put limited resources to maximal benefit. Figure 0.1. A seventeenth-century wine merchant It is a very practical problem that led Johannes Kepler to an important observation about the behaviour of a function around a maximum. In the autumn of 1613, just after his second wedding, he had a number of wine barrels delivered to his cellar. A few days later, as it was customary at the time, the merchant came to measure the diagonal of each barrel with a gauging-rod. This was how he determined the volume and therefore the price to pay. But was he right? Kepler was 13

14 astonished by this method without consideration for the geometrical shape, without further reflection or calculation 1 and as district mathematician in the Austrian city of Linz he felt it was his duty to examine its validity. He thus took on the task of analyzing the problem in the most rigorous imaginable manner, which at the time meant to follow the style of the ancient Greek mathematicians. The result of this effort is his treatise Nova stereometria doliorum vinariorum Kep11. Following a description of a method to calculate the volumes of rotational bodies, its second part gives an answer to a related question: Among all cylinders of the same diagonal which one has the largest volume? He shows by elementary means that for this a ratio of 2 : 1 between base diameter and height is required. Incidentally, this is almost what the Austrian coopers of the time were used to producing; their barrels came in different sizes, but all with a ratio of a little less (due to curvature) than 3 : 2. Kepler lauds them for coming so close to the optimal value, excusing their small error by the following remark: Near a maximal value the neighborhoods on both sides show only an insensible decrease at the beginning. 2 He did not use this fact to determine the maximum (he found it by elementary means instead), but at a time when analysis was still behind the horizon of mathematical knowledge this was a remarkable observation it is often seen as the first time in history that the connection between extremum and tangent is made. A few decades later, Fermat stated explicitly the well-known necessary criterion of zero derivatives for local extrema, then generalized by Euler to functions of several variables Eul55. This so-called derivative check is of utmost importance for many optimization algorithms, as we will see in section 3.4. Was the measurement method used by the wine merchants accurate or not? In the third part of his treatise Kepler gives the answer: since their method consisted solely of measuring the diagonal, the validity depends on the ratio between base diameter and height. This means that the scales used in Linz were valid for Austrian barrels with their ratio of almost 2 : 1, but not for imported ones barrels imported from Hungary were longer, the ones coming from the Rhineland shorter. However, the local wine merchants used the same gauging-rods and scales for all barrels indiscriminately. Since the Austrian barrel had (almost) maximal volume for a fixed diagonal, they overestimated the volume of all foreign barrels and therefore paid too much for them. Optimization as a Means of Verification. By determining that the wine merchants of Linz systematically incurred financial loss when buying foreign barrels, Kepler solved an optimization problem. A large portion of his treatise consisted of 1... ohne Rücksicht auf die geometrische Gestalt, ohne weitere Überlegung oder Rechnung... Kep11 2 Circa maximum vero utrinque circumstantes decrementa habent initio insensibilia. 14

15 a rigorous proof that was meant to verify that his answer ( the Austrian ones ) was correct. This connection between optimization and verification seems to be universal and unchanged since the days of Kepler: solving an optimization problem usually aims at verifying that a given function respects some bound (whether it be known in advance or not). However, two aspects of optimization have largely evolved over the last few centuries: The manual work of Kepler writing down an ingenious proof has been replaced by more and more systematic methods. Calculus has greatly contributed to their development and eventually led to the design of powerful algorithms requiring a computer to be executed effectively. Furthermore, the notion of rigorous has progressed significantly since the beginning of the 20th century. During the renaissance it had still meant to follow the style of the ancient Greeks, namely to deduce new truths by deduction from axioms, using syllogisms. Today the greatest rigor requires a formal proof, i.e. a very detailed proof that can be checked mechanically by a machine. This thesis is about formal correctness proofs of optimization algorithms: we present definitions and proofs in type theory, materialized by the Coq proof assistant Cdt04. The aim of our work is to machine-check proofs against the definitions and obtain as a result certified algorithms that solve optimization problems, minimizing the risk of software bugs. The Problem. Optimization in itself is a wide field: the problem variables can be real numbers, integers or others; constraints on them can be box-formed, linear, more complex, or absent; we can be interested in local or in global extrema. To clarify our focus, we first state the problem. Problem 0.1. Given a box a 1 ; b 1... an ; b n R n and a function f : R n R, find an interval Y such that min X f Y. The width of Y should not exceed some given precision ε. Depending on the nature of f different methods apply: (1) Interval arithmetic can be used if f has a so-called interval extension. This is in particular the case if f is continuous. The method can be made more efficient if f is also differentiable. This method is explained in chapter 3. (2) If f is polynomial, it can be converted to the Bernstein basis, in which efficient algorithms provide a way to determine the minimum. They will be presented, along with detailed proofs, in chapter 4. (3) Often f can be efficiently approximated by a polynomial, e.g. if f is smooth, using Taylor s theorem (if f is smooth). Depending on the nature of f, different approximation theorems apply. This approach is described in chapter 5. 15

16 It is hard to make a precise statement about which method is preferable for what kind of problem. However, interval arithmetic tends to be efficient in low dimension (typically 3) and small values of ε, while the methods of chapter 5 aim to deal with problems of higher dimensions, but with less precision. Applications. At the beginning it was mentioned that global optimization is useful in a variety of fields. However, there is one particularly interesting application that has been our initial motivation. In 1611, Johannes Kepler (and this is already the second time we encounter him) stated a conjecture on sphere packings. Theorem 0.2. The maximal density of sphere packings in 3-space is The density π 18 π 18. is attained by the so-called hexagonal-close and the facecentered cubic (see figure 0.2) packings, which correspond to the way most people would intuitively stack oranges, leading to a pyramid shape. Figure 0.2. The face-centered cubic packing A proof of this conjecture had been long sought for and the problem has a very prominent history Hal06. It was solved only in 1998, when Thomas Hales came up with a proof Hal04. However, this proof has one feature that makes it difficult to judge its correctness: it consists not only of several hundred pages of pencil-and-paper mathematics, but it has also a computational part: a good amount of non-trivial algorithms are executed many times, in order to check a finite (but large) number of sub-cases arising in the proof. In this it is similar to the proof of the four colour theorem, which had a similar status until it has been entirely formalized in Coq Gon05. Thomas Hales began an effort 3 to develop a formal proof for the Kepler conjecture. So far, the graph enumeration algorithms and linear programming techniques used in the proof have been formalized and proved correct NBS06. Our work aims at making progress on the third component, that consists of a long list of real inequalities, occurring in the proof. Here is one example: 3 Flyspeck is an acronym that stands for formal proof of the Kepler conjecture. 16

17 x : R x x x x x x < π 2 + arctan x 1 x 3 + x 2 x 5 x 1 x 4 x 3 x 6 + x 4 x 6 x 2 ( x 2 + x 1 + x 3 x 5 + x 4 + x 6 ) v u t 4x 2 ( x2 x 5 ( x 2 + x 1 + x 3 x 5 + x 4 + x 6 ) + x 1 x 4 (x 2 x 1 + x 3 + x 5 x 4 + x 6 ) + x 3 x 6 (x 2 + x 1 x 3 + x 5 + x 4 x 6 ) x 1 x 3 x 5 x 2 x 3 x 4 x 2 x 1 x 6 x 5 x 4 x 6 ) A proof of this inequality can be found in appendix A (lemma A.5). However, this inequality is among the easier ones! A list of the about thousand such inequalities occurring in the proof of the Kepler conjecture can be found in McL. Before they can be fed into a general optimization procedure they are subject to dimension reduction as described in Hal08: arguments inspired by geometrical insight are used to break down each inequality in several cases of lower dimension. What is new? The main original contributions of this thesis are enumerated at the beginning of chapters 4 and 5. On the other hand, the first three chapters contain little original work, but aim to present their material in a manner that is up to the requirements of formal proof. 17

18

19 CHAPTER 1 Preliminaries A formal proof distinguishes itself from an informal one not only by the level of detail, but also by the fact that it is given in a precise, defined language. Ideally, proofs written in such a language can be checked by a proof assistant. We have chosen to use the proof assistant Coq Cdt04, for its expressive language, and because it accommodates computational proofs well GL02, Gré Type Theory While proofs in formal languages are machine-checkable, informal presentations can be more intuitive. Our presentation here takes a hybrid approach. While closely sticking to formal definitions, we stop short of (with the exception of chapter 2) displaying concrete Coq syntax. However, many notations and conventions that we found to increase clarity are borrowed from formal proof and functional programming. This chapter describes them in a manner appealing to the reader s intuition. More rigorous presentations can be found in Cdt04. To begin with, we try to avoid ambiguous language such as the function x Assuming x : R is declared, x 2 +2 has the type R, not R R. Coq would reject it in a place where a function is expected, so we avoid it. Instead, we prefer writing the function x x (in some presentations this would be written λx. x ). Function application is written by simple juxtaposition, so we write f x instead of f(x). It has lower precedence than any infix operator, so f x+y stands for (f x) + y, not f (x + y). For definitions, f x :=... is a shorthand for f := x.... Also, we implicitly use the fact that the function spaces A B C and A B C are isomorphic. We may thus write f x y for f (x, y) and viceversa. This extends to partial application: if f : A B C then f x denotes y f (x, y). Finally, partial application may be used with infix operators, so (+ a) denotes x x + a, and (a +) denotes x a + x. Indeed x + y = (+ y) x = (x +) y. Universally quantified statements are written as x : A. P x, meaning P x holds for all x of type A. If A is clear from the context, or the position x occurs in, we write simply x. P x. The power set (the set of all subsets) of a set A is denoted A. 19

20 Point-wise operations on functions are denoted by a dot above the operation symbol: f + g stands for x f x + g x. Multiple-Dispatch Overloading. It is in fact possible to use the same symbol for different operations, and associate it to different meanings, according to the type. For example + can be made to stand for both addition an the reals and for point-wise addition (allowing us to omit the dot on top of +). Recent work added Haskell-style type classes Coq, in order to allow this socalled overloading SO08. It can also by achieved by encoding the operations in records and using canonical structures, using a trick due to Georges Gonthier personal communication: Variables A B : Type. Variable AAmul : A A A. Variable BBmul : B B B. Variable ABmul : A B B. Variable BAmul : B A B. Record mul_class (R : Type) : Type := MulClass { mul_src : Type; mul_op : mul_src R }. Notation x y := (mul_op x y). Record A_mul_class (R : Type) : Type := AMulClass { A_mul_src : Type; A_mul_op : A A_mul_src R }. Record B_mul_class (R : Type) : Type := BMulClass { B_mul_src : Type; B_mul_op : B B_mul_src R }. Canonical Structure A_mul R S := MulClass (A_mul_op R S). Canonical Structure B_mul R S := MulClass (B_mul_op R S). Canonical Structure A_mul_A := AMulClass AAmul. Canonical Structure B_mul_B := BMulClass BBmul. Canonical Structure B_mul_A := BMulClass BAmul. Canonical Structure A_mul_B := AMulClass ABmul. Now if a : A and b : B, then all four of a a : A, a b : B, b a : B, and b b : B. In the case where A can be injected into B, one might want to do this with Coq s 20

21 coercion mechanism. However coercions are inserted sequentially in arguments, so multiple dispatching is not possible Lists Time and again we will manipulate lists of objects. Given a type A, the type A k denotes k-tuples of type A. The values x 1,..., x k denote the components of x = (x 1,..., x k ). A is the type of lists of arbitrary length, i.e. k Ak. We use the terms lists, tuple and vector interchangeably, with a preference for the latter two if something about the length is known. The operation denotes list concatenation: if x : A k1 and y : A k2 then x y := (x 1,..., x k1, y 1,..., y k2 ). The operation of adding a single element in front of a list is written by ; : if a : A and x : A k, then a ; x := (a, x 1,..., x k ). Adding a single element at the end of a list is denoted by. : x. a := (x 1,..., x k, a). x : A k ). The first and the last element of a list are denoted x := x 1 and x := x k (for The operation removing the first (resp. last) element of a list is written as prefix (resp. postfix ): For x : A k, x := (x 2,..., x k ) and x := (x 1,..., x k 1 ). The reversed list is noted rev (x 1,..., x k ) := (x k,..., x 1 ). We note (a) k for (a,..., a). Finally, x denotes the length of a list x. } {{ } k times 1.3. Polynomials Polynomials have been formalized many times, so we shall not attempt to repeat this task here. Instead, we list basic properties that we reasonably expect to hold, along with some notations. For formal proofs the reader is referred to e.g. CoR, Mah06. The term polynomial in this section refers to polynomials in the power basis 1, X, X 2,.... A different one, the Bernstein basis, will be introduced in chapter 4, where the contents of this section will serve as a tool. Assumption 1.1. Let C be a ring, whose elements we will call the coefficients. Definition 1.2. A polynomial is a list of coefficients C, i.e. of type C, also noted C1. Evaluation is defined by: : C1 C C () x 0 c ; p x c + x p x Furthermore, we shall permit ourselves to write p x as a short-hand for p x. 21

22 In many mathematical texts (e.g. in probability theory) the term variable has a somewhat mystical standing. In formal type theory, a variable is a symbol bound either by a function abstraction, i.e. x..., or a quantifier, i.e. x..... How does the variable of a polynomial relate to this? The answer is given by carefully distinguishing between the polynomial (a list of coefficients), e.g. (1, 2, 3), and its associated function (1, 2, 3) = x 1+2x+3x 2. We shall thus never speak of the polynomial 1 + 2x + 3x 2, since the status of x in it is unclear (e.g., is it the same as 1 + 2y + 3y 2?). Nevertheless, since such abusive language is often found to be convenient, we provide a formal definition that allows the same briefness. Definition 1.3 (Zero, one, and variable). 0 := () 1 := (1) X := (0, 1) X a;b := (a, b a) Note that X = id. With this definition 1 + 2X + 3X 2 = (1, 2, 3) is a polynomial, and 1 + 2X + 3X 2 := x 1+2x+3x 2. As far as type theory is concerned, X is not a variable, but a defined constant of type C1. The same is true for 0 and 1. Furthermore, we assume the domain 0; 1 for all polynomials. If other domains are of interest the variables can be easily stretched: The polynomial (a, b a) has the same range on 0; 1 as X on a; b. Addition and multiplication of polynomials will be noted + and. Lemma 1.4. The set of polynomials C1 with + and forms a ring. Definition 1.5. Composition of two polynomials is defined by: : C1 C1 C1 () q () c ; p q c + q (p q) Lemma 1.6. p q = p q Definition 1.7. The differentiation operator on power basis polynomials is defined as: : C k+1 C k := p (p 1, 2p 2,..., kp k ) Lemma 1.8 (Linearity of differentiation). For any α : R, (α p) = α p. Lemma 1.9 (Chain Rule). (p q) = ( p q) q 22

23 Lemma 1.10 (Product Rule). (p q) = p q + p q Definition Assuming that C has characteristic zero, the integration operator on power basis polynomials is defined as: S : C C k C k+1 := c p c ; (p 1, p2 2,..., p k k ) Note that S c p is x c + x 0 p(ξ)dξ in traditional notation. Theorem 1.12 (Fundamental theorem of calculus for polynomials). For any polynomial p : C k+1, S ( p) ( p) = p. Theorem For any polynomial p : C1, ( S c p) = p. Corollary For any two polynomials p, p : C1, p = p p = p p = p. Proof. We have S ( p) ( p) = S ( p ) ( p ) and thus by applying theorem 1.12 on both sides p = p. Lemma For any α : R, S c p (α X ) = S c ((α X ) p (α X )) Proof. By corollary Several Variables. Since our coefficients C were required to be a ring (assumption 1.1) and the polynomials C1 form a ring (lemma 1.4) themselves, polynomials can be used as coefficients of polynomials. This is a standard trick to obtain multivariate polynomials Mah06. Definition 1.16 (Multivariate polynomials). C0 := C Cn + 1 := (Cn)1 Our previous remarks on carefully using the notion variable and not relying on their names applies here two. In contrast to CX, Y, which is often seen, C2 solely refers to the number of variables. For p Cn we will use the notation p x to abbreviate p x 1... xn (note that in this latter term p x 1 Cn 1). Furthermore Cn can take a 23

24 different meaning if C is replaced by certain special symbols: Tn, Qn, Pn, d will be defined in chapter 5. Note that, alternatively, we could have defined Cn + 1 := (C1)n (this is reminiscent of the two ways to define Church numbers). 24

25 CHAPTER 2 Numbers Today, in most pieces of software used and developed, numbers are treated as commodity. Modern microprocessors offer instructions to compute with integers and floating-point numbers, a choice which is reflected in most programming languages. However, being finite, these machine numbers are only approximations of the mathematical objects they are usually supposed to model, namely N, Z, Q, or R. A program can only be expected to be correct if the results of all its intermediate computations are machine-representable. If they are not (and often this is not obvious), a computation either aborts with an error, or much worse gives a wrong result. Luckily, this problem can be overcome. The solution consists of generalizing the notion of machine-representable: N and Z can be implemented by finite digit lists (section 2.1), Q by pairs of integers representing fractions (section 2.3), and R by Cauchy sequences or digit streams (section 2.4). These representations are no longer finite approximations of the intended mathematical objects, but coincide precisely with them. This is indeed a necessity for the purpose of formalizing mathematics: if addition on Z was defined in a way such that = 0 it could not be part of an ordered ring. The same is true if =, where denotes an error element Integers Before we look into more efficient representations of large numbers, we will briefly describe how proof assistants commonly represent N and Z. The emphasis here is on the accuracy of the models, so efficiency considerations are secondary Unary Representation. In the Coq standard library N is implemented by an inductive definition: Inductive nat := O S of nat. The object O represents the number 0 and S the successor function. Note that S does not compute a value from an argument. It is only a primitive symbol (a constructor), of which, together with O, objects of type nat can be constructed. Accordingly, the number 5 is represented by S (S (S (S (S 0) ) ) ) and 2 32 S (S (... O) ), consuming an amount of memory linear in the size of the number. } {{ } 2 32 times as 25

26 Addition and multiplication are defined by structural recursion on the first argument: Fixpoint plus a b := if a is S a then S (plus a b) else b. Fixpoint mult a b := if a is S a then plus b (mult a b) else O. Although this representation perfectly models the set N and is often convenient for reasoning, it becomes quickly unusable for computations involving larger numbers the time complexity of addition is linear in the size of its first argument Binary Representation. The Coq standard library therefore offers another type, representing positive natural numbers more efficiently: Inductive positive := xi of positive xo of positive xh. The constructors xi and xo represent the functions (x 2x + 1) and (x 2x), while xh stands for 1. Again, they are constructors, so they don t compute. The first two can be noted more conveniently in postfix notation: Notation p 1 := (xi p). Notation p 0 := (xo p). In this binary representation memory usage is only logarithmic in the size of the number: xh 0 1 stands for 5 and xh } {{ } 32 times for On the other hand, the successor function is not represented directly by a constructor, so it has to be defined by structural recursion: Fixpoint Psucc x := match x with p 1 (Psucc p) 0 p 0 p 1 xh xh 0 end. Note that Coq does not use machine integers to perform these operations. It just evaluates each function step-by-step, following its definition, e.g.: Psucc (xh 0 1) (Psucc (xh 0)) 0 xh 1 0 The slightly more technical definitions of addition and multiplication in this representation can be found, along with many others, in the Coq standard library. Although these are considerably faster than in the unary representation, they are still slower than the primitive instructions provided by micro-processors. On the other hand, when computations on positive are performed, the CPU is only used to perform symbolic manipulations, not as a calculator. In such a setting hardware bugs will more likely lead to crashes than to erroneous results Nic94. Finally, the entire set of integers Z is modeled by the inductive definition Inductive Z := Z0 Zpos of positive Zneg of positive. 26

27 The standard library provides implementations of all common integer operations on this type Machine Integers. For the many situations where worries about hardware bugs, standard libraries, and compilers are to be dismissed as paranoid, Coq also provides primitive 31-bit machine integers (the 32nd bit is used for bookkeeping by the garbage collector) Spi06: Inductive digits := D0 D1. Inductive int31 := I31 of digits & digits & digits & digits & digits & digits & digits & digits & digits & digits & digits & digits & digits & digits & digits & digits & digits & digits & digits & digits & digits & digits & digits & digits & digits & digits & digits & digits & digits & digits & digits. This type comes with operations computing modulo 2 31, e.g.: add31 : int31 int31 int31 mul31 : int31 int31 int31 When the arguments to these functions are closed terms (i.e. concrete numbers, without variables in their bits), fast machine operations are used to perform the computation in a single step. In short, int31 is a very fast implementation of Z/31Z that can be used in Coq terms Arbitrary-Size Natural Numbers. As mentioned in the introduction of this chapter, implementations of algorithms based (for example) on N can only be expected to be correct on all possible inputs if the numbers used actually model the set N accurately, rather than being only an approximation like Z/31Z. While the binary representation of subsection offers such an accurate implementation, it processes only a single binary digit in one step of computation. In contrast, the machine integers int31 are fast, but implement Z/31Z, not N. If we want to achieve both good performance and accurate representation of N, a little more work is necessary: integers of arbitrary size (only limited by machine memory) can be implemented by gluing several machine integers int31 together. It is possible to implement operations on such numbers that are much faster than those on objects of type positive. This has been of particular interest for verified primality tests that have been carried out in Coq GTW06. The numbers processed by these algorithms are indeed very large, meaning several thousand decimal digits. The implementation of arbitrary-size integers developed for this purpose, the library BigN, is particularly adapted to this situation: not only does it use Karatsuba s fast algorithm for multiplication; it also represents a number as 27

28 a tree, providing access in logarithmic time to all the last digits. This makes it possible to implement integer square root and division very efficiently. While these tree-integers have proved useful for the treatment of huge prime numbers, they come with an associated overhead: the tree needs to be kept in balance, and simple operations such as addition need to do recursion over a tree instead of a list, which is slightly more expensive. It will turn out, that the integers used in our development will typically be large, but not huge. Therefore this overhead does not pay off in our case and we achieved better over-all-performance by using the more traditional flavor of arbitrary-size integers represented as lists Knu69. Let us now turn to the Coq implementation: we begin by defining the type t of medium (i.e. large, but not huge) arbitrary-size integers as a list of int31 digits. We place it in a module medn and the variable names m and n are declared to be of type medn.t. Definition t := list int31. Implicit Types m n : t. An arbitrary-precision integer can easily be constructed from a single int31 digit: Definition of_int31 i : t := i. It is explained what number an object of type t represents by converting it to type Z (cf. subsection 2.1.2): Fixpoint to_z n := if n is n0 :: n then Int31. phi n0 + Int31. base to_z n else 0. The function Int31. phi converts int31 to Z. Our arbitrary-size numbers can be seen as numbers in base Int31.base = Note that to_z is not injective. Indeed, leading 1 zeros cause an ambiguity in the representation: the objects 42 and 42;0 stand for the same number. A normalization function that removes any leading zeros is provided 2 : Fixpoint norm n := if n is i :: n then let n := norm n in if n is (_ :: _) then i :: n else 1 Since in our representation the list begins with the digit of least weight, the zero is actually trailing the list. However, the term leading zero is so common that we stick to it. 2 The let n :=... in the following definition seems a little odd here, since n is used only once (the second occurrence could be replaced by an as-bound pattern-variable). This is a workaround for a peculiarity of Coq s interpretation of default branches in match / if: in certain cases the matched value is textually copied inside the branch, which would evaluate it twice when the term is normalized. 28

CONTINUED FRACTIONS AND FACTORING. Niels Lauritzen

CONTINUED FRACTIONS AND FACTORING. Niels Lauritzen CONTINUED FRACTIONS AND FACTORING Niels Lauritzen ii NIELS LAURITZEN DEPARTMENT OF MATHEMATICAL SCIENCES UNIVERSITY OF AARHUS, DENMARK EMAIL: niels@imf.au.dk URL: http://home.imf.au.dk/niels/ Contents

More information

Continued Fractions and the Euclidean Algorithm

Continued Fractions and the Euclidean Algorithm Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction

More information

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay Lecture - 17 Shannon-Fano-Elias Coding and Introduction to Arithmetic Coding

More information

Math Review. for the Quantitative Reasoning Measure of the GRE revised General Test

Math Review. for the Quantitative Reasoning Measure of the GRE revised General Test Math Review for the Quantitative Reasoning Measure of the GRE revised General Test www.ets.org Overview This Math Review will familiarize you with the mathematical skills and concepts that are important

More information

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook. Elementary Number Theory and Methods of Proof CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.edu/~cse215 1 Number theory Properties: 2 Properties of integers (whole

More information

WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT?

WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT? WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT? introduction Many students seem to have trouble with the notion of a mathematical proof. People that come to a course like Math 216, who certainly

More information

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs CHAPTER 3 Methods of Proofs 1. Logical Arguments and Formal Proofs 1.1. Basic Terminology. An axiom is a statement that is given to be true. A rule of inference is a logical rule that is used to deduce

More information

Integer Factorization using the Quadratic Sieve

Integer Factorization using the Quadratic Sieve Integer Factorization using the Quadratic Sieve Chad Seibert* Division of Science and Mathematics University of Minnesota, Morris Morris, MN 56567 seib0060@morris.umn.edu March 16, 2011 Abstract We give

More information

Lecture 13 - Basic Number Theory.

Lecture 13 - Basic Number Theory. Lecture 13 - Basic Number Theory. Boaz Barak March 22, 2010 Divisibility and primes Unless mentioned otherwise throughout this lecture all numbers are non-negative integers. We say that A divides B, denoted

More information

11 Ideals. 11.1 Revisiting Z

11 Ideals. 11.1 Revisiting Z 11 Ideals The presentation here is somewhat different than the text. In particular, the sections do not match up. We have seen issues with the failure of unique factorization already, e.g., Z[ 5] = O Q(

More information

Some Polynomial Theorems. John Kennedy Mathematics Department Santa Monica College 1900 Pico Blvd. Santa Monica, CA 90405 rkennedy@ix.netcom.

Some Polynomial Theorems. John Kennedy Mathematics Department Santa Monica College 1900 Pico Blvd. Santa Monica, CA 90405 rkennedy@ix.netcom. Some Polynomial Theorems by John Kennedy Mathematics Department Santa Monica College 1900 Pico Blvd. Santa Monica, CA 90405 rkennedy@ix.netcom.com This paper contains a collection of 31 theorems, lemmas,

More information

MATH10040 Chapter 2: Prime and relatively prime numbers

MATH10040 Chapter 2: Prime and relatively prime numbers MATH10040 Chapter 2: Prime and relatively prime numbers Recall the basic definition: 1. Prime numbers Definition 1.1. Recall that a positive integer is said to be prime if it has precisely two positive

More information

Computing Cubic Fields in Quasi-Linear Time

Computing Cubic Fields in Quasi-Linear Time Computing Cubic Fields in Quasi-Linear Time K. Belabas Département de mathématiques (A2X) Université Bordeaux I 351, cours de la Libération, 33405 Talence (France) belabas@math.u-bordeaux.fr Cubic fields

More information

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2 CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2 Proofs Intuitively, the concept of proof should already be familiar We all like to assert things, and few of us

More information

CHAPTER II THE LIMIT OF A SEQUENCE OF NUMBERS DEFINITION OF THE NUMBER e.

CHAPTER II THE LIMIT OF A SEQUENCE OF NUMBERS DEFINITION OF THE NUMBER e. CHAPTER II THE LIMIT OF A SEQUENCE OF NUMBERS DEFINITION OF THE NUMBER e. This chapter contains the beginnings of the most important, and probably the most subtle, notion in mathematical analysis, i.e.,

More information

FACTORING POLYNOMIALS IN THE RING OF FORMAL POWER SERIES OVER Z

FACTORING POLYNOMIALS IN THE RING OF FORMAL POWER SERIES OVER Z FACTORING POLYNOMIALS IN THE RING OF FORMAL POWER SERIES OVER Z DANIEL BIRMAJER, JUAN B GIL, AND MICHAEL WEINER Abstract We consider polynomials with integer coefficients and discuss their factorization

More information

Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm.

Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm. Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm. We begin by defining the ring of polynomials with coefficients in a ring R. After some preliminary results, we specialize

More information

CONTINUED FRACTIONS AND PELL S EQUATION. Contents 1. Continued Fractions 1 2. Solution to Pell s Equation 9 References 12

CONTINUED FRACTIONS AND PELL S EQUATION. Contents 1. Continued Fractions 1 2. Solution to Pell s Equation 9 References 12 CONTINUED FRACTIONS AND PELL S EQUATION SEUNG HYUN YANG Abstract. In this REU paper, I will use some important characteristics of continued fractions to give the complete set of solutions to Pell s equation.

More information

A Second Course in Mathematics Concepts for Elementary Teachers: Theory, Problems, and Solutions

A Second Course in Mathematics Concepts for Elementary Teachers: Theory, Problems, and Solutions A Second Course in Mathematics Concepts for Elementary Teachers: Theory, Problems, and Solutions Marcel B. Finan Arkansas Tech University c All Rights Reserved First Draft February 8, 2006 1 Contents 25

More information

Cryptography and Network Security Department of Computer Science and Engineering Indian Institute of Technology Kharagpur

Cryptography and Network Security Department of Computer Science and Engineering Indian Institute of Technology Kharagpur Cryptography and Network Security Department of Computer Science and Engineering Indian Institute of Technology Kharagpur Module No. # 01 Lecture No. # 05 Classic Cryptosystems (Refer Slide Time: 00:42)

More information

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion CHAPTER 5 Number Theory 1. Integers and Division 1.1. Divisibility. Definition 1.1.1. Given two integers a and b we say a divides b if there is an integer c such that b = ac. If a divides b, we write a

More information

A Static Analyzer for Large Safety-Critical Software. Considered Programs and Semantics. Automatic Program Verification by Abstract Interpretation

A Static Analyzer for Large Safety-Critical Software. Considered Programs and Semantics. Automatic Program Verification by Abstract Interpretation PLDI 03 A Static Analyzer for Large Safety-Critical Software B. Blanchet, P. Cousot, R. Cousot, J. Feret L. Mauborgne, A. Miné, D. Monniaux,. Rival CNRS École normale supérieure École polytechnique Paris

More information

CS 103X: Discrete Structures Homework Assignment 3 Solutions

CS 103X: Discrete Structures Homework Assignment 3 Solutions CS 103X: Discrete Structures Homework Assignment 3 s Exercise 1 (20 points). On well-ordering and induction: (a) Prove the induction principle from the well-ordering principle. (b) Prove the well-ordering

More information

An Innocent Investigation

An Innocent Investigation An Innocent Investigation D. Joyce, Clark University January 2006 The beginning. Have you ever wondered why every number is either even or odd? I don t mean to ask if you ever wondered whether every number

More information

Lies My Calculator and Computer Told Me

Lies My Calculator and Computer Told Me Lies My Calculator and Computer Told Me 2 LIES MY CALCULATOR AND COMPUTER TOLD ME Lies My Calculator and Computer Told Me See Section.4 for a discussion of graphing calculators and computers with graphing

More information

How To Prove The Dirichlet Unit Theorem

How To Prove The Dirichlet Unit Theorem Chapter 6 The Dirichlet Unit Theorem As usual, we will be working in the ring B of algebraic integers of a number field L. Two factorizations of an element of B are regarded as essentially the same if

More information

So let us begin our quest to find the holy grail of real analysis.

So let us begin our quest to find the holy grail of real analysis. 1 Section 5.2 The Complete Ordered Field: Purpose of Section We present an axiomatic description of the real numbers as a complete ordered field. The axioms which describe the arithmetic of the real numbers

More information

8 Primes and Modular Arithmetic

8 Primes and Modular Arithmetic 8 Primes and Modular Arithmetic 8.1 Primes and Factors Over two millennia ago already, people all over the world were considering the properties of numbers. One of the simplest concepts is prime numbers.

More information

Math Workshop October 2010 Fractions and Repeating Decimals

Math Workshop October 2010 Fractions and Repeating Decimals Math Workshop October 2010 Fractions and Repeating Decimals This evening we will investigate the patterns that arise when converting fractions to decimals. As an example of what we will be looking at,

More information

Answer Key for California State Standards: Algebra I

Answer Key for California State Standards: Algebra I Algebra I: Symbolic reasoning and calculations with symbols are central in algebra. Through the study of algebra, a student develops an understanding of the symbolic language of mathematics and the sciences.

More information

[Refer Slide Time: 05:10]

[Refer Slide Time: 05:10] Principles of Programming Languages Prof: S. Arun Kumar Department of Computer Science and Engineering Indian Institute of Technology Delhi Lecture no 7 Lecture Title: Syntactic Classes Welcome to lecture

More information

Notes on Factoring. MA 206 Kurt Bryan

Notes on Factoring. MA 206 Kurt Bryan The General Approach Notes on Factoring MA 26 Kurt Bryan Suppose I hand you n, a 2 digit integer and tell you that n is composite, with smallest prime factor around 5 digits. Finding a nontrivial factor

More information

U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009. Notes on Algebra

U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009. Notes on Algebra U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009 Notes on Algebra These notes contain as little theory as possible, and most results are stated without proof. Any introductory

More information

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1. MATH10212 Linear Algebra Textbook: D. Poole, Linear Algebra: A Modern Introduction. Thompson, 2006. ISBN 0-534-40596-7. Systems of Linear Equations Definition. An n-dimensional vector is a row or a column

More information

Mathematics Course 111: Algebra I Part IV: Vector Spaces

Mathematics Course 111: Algebra I Part IV: Vector Spaces Mathematics Course 111: Algebra I Part IV: Vector Spaces D. R. Wilkins Academic Year 1996-7 9 Vector Spaces A vector space over some field K is an algebraic structure consisting of a set V on which are

More information

This chapter is all about cardinality of sets. At first this looks like a

This chapter is all about cardinality of sets. At first this looks like a CHAPTER Cardinality of Sets This chapter is all about cardinality of sets At first this looks like a very simple concept To find the cardinality of a set, just count its elements If A = { a, b, c, d },

More information

On Generalized Fermat Numbers 3 2n +1

On Generalized Fermat Numbers 3 2n +1 Applied Mathematics & Information Sciences 4(3) (010), 307 313 An International Journal c 010 Dixie W Publishing Corporation, U. S. A. On Generalized Fermat Numbers 3 n +1 Amin Witno Department of Basic

More information

Adaptive Online Gradient Descent

Adaptive Online Gradient Descent Adaptive Online Gradient Descent Peter L Bartlett Division of Computer Science Department of Statistics UC Berkeley Berkeley, CA 94709 bartlett@csberkeleyedu Elad Hazan IBM Almaden Research Center 650

More information

SECTION 10-2 Mathematical Induction

SECTION 10-2 Mathematical Induction 73 0 Sequences and Series 6. Approximate e 0. using the first five terms of the series. Compare this approximation with your calculator evaluation of e 0.. 6. Approximate e 0.5 using the first five terms

More information

Lecture 3: Finding integer solutions to systems of linear equations

Lecture 3: Finding integer solutions to systems of linear equations Lecture 3: Finding integer solutions to systems of linear equations Algorithmic Number Theory (Fall 2014) Rutgers University Swastik Kopparty Scribe: Abhishek Bhrushundi 1 Overview The goal of this lecture

More information

PYTHAGOREAN TRIPLES KEITH CONRAD

PYTHAGOREAN TRIPLES KEITH CONRAD PYTHAGOREAN TRIPLES KEITH CONRAD 1. Introduction A Pythagorean triple is a triple of positive integers (a, b, c) where a + b = c. Examples include (3, 4, 5), (5, 1, 13), and (8, 15, 17). Below is an ancient

More information

Linear Algebra I. Ronald van Luijk, 2012

Linear Algebra I. Ronald van Luijk, 2012 Linear Algebra I Ronald van Luijk, 2012 With many parts from Linear Algebra I by Michael Stoll, 2007 Contents 1. Vector spaces 3 1.1. Examples 3 1.2. Fields 4 1.3. The field of complex numbers. 6 1.4.

More information

SUBGROUPS OF CYCLIC GROUPS. 1. Introduction In a group G, we denote the (cyclic) group of powers of some g G by

SUBGROUPS OF CYCLIC GROUPS. 1. Introduction In a group G, we denote the (cyclic) group of powers of some g G by SUBGROUPS OF CYCLIC GROUPS KEITH CONRAD 1. Introduction In a group G, we denote the (cyclic) group of powers of some g G by g = {g k : k Z}. If G = g, then G itself is cyclic, with g as a generator. Examples

More information

RN-Codings: New Insights and Some Applications

RN-Codings: New Insights and Some Applications RN-Codings: New Insights and Some Applications Abstract During any composite computation there is a constant need for rounding intermediate results before they can participate in further processing. Recently

More information

arxiv:1112.0829v1 [math.pr] 5 Dec 2011

arxiv:1112.0829v1 [math.pr] 5 Dec 2011 How Not to Win a Million Dollars: A Counterexample to a Conjecture of L. Breiman Thomas P. Hayes arxiv:1112.0829v1 [math.pr] 5 Dec 2011 Abstract Consider a gambling game in which we are allowed to repeatedly

More information

Higher Education Math Placement

Higher Education Math Placement Higher Education Math Placement Placement Assessment Problem Types 1. Whole Numbers, Fractions, and Decimals 1.1 Operations with Whole Numbers Addition with carry Subtraction with borrowing Multiplication

More information

Introduction to Algebraic Geometry. Bézout s Theorem and Inflection Points

Introduction to Algebraic Geometry. Bézout s Theorem and Inflection Points Introduction to Algebraic Geometry Bézout s Theorem and Inflection Points 1. The resultant. Let K be a field. Then the polynomial ring K[x] is a unique factorisation domain (UFD). Another example of a

More information

Number Theory Hungarian Style. Cameron Byerley s interpretation of Csaba Szabó s lectures

Number Theory Hungarian Style. Cameron Byerley s interpretation of Csaba Szabó s lectures Number Theory Hungarian Style Cameron Byerley s interpretation of Csaba Szabó s lectures August 20, 2005 2 0.1 introduction Number theory is a beautiful subject and even cooler when you learn about it

More information

Integer roots of quadratic and cubic polynomials with integer coefficients

Integer roots of quadratic and cubic polynomials with integer coefficients Integer roots of quadratic and cubic polynomials with integer coefficients Konstantine Zelator Mathematics, Computer Science and Statistics 212 Ben Franklin Hall Bloomsburg University 400 East Second Street

More information

it is easy to see that α = a

it is easy to see that α = a 21. Polynomial rings Let us now turn out attention to determining the prime elements of a polynomial ring, where the coefficient ring is a field. We already know that such a polynomial ring is a UF. Therefore

More information

Revised Version of Chapter 23. We learned long ago how to solve linear congruences. ax c (mod m)

Revised Version of Chapter 23. We learned long ago how to solve linear congruences. ax c (mod m) Chapter 23 Squares Modulo p Revised Version of Chapter 23 We learned long ago how to solve linear congruences ax c (mod m) (see Chapter 8). It s now time to take the plunge and move on to quadratic equations.

More information

a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2.

a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2. Chapter 1 LINEAR EQUATIONS 1.1 Introduction to linear equations A linear equation in n unknowns x 1, x,, x n is an equation of the form a 1 x 1 + a x + + a n x n = b, where a 1, a,..., a n, b are given

More information

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson Mathematics for Computer Science/Software Engineering Notes for the course MSM1F3 Dr. R. A. Wilson October 1996 Chapter 1 Logic Lecture no. 1. We introduce the concept of a proposition, which is a statement

More information

Faster deterministic integer factorisation

Faster deterministic integer factorisation David Harvey (joint work with Edgar Costa, NYU) University of New South Wales 25th October 2011 The obvious mathematical breakthrough would be the development of an easy way to factor large prime numbers

More information

Factoring & Primality

Factoring & Primality Factoring & Primality Lecturer: Dimitris Papadopoulos In this lecture we will discuss the problem of integer factorization and primality testing, two problems that have been the focus of a great amount

More information

DEGREES OF ORDERS ON TORSION-FREE ABELIAN GROUPS

DEGREES OF ORDERS ON TORSION-FREE ABELIAN GROUPS DEGREES OF ORDERS ON TORSION-FREE ABELIAN GROUPS ASHER M. KACH, KAREN LANGE, AND REED SOLOMON Abstract. We construct two computable presentations of computable torsion-free abelian groups, one of isomorphism

More information

How many numbers there are?

How many numbers there are? How many numbers there are? RADEK HONZIK Radek Honzik: Charles University, Department of Logic, Celetná 20, Praha 1, 116 42, Czech Republic radek.honzik@ff.cuni.cz Contents 1 What are numbers 2 1.1 Natural

More information

CHAPTER 7 GENERAL PROOF SYSTEMS

CHAPTER 7 GENERAL PROOF SYSTEMS CHAPTER 7 GENERAL PROOF SYSTEMS 1 Introduction Proof systems are built to prove statements. They can be thought as an inference machine with special statements, called provable statements, or sometimes

More information

This Unit: Floating Point Arithmetic. CIS 371 Computer Organization and Design. Readings. Floating Point (FP) Numbers

This Unit: Floating Point Arithmetic. CIS 371 Computer Organization and Design. Readings. Floating Point (FP) Numbers This Unit: Floating Point Arithmetic CIS 371 Computer Organization and Design Unit 7: Floating Point App App App System software Mem CPU I/O Formats Precision and range IEEE 754 standard Operations Addition

More information

C H A P T E R Regular Expressions regular expression

C H A P T E R Regular Expressions regular expression 7 CHAPTER Regular Expressions Most programmers and other power-users of computer systems have used tools that match text patterns. You may have used a Web search engine with a pattern like travel cancun

More information

SECTION 0.6: POLYNOMIAL, RATIONAL, AND ALGEBRAIC EXPRESSIONS

SECTION 0.6: POLYNOMIAL, RATIONAL, AND ALGEBRAIC EXPRESSIONS (Section 0.6: Polynomial, Rational, and Algebraic Expressions) 0.6.1 SECTION 0.6: POLYNOMIAL, RATIONAL, AND ALGEBRAIC EXPRESSIONS LEARNING OBJECTIVES Be able to identify polynomial, rational, and algebraic

More information

Homework until Test #2

Homework until Test #2 MATH31: Number Theory Homework until Test # Philipp BRAUN Section 3.1 page 43, 1. It has been conjectured that there are infinitely many primes of the form n. Exhibit five such primes. Solution. Five such

More information

Linear Codes. Chapter 3. 3.1 Basics

Linear Codes. Chapter 3. 3.1 Basics Chapter 3 Linear Codes In order to define codes that we can encode and decode efficiently, we add more structure to the codespace. We shall be mainly interested in linear codes. A linear code of length

More information

Primality - Factorization

Primality - Factorization Primality - Factorization Christophe Ritzenthaler November 9, 2009 1 Prime and factorization Definition 1.1. An integer p > 1 is called a prime number (nombre premier) if it has only 1 and p as divisors.

More information

Determining the Optimal Combination of Trial Division and Fermat s Factorization Method

Determining the Optimal Combination of Trial Division and Fermat s Factorization Method Determining the Optimal Combination of Trial Division and Fermat s Factorization Method Joseph C. Woodson Home School P. O. Box 55005 Tulsa, OK 74155 Abstract The process of finding the prime factorization

More information

ABSTRACT ALGEBRA: A STUDY GUIDE FOR BEGINNERS

ABSTRACT ALGEBRA: A STUDY GUIDE FOR BEGINNERS ABSTRACT ALGEBRA: A STUDY GUIDE FOR BEGINNERS John A. Beachy Northern Illinois University 2014 ii J.A.Beachy This is a supplement to Abstract Algebra, Third Edition by John A. Beachy and William D. Blair

More information

LAKE ELSINORE UNIFIED SCHOOL DISTRICT

LAKE ELSINORE UNIFIED SCHOOL DISTRICT LAKE ELSINORE UNIFIED SCHOOL DISTRICT Title: PLATO Algebra 1-Semester 2 Grade Level: 10-12 Department: Mathematics Credit: 5 Prerequisite: Letter grade of F and/or N/C in Algebra 1, Semester 2 Course Description:

More information

Copy in your notebook: Add an example of each term with the symbols used in algebra 2 if there are any.

Copy in your notebook: Add an example of each term with the symbols used in algebra 2 if there are any. Algebra 2 - Chapter Prerequisites Vocabulary Copy in your notebook: Add an example of each term with the symbols used in algebra 2 if there are any. P1 p. 1 1. counting(natural) numbers - {1,2,3,4,...}

More information

Introduction. Appendix D Mathematical Induction D1

Introduction. Appendix D Mathematical Induction D1 Appendix D Mathematical Induction D D Mathematical Induction Use mathematical induction to prove a formula. Find a sum of powers of integers. Find a formula for a finite sum. Use finite differences to

More information

Mathematics 31 Pre-calculus and Limits

Mathematics 31 Pre-calculus and Limits Mathematics 31 Pre-calculus and Limits Overview After completing this section, students will be epected to have acquired reliability and fluency in the algebraic skills of factoring, operations with radicals

More information

The program also provides supplemental modules on topics in geometry and probability and statistics.

The program also provides supplemental modules on topics in geometry and probability and statistics. Algebra 1 Course Overview Students develop algebraic fluency by learning the skills needed to solve equations and perform important manipulations with numbers, variables, equations, and inequalities. Students

More information

1.7 Graphs of Functions

1.7 Graphs of Functions 64 Relations and Functions 1.7 Graphs of Functions In Section 1.4 we defined a function as a special type of relation; one in which each x-coordinate was matched with only one y-coordinate. We spent most

More information

Polynomials. Dr. philippe B. laval Kennesaw State University. April 3, 2005

Polynomials. Dr. philippe B. laval Kennesaw State University. April 3, 2005 Polynomials Dr. philippe B. laval Kennesaw State University April 3, 2005 Abstract Handout on polynomials. The following topics are covered: Polynomial Functions End behavior Extrema Polynomial Division

More information

6 EXTENDING ALGEBRA. 6.0 Introduction. 6.1 The cubic equation. Objectives

6 EXTENDING ALGEBRA. 6.0 Introduction. 6.1 The cubic equation. Objectives 6 EXTENDING ALGEBRA Chapter 6 Extending Algebra Objectives After studying this chapter you should understand techniques whereby equations of cubic degree and higher can be solved; be able to factorise

More information

New Hash Function Construction for Textual and Geometric Data Retrieval

New Hash Function Construction for Textual and Geometric Data Retrieval Latest Trends on Computers, Vol., pp.483-489, ISBN 978-96-474-3-4, ISSN 79-45, CSCC conference, Corfu, Greece, New Hash Function Construction for Textual and Geometric Data Retrieval Václav Skala, Jan

More information

Dedekind s forgotten axiom and why we should teach it (and why we shouldn t teach mathematical induction in our calculus classes)

Dedekind s forgotten axiom and why we should teach it (and why we shouldn t teach mathematical induction in our calculus classes) Dedekind s forgotten axiom and why we should teach it (and why we shouldn t teach mathematical induction in our calculus classes) by Jim Propp (UMass Lowell) March 14, 2010 1 / 29 Completeness Three common

More information

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES I GROUPS: BASIC DEFINITIONS AND EXAMPLES Definition 1: An operation on a set G is a function : G G G Definition 2: A group is a set G which is equipped with an operation and a special element e G, called

More information

The Mathematics of the RSA Public-Key Cryptosystem

The Mathematics of the RSA Public-Key Cryptosystem The Mathematics of the RSA Public-Key Cryptosystem Burt Kaliski RSA Laboratories ABOUT THE AUTHOR: Dr Burt Kaliski is a computer scientist whose involvement with the security industry has been through

More information

An example of a computable

An example of a computable An example of a computable absolutely normal number Verónica Becher Santiago Figueira Abstract The first example of an absolutely normal number was given by Sierpinski in 96, twenty years before the concept

More information

Integer Operations. Overview. Grade 7 Mathematics, Quarter 1, Unit 1.1. Number of Instructional Days: 15 (1 day = 45 minutes) Essential Questions

Integer Operations. Overview. Grade 7 Mathematics, Quarter 1, Unit 1.1. Number of Instructional Days: 15 (1 day = 45 minutes) Essential Questions Grade 7 Mathematics, Quarter 1, Unit 1.1 Integer Operations Overview Number of Instructional Days: 15 (1 day = 45 minutes) Content to Be Learned Describe situations in which opposites combine to make zero.

More information

Parametric Domain-theoretic models of Linear Abadi & Plotkin Logic

Parametric Domain-theoretic models of Linear Abadi & Plotkin Logic Parametric Domain-theoretic models of Linear Abadi & Plotkin Logic Lars Birkedal Rasmus Ejlers Møgelberg Rasmus Lerchedahl Petersen IT University Technical Report Series TR-00-7 ISSN 600 600 February 00

More information

Continued Fractions. Darren C. Collins

Continued Fractions. Darren C. Collins Continued Fractions Darren C Collins Abstract In this paper, we discuss continued fractions First, we discuss the definition and notation Second, we discuss the development of the subject throughout history

More information

Mathematical Induction

Mathematical Induction Mathematical Induction (Handout March 8, 01) The Principle of Mathematical Induction provides a means to prove infinitely many statements all at once The principle is logical rather than strictly mathematical,

More information

H/wk 13, Solutions to selected problems

H/wk 13, Solutions to selected problems H/wk 13, Solutions to selected problems Ch. 4.1, Problem 5 (a) Find the number of roots of x x in Z 4, Z Z, any integral domain, Z 6. (b) Find a commutative ring in which x x has infinitely many roots.

More information

Notes on Determinant

Notes on Determinant ENGG2012B Advanced Engineering Mathematics Notes on Determinant Lecturer: Kenneth Shum Lecture 9-18/02/2013 The determinant of a system of linear equations determines whether the solution is unique, without

More information

Settling a Question about Pythagorean Triples

Settling a Question about Pythagorean Triples Settling a Question about Pythagorean Triples TOM VERHOEFF Department of Mathematics and Computing Science Eindhoven University of Technology P.O. Box 513, 5600 MB Eindhoven, The Netherlands E-Mail address:

More information

Factoring Polynomials

Factoring Polynomials Factoring Polynomials Sue Geller June 19, 2006 Factoring polynomials over the rational numbers, real numbers, and complex numbers has long been a standard topic of high school algebra. With the advent

More information

Quotient Rings and Field Extensions

Quotient Rings and Field Extensions Chapter 5 Quotient Rings and Field Extensions In this chapter we describe a method for producing field extension of a given field. If F is a field, then a field extension is a field K that contains F.

More information

Math 0980 Chapter Objectives. Chapter 1: Introduction to Algebra: The Integers.

Math 0980 Chapter Objectives. Chapter 1: Introduction to Algebra: The Integers. Math 0980 Chapter Objectives Chapter 1: Introduction to Algebra: The Integers. 1. Identify the place value of a digit. 2. Write a number in words or digits. 3. Write positive and negative numbers used

More information

The Goldberg Rao Algorithm for the Maximum Flow Problem

The Goldberg Rao Algorithm for the Maximum Flow Problem The Goldberg Rao Algorithm for the Maximum Flow Problem COS 528 class notes October 18, 2006 Scribe: Dávid Papp Main idea: use of the blocking flow paradigm to achieve essentially O(min{m 2/3, n 1/2 }

More information

Polynomial Operations and Factoring

Polynomial Operations and Factoring Algebra 1, Quarter 4, Unit 4.1 Polynomial Operations and Factoring Overview Number of instructional days: 15 (1 day = 45 60 minutes) Content to be learned Identify terms, coefficients, and degree of polynomials.

More information

PUTNAM TRAINING POLYNOMIALS. Exercises 1. Find a polynomial with integral coefficients whose zeros include 2 + 5.

PUTNAM TRAINING POLYNOMIALS. Exercises 1. Find a polynomial with integral coefficients whose zeros include 2 + 5. PUTNAM TRAINING POLYNOMIALS (Last updated: November 17, 2015) Remark. This is a list of exercises on polynomials. Miguel A. Lerma Exercises 1. Find a polynomial with integral coefficients whose zeros include

More information

CHAPTER 5 Round-off errors

CHAPTER 5 Round-off errors CHAPTER 5 Round-off errors In the two previous chapters we have seen how numbers can be represented in the binary numeral system and how this is the basis for representing numbers in computers. Since any

More information

k, then n = p2α 1 1 pα k

k, then n = p2α 1 1 pα k Powers of Integers An integer n is a perfect square if n = m for some integer m. Taking into account the prime factorization, if m = p α 1 1 pα k k, then n = pα 1 1 p α k k. That is, n is a perfect square

More information

24. The Branch and Bound Method

24. The Branch and Bound Method 24. The Branch and Bound Method It has serious practical consequences if it is known that a combinatorial problem is NP-complete. Then one can conclude according to the present state of science that no

More information

Thnkwell s Homeschool Precalculus Course Lesson Plan: 36 weeks

Thnkwell s Homeschool Precalculus Course Lesson Plan: 36 weeks Thnkwell s Homeschool Precalculus Course Lesson Plan: 36 weeks Welcome to Thinkwell s Homeschool Precalculus! We re thrilled that you ve decided to make us part of your homeschool curriculum. This lesson

More information

2.3. Finding polynomial functions. An Introduction:

2.3. Finding polynomial functions. An Introduction: 2.3. Finding polynomial functions. An Introduction: As is usually the case when learning a new concept in mathematics, the new concept is the reverse of the previous one. Remember how you first learned

More information

Reading 13 : Finite State Automata and Regular Expressions

Reading 13 : Finite State Automata and Regular Expressions CS/Math 24: Introduction to Discrete Mathematics Fall 25 Reading 3 : Finite State Automata and Regular Expressions Instructors: Beck Hasti, Gautam Prakriya In this reading we study a mathematical model

More information

= 2 + 1 2 2 = 3 4, Now assume that P (k) is true for some fixed k 2. This means that

= 2 + 1 2 2 = 3 4, Now assume that P (k) is true for some fixed k 2. This means that Instructions. Answer each of the questions on your own paper, and be sure to show your work so that partial credit can be adequately assessed. Credit will not be given for answers (even correct ones) without

More information