The Euclidean Algorithm

Total Page:16

File Type:pdf, Size:1020Kb

The Euclidean Algorithm 1. The Euclidean algorithm. The euclidean algorithm is used to find GCD(a; b), the greatest common divisor of two positive integers a; b 2 N, and can be used to find m; n 2 Z so that: GCD(a; b) = ma + nb: In particular, if p is a prime, GCD(a; p) = 1, so writing 1 = ma + np we −1 find that in the field Zp (of residues mod(p)) we have: (¯a) =m ¯ . ¯ Example. Find the multiplicative inverse of 11 in Z37. The euclidean algorithm gives: 37 = 3 × 11 + 4; 11 = 2 × 4 + 3; 4 = 3 + 1: Thus: 1 = 4 − 3 = 37 − 3 × 11 − [11 − 2 × (37 − 3 × 11)] = 3 × 37 − 10 × 11; ¯ −1 ¯ ¯ or m = −10; n = 3. Thus (11) = −10 = 27 in Z37. ¯ −1 Problem 1. Find (4) in the field Z31. 2. Long division. Suppose x 2 [0; 1) has an eventually periodic decimal representation: x = 0:m1m2 : : : mN d1d2 : : : dT : Then: N+T N 10 x − m1 : : : mN d1 : : : dT = 10 x − m1 : : : mN = 0:d1 : : : dT : Hence: N T 10 (10 − 1)x = m1 : : : mN d1 : : : dT − m1 : : : mN := m 2 N; or: m d : : : d x = (x = 1 T if the expansion is periodic): 10N (10T − 1) 10T − 1 In other words: any real number (in [0; 1)) with an eventually periodic decimal expansion is rational, and can be written in the form m=q, where q is a difference of powers of 10. (Or, considering base 2 expansions, with q a difference of powers of two.) 1 And yet any rational number has an eventually periodic decimal expan- sion! This can be established by considering long division. Consider x = p=q with p; q 2 N, p < q. We have (interpreting the long division algorithm): 10p = d1q + r1; 10r1 = d2q + r2; 10r2 = d3q + r3;::: p and this gives the decimal expansion: q = 0:d1d2d3 :::. The sequence of remainders takes values in the finite set f0; 1; : : : ; q − 1g, so eventually a remainder has to be repeated, and after that the whole sequence of digits in the decimal expansion repeats. Thus the expansion is eventually periodic, with period T ≤ q − 1 (if a remainder is zero, this means the expansion is finite, so either eventually 0's or eventually 9's, depending on which one you choose.) 2 Example. (seen in class) 7 = 0:285714. This is gotten from long division: 20 = 2×7+6; 60 = 8×7+4; 40 = 5×7+5; 50 = 7×7+1; 10 = 1×7+3; 30 = 4×7+2: This implies: 2 285714 = ; hence 7 divides 106 − 1 = 999; 999: 7 106 − 1 2 2 We can get the binary expansion easily if we observe that 7 = 23−1 : it is periodic with period 3. Since 2 written in base 2 is 10, we have: 2 ( ) = 0:010: 7 base 2 Problem 2. (i) Use the eventually periodic expansion of 5=7 to write it in the form m=q, where q is a difference of powers of 10. (ii) Write down the binary expansion of 5=7. p Problemp 3. Find the multiplicative inverse of x = −3 + 5 7 in the field Q( 7). Problem 4. Consider two arbitrary polynomials of degree 2 and integer coefficients: 2 2 p(x) = a0 + a1x + a2x ; q(x) = b0 + b1x + b2x ; aj; bj 2 Z: Show that if their product p(x)q(x) (of degree 4) is the zero polynomial (that is, has all its coefficients 0), then at least one of p(x); q(x) is the zero polynomial. (Hint: Show that a0b0 = 0 and a2b2 = 0. This gives four cases to consider). 2 This problem shows that the fact that the ring Z[x] is an integral domain (i.e., has no zero divisors) has a non-trivial proof. Recall that a commutative ring R is an integral domain if: (8x; x¯ 2 R)xx¯ = 0 ! (x = 0 _ x¯ = 0): A commutative ring is a field if every non-zero element has a multiplicative inverse: (8x 2 R)x 6= 0 ! (9x0 2 R)xx0 = 1: Problem 5. Show that any field is an integral domain. 3.
Recommended publications
  • Lesson 19: the Euclidean Algorithm As an Application of the Long Division Algorithm
    NYS COMMON CORE MATHEMATICS CURRICULUM Lesson 19 6•2 Lesson 19: The Euclidean Algorithm as an Application of the Long Division Algorithm Student Outcomes . Students explore and discover that Euclid’s Algorithm is a more efficient means to finding the greatest common factor of larger numbers and determine that Euclid’s Algorithm is based on long division. Lesson Notes MP.7 Students look for and make use of structure, connecting long division to Euclid’s Algorithm. Students look for and express regularity in repeated calculations leading to finding the greatest common factor of a pair of numbers. These steps are contained in the Student Materials and should be reproduced, so they can be displayed throughout the lesson: Euclid’s Algorithm is used to find the greatest common factor (GCF) of two whole numbers. MP.8 1. Divide the larger of the two numbers by the smaller one. 2. If there is a remainder, divide it into the divisor. 3. Continue dividing the last divisor by the last remainder until the remainder is zero. 4. The final divisor is the GCF of the original pair of numbers. In application, the algorithm can be used to find the side length of the largest square that can be used to completely fill a rectangle so that there is no overlap or gaps. Classwork Opening (5 minutes) Lesson 18 Problem Set can be discussed before going on to this lesson. Lesson 19: The Euclidean Algorithm as an Application of the Long Division Algorithm 178 Date: 4/1/14 This work is licensed under a © 2013 Common Core, Inc.
    [Show full text]
  • Primality Testing for Beginners
    STUDENT MATHEMATICAL LIBRARY Volume 70 Primality Testing for Beginners Lasse Rempe-Gillen Rebecca Waldecker http://dx.doi.org/10.1090/stml/070 Primality Testing for Beginners STUDENT MATHEMATICAL LIBRARY Volume 70 Primality Testing for Beginners Lasse Rempe-Gillen Rebecca Waldecker American Mathematical Society Providence, Rhode Island Editorial Board Satyan L. Devadoss John Stillwell Gerald B. Folland (Chair) Serge Tabachnikov The cover illustration is a variant of the Sieve of Eratosthenes (Sec- tion 1.5), showing the integers from 1 to 2704 colored by the number of their prime factors, including repeats. The illustration was created us- ing MATLAB. The back cover shows a phase plot of the Riemann zeta function (see Appendix A), which appears courtesy of Elias Wegert (www.visual.wegert.com). 2010 Mathematics Subject Classification. Primary 11-01, 11-02, 11Axx, 11Y11, 11Y16. For additional information and updates on this book, visit www.ams.org/bookpages/stml-70 Library of Congress Cataloging-in-Publication Data Rempe-Gillen, Lasse, 1978– author. [Primzahltests f¨ur Einsteiger. English] Primality testing for beginners / Lasse Rempe-Gillen, Rebecca Waldecker. pages cm. — (Student mathematical library ; volume 70) Translation of: Primzahltests f¨ur Einsteiger : Zahlentheorie - Algorithmik - Kryptographie. Includes bibliographical references and index. ISBN 978-0-8218-9883-3 (alk. paper) 1. Number theory. I. Waldecker, Rebecca, 1979– author. II. Title. QA241.R45813 2014 512.72—dc23 2013032423 Copying and reprinting. Individual readers of this publication, and nonprofit libraries acting for them, are permitted to make fair use of the material, such as to copy a chapter for use in teaching or research. Permission is granted to quote brief passages from this publication in reviews, provided the customary acknowledgment of the source is given.
    [Show full text]
  • So You Think You Can Divide?
    So You Think You Can Divide? A History of Division Stephen Lucas Department of Mathematics and Statistics James Madison University, Harrisonburg VA October 10, 2011 Tobias Dantzig: Number (1930, p26) “There is a story of a German merchant of the fifteenth century, which I have not succeeded in authenticating, but it is so characteristic of the situation then existing that I cannot resist the temptation of telling it. It appears that the merchant had a son whom he desired to give an advanced commercial education. He appealed to a prominent professor of a university for advice as to where he should send his son. The reply was that if the mathematical curriculum of the young man was to be confined to adding and subtracting, he perhaps could obtain the instruction in a German university; but the art of multiplying and dividing, he continued, had been greatly developed in Italy, which in his opinion was the only country where such advanced instruction could be obtained.” Ancient Techniques Positional Notation Division Yielding Decimals Outline Ancient Techniques Division Yielding Decimals Definitions Integer Division Successive Subtraction Modern Division Doubling Multiply by Reciprocal Geometry Iteration – Newton Positional Notation Iteration – Goldschmidt Iteration – EDSAC Positional Definition Galley or Scratch Factor Napier’s Rods and the “Modern” method Short Division and Genaille’s Rods Double Division Stephen Lucas So You Think You Can Divide? Ancient Techniques Positional Notation Division Yielding Decimals Definitions If a and b are natural numbers and a = qb + r, where q is a nonnegative integer and r is an integer satisfying 0 ≤ r < b, then q is the quotient and r is the remainder after integer division.
    [Show full text]
  • Decimal Long Division EM3TLG1 G5 466Z-NEW.Qx 6/20/08 11:42 AM Page 557
    EM3TLG1_G5_466Z-NEW.qx 6/20/08 11:42 AM Page 556 JE PRO CT Objective To extend the long division algorithm to problems in which both the divisor and the dividend are decimals. 1 Doing the Project materials Recommended Use During or after Lesson 4-6 and Project 5. ٗ Math Journal, p. 16 ,Key Activities ٗ Student Reference Book Students explore the meaning of division by a decimal and extend long division to pp. 37, 54G, 54H, and 60 decimal divisors. Key Concepts and Skills • Use long division to solve division problems with decimal divisors. [Operations and Computation Goal 3] • Multiply numbers by powers of 10. [Operations and Computation Goal 3] • Use the Multiplication Rule to find equivalent fractions. [Number and Numeration Goal 5] • Explore the meaning of division by a decimal. [Operations and Computation Goal 7] Key Vocabulary decimal divisors • dividend • divisor 2 Extending the Project materials Students express the remainder in a division problem as a whole number, a fraction, an ٗ Math Journal, p. 17 exact decimal, and a decimal rounded to the nearest hundredth. ٗ Student Reference Book, p. 54I Technology See the iTLG. 466Z Project 14 Decimal Long Division EM3TLG1_G5_466Z-NEW.qx 6/20/08 11:42 AM Page 557 Student Page 1 Doing the Project Date PROJECT 14 Dividing with Decimal Divisors WHOLE-CLASS 1. Draw lines to connect each number model with the number story that fits it best. Number Model Number Story ▼ Exploring Meanings for DISCUSSION What is the area of a rectangle 1.75 m by ?cm 50 0.10 ء Decimal Division 2 Sales tax is 10%.
    [Show full text]
  • Basics of Math 1 Logic and Sets the Statement a Is True, B Is False
    Basics of math 1 Logic and sets The statement a is true, b is false. Both statements are false. 9000086601 (level 1): Let a and b be two sentences in the sense of mathematical logic. It is known that the composite statement 9000086604 (level 1): Let a and b be two sentences in the sense of mathematical :(a _ b) logic. It is known that the composite statement is true. For each a and b determine whether it is true or false. :(a ^ :b) is false. For each a and b determine whether it is true or false. Both statements are false. The statement a is true, b is false. Both statements are true. The statement a is true, b is false. Both statements are true. The statement a is false, b is true. The statement a is false, b is true. Both statements are false. 9000086602 (level 1): Let a and b be two sentences in the sense of mathematical logic. It is known that the composite statement 9000086605 (level 1): Let a and b be two sentences in the sense of mathematical :a _ b logic. It is known that the composite statement is false. For each a and b determine whether it is true or false. :a =):b The statement a is true, b is false. is false. For each a and b determine whether it is true or false. The statement a is false, b is true. Both statements are true. The statement a is false, b is true. Both statements are true. The statement a is true, b is false.
    [Show full text]
  • Whole Numbers
    Unit 1: Whole Numbers 1.1.1 Place Value and Names for Whole Numbers Learning Objective(s) 1 Find the place value of a digit in a whole number. 2 Write a whole number in words and in standard form. 3 Write a whole number in expanded form. Introduction Mathematics involves solving problems that involve numbers. We will work with whole numbers, which are any of the numbers 0, 1, 2, 3, and so on. We first need to have a thorough understanding of the number system we use. Suppose the scientists preparing a lunar command module know it has to travel 382,564 kilometers to get to the moon. How well would they do if they didn’t understand this number? Would it make more of a difference if the 8 was off by 1 or if the 4 was off by 1? In this section, you will take a look at digits and place value. You will also learn how to write whole numbers in words, standard form, and expanded form based on the place values of their digits. The Number System Objective 1 A digit is one of the symbols 0, 1, 2, 3, 4, 5, 6, 7, 8, or 9. All numbers are made up of one or more digits. Numbers such as 2 have one digit, whereas numbers such as 89 have two digits. To understand what a number really means, you need to understand what the digits represent in a given number. The position of each digit in a number tells its value, or place value.
    [Show full text]
  • Long Division, the GCD Algorithm, and More
    Long Division, the GCD algorithm, and More By ‘long division’, I mean the grade-school business of starting with two pos- itive whole numbers, call them numerator and denominator, that extracts two other whole numbers (integers), call them quotient and remainder, so that the quotient times the denominator, plus the remainder, is equal to the numerator, and so that the remainder is between zero and one less than the denominator, inclusive. In symbols (and you see from the preceding sentence that it really doesn’t help to put things into ‘plain’ English!), b = qa + r; 0 r < a. ≤ With Arabic numerals and using base ten arithmetic, or with binary arith- metic and using base two arithmetic (either way we would call our base ‘10’!), it is an easy enough task for a computer, or anybody who knows the drill and wants the answer, to grind out q and r provided a and b are not too big. Thus if a = 17 and b = 41 then q = 2 and r = 7, because 17 2 + 7 = 41. If a computer, and appropriate software, is available,∗ this is a trivial task even if a and b have thousands of digits. But where do we go from this? We don’t really need to know how many anthills of 20192 ants each can be assembled out of 400 trillion ants, and how many ants would be left over. There are two answers to this. One is abstract and theoretical, the other is pure Slytherin. The abstract and theoretical answer is that knowledge for its own sake is a pure good thing, and the more the better.
    [Show full text]
  • Long Division
    Long Division Short description: Learn how to use long division to divide large numbers in this Math Shorts video. Long description: In this video, learn how to use long division to divide large numbers. In the accompanying classroom activity, students learn how to use the standard long division algorithm. They explore alternative ways of thinking about long division by using place value to decompose three-digit numbers into hundreds, tens, and ones, creating three smaller (and less complex) division problems. Students then use these different solution methods in a short partner game. Activity Text Learning Outcomes Students will be able to ● use multiple methods to solve a long division problem Common Core State Standards: 6.NS.B.2 Vocabulary: Division, algorithm, quotients, decompose, place value, dividend, divisor Materials: Number cubes Procedure 1. Introduction (10 minutes, whole group) Begin class by posing the division problem 245 ÷ 5. But instead of showing students the standard long division algorithm, rewrite 245 as 200 + 40 + 5 and have students try to solve each of the simpler problems 200 ÷ 5, 40 ÷ 5, and 5 ÷ 5. Record the different quotients as students solve the problems. Show them that the quotients 40, 8, and 1 add up to 49—and that 49 is also the quotient of 245 ÷ 5. Learning to decompose numbers by using place value concepts is an important piece of thinking flexibly about the four basic operations. Repeat this type of logic with the problem that students will see in the video: 283 ÷ 3. Use the concept of place value to rewrite 283 as 200 + 80 + 3 and have students try to solve the simpler problems 200 ÷ 3, 80 ÷ 3, and 3 ÷ 3.
    [Show full text]
  • "In-Situ": a Case Study of the Long Division Algorithm
    Australian Journal of Teacher Education Volume 43 | Issue 3 Article 1 2018 Teacher Knowledge and Learning In-situ: A Case Study of the Long Division Algorithm Shikha Takker Homi Bhabha Centre for Science Education, TIFR, India, [email protected] K. Subramaniam Homi Bhabha Centre for Science Education, TIFR, India, [email protected] Recommended Citation Takker, S., & Subramaniam, K. (2018). Teacher Knowledge and Learning In-situ: A Case Study of the Long Division Algorithm. Australian Journal of Teacher Education, 43(3). Retrieved from http://ro.ecu.edu.au/ajte/vol43/iss3/1 This Journal Article is posted at Research Online. http://ro.ecu.edu.au/ajte/vol43/iss3/1 Australian Journal of Teacher Education Teacher Knowledge and Learning In-situ: A Case Study of the Long Division Algorithm Shikha Takker K. Subramaniam Homi Bhabha Centre for Science Education, TIFR, Mumbai, India Abstract: The aim of the study reported in this paper was to explore and enhance experienced school mathematics teachers’ knowledge of students’ thinking, as it is manifested in practice. Data were collected from records of classroom observations, interviews with participating teachers, and weekly teacher-researcher meetings organized in the school. In this paper, we discuss the mathematical challenges faced by a primary school teacher as she attempts to unpack the structure of the division algorithm, while teaching in a Grade 4 classroom. Through this case study, we exemplify how a focus on mathematical knowledge for teaching ‘in situ’ helped in triggering a change in the teacher’s well-formed knowledge and beliefs about the teaching and learning of the division algorithm, and related students’ capabilities.
    [Show full text]
  • Solve 87 ÷ 5 by Using an Area Model. Use Long Division and the Distributive Property to Record Your Work. Lessons 14 Through 21
    GRADE 4 | MODULE 3 | TOPIC E | LESSONS 14–21 KEY CONCEPT OVERVIEW Lessons 14 through 21 focus on division. Students develop an understanding of remainders. They use different methods to solve division problems. You can expect to see homework that asks your child to do the following: ▪ Use the RDW process to solve word problems involving remainders. ▪ Show division by using place value disks, arrays, area models, and long division. ▪ Check division answers by using multiplication and addition. SAMPLE PROBLEM (From Lesson 21) Solve 87 ÷ 5 by using an area model. Use long division and the distributive property to record your work. ()40 ÷+54()05÷+()55÷ =+88+1 =17 ()51×+72= 87 Additional sample problems with detailed answer steps are found in the Eureka Math Homework Helpers books. Learn more at GreatMinds.org. For more resources, visit » Eureka.support GRADE 4 | MODULE 3 | TOPIC E | LESSONS 14–21 HOW YOU CAN HELP AT HOME ▪ Provide your child with many opportunities to interpret remainders. For example, give scenarios such as the following: Arielle wants to buy juice boxes for her classmates. The juice boxes come in packages of 6. If there are 19 students in Arielle’s class, how many packages of juice boxes will she need to buy? (4) Will there be any juice boxes left? (Yes) How many? (5) ▪ Play a game of Remainder or No Remainder with your child. 1. Say a division expression like 11 ÷ 5. 2. Prompt your child to respond with “Remainder!” or “No remainder!” 3. Continue with a sequence such as 9 ÷ 3 (No remainder!), 10 ÷ 3 (Remainder!), 25 ÷ 3 (Remainder!), 24 ÷ 3 (No remainder!), and 37 ÷ 5 (Remainder!).
    [Show full text]
  • Blind Mathematicians
    The World of Blind Mathematicians A visitor to the Paris apartment of the blind geome- able to resort to paper and pencil, Lawrence W. ter Bernard Morin finds much to see. On the wall Baggett, a blind mathematician at the University of in the hallway is a poster showing a computer- Colorado, remarked modestly, “Well, it’s hard to do generated picture, created by Morin’s student for anybody.” On the other hand, there seem to be François Apéry, of Boy’s surface, an immersion of differences in how blind mathematicians perceive the projective plane in three dimensions. The sur- their subject. Morin recalled that, when a sighted face plays a role in Morin’s most famous work, his colleague proofread Morin’s thesis, the colleague visualization of how to turn a sphere inside out. had to do a long calculation involving determi- Although he cannot see the poster, Morin is happy nants to check on a sign. The colleague asked Morin to point out details in the picture that the visitor how he had computed the sign. Morin said he must not miss. Back in the living room, Morin grabs replied: “I don’t know—by feeling the weight of the a chair, stands on it, and feels for a box on top of thing, by pondering it.” a set of shelves. He takes hold of the box and climbs off the chair safely—much to the relief of Blind Mathematicians in History the visitor. Inside the box are clay models that The history of mathematics includes a number of Morin made in the 1960s and 1970s to depict blind mathematicians.
    [Show full text]
  • A Note from Our Team
    A NOTE FROM OUR TEAM In order to become the business we aspire to be and help further elevate our industry, the communities we’re in, and beyond, we need to do better and that starts with rebuilding; to welcome guests in anew. Death & Co has always been a place of refuge, and now more than ever, we feel that is needed. To read more about our values, actions and initiatives please visit www.deathandcompany.com/change MISO-BUTTERSCOTCH POPCORN ■ ● 8 HOUSE NUTS & MARINATED OLIVES ■ ▲ 11 FRIED POTATOES ■ ▲ hatch chili, cotija, hot sauce aioli 13 KOREAN FRIED CHICKEN gochujang glaze, scallion, house pickles 16 PANZANELLA SALAD ● local heirloom tomatoes, house focaccia, fermented tomato vinegar, local arugula 16 SUMMER MEZE ■ ● garlic panisse, whipped tahini, charred pepper chimichurri, seasonal vegetables 19 COLORADO LAMB ■ corn esquites, abuela’s mole, snap pea & pickled vegetable slaw 24 D&C BURGER* ▲ mustard seed-ale cheddar, caramelized onion, smoked bacon, everything bun, local green salad 19 sub impossible burger +3 WARM D&C COOKIES ▲ ice cold milk 8 ICE CREAM FLOAT ■ ▲ house-made root beer, psychocandy ice cream 10 ■ gluten free ▲ veg/veg option ● vegan Fresh & Lively BLAZING SADDLES Silver Oat Whiskey, Pamplemousse, Lemon, Cinnamon, Tiki Bitters 14 LONG DIVISION Apple Brandy, Scotch, Blackstrap Rum, Cold Brew, Tonic 15 FLEAS ON A TRAPEZE Navy Strength Gin, Pear Brandy, Fennel, Lime, Seltzer 15 Bright & Confident CONGRESS PARK SWIZZLE Jamaican Rum, Mango Brandy, Blanc Vermouth, Lime, Pineapple, Mint 14 RETURN TO SENDER Blanco Tequila,
    [Show full text]