* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Long division for integers
Survey
Document related concepts
History of trigonometry wikipedia , lookup
Mathematical proof wikipedia , lookup
Location arithmetic wikipedia , lookup
Wiles's proof of Fermat's Last Theorem wikipedia , lookup
Fundamental theorem of algebra wikipedia , lookup
Georg Cantor's first set theory article wikipedia , lookup
Collatz conjecture wikipedia , lookup
P-adic number wikipedia , lookup
Elementary mathematics wikipedia , lookup
Approximations of π wikipedia , lookup
Transcript
Feasting on Leftovers: Summary notes on decimal representation of rational numbers • Math486-W11 • Y. Lai Feasting on Leftovers • January 2011 Summary notes on decimal representation of rational numbers – Contents – Long division for integers 1. Terminology 2. Description of division algorithm for integers (optional reading) Decimals of rational numbers eventually repeat or terminate 3. Leftovers and leftover sequences 4. Decimal sequences 5. Theorem and Proof of the Day: Rational expansion theorem Long division for integers 1 Terminology When we divide integers by each other, we may use the terminology quotient REM remainder divisor dividend which is shorthand for the relationship dividend = divisor · quotient + remainder. More compactly, q REM r b a means a = bq + r and 0 ≤ r < b. Here we are working with integer quotients. ◦ For example, 2 REM 6 7 20 ◦ ◦ is shorthand for the relationship 20 = 7 × 2 + 6. Sometimes we may want to work with real quotients, in which case we use the terminology quotient divisor dividend so that we can use the relationship dividend = divisor · quotient. ◦ For example, 0.285714 7 2 ◦ ◦ is shorthand for the relationship 2 = 7 × 0.285714. 1 Feasting on Leftovers: Summary notes on decimal representation of rational numbers • Math486-W11 • Y. Lai 2 Description of the division algorithm for integers (optional reading) We will work with only positive integers. While the theorems still hold for negative dividends, it is enough to get the idea of the theorems and their proofs by working with positive dividends. Although we will not go through this section in class, I am including it here in case you are interested, and because the mathematics is beautiful. Theorem (Division Algorithm Theorem for Integers [Usiskin, Theorem 5.3, p. 206]). Given positive integers a, b where a ≥ b > 0, there exist unique integers q, r so that a = bq + r and 0 ≤ r < b. The number q is called the quotient, and the number r is called the remainder. Proof of the Division Algorithm Theorem for Integers. The proof comes in two parts. 1. Such q and r exist. Consider all multiples of b, and find the one that is closest to a without being larger than a. We claim that if we set this multiple to qb, and let r = a − qb, then r must be less than b. To see this, by way of contradiction suppose that r ≥ b. Then (q + 1)b ≤ a, so we get the contradiction that qb wasn’t the closest multiple. So r must be less than b. We have now shown that we can construct q and r so that a = qb + r and 0 ≤ r < b. r −b r 0 r −b r 0 r r 2b b r ... r 3b r 4b r u a r 5b r r qb r u a r b 2. Such q and r are unique. Let q1 , q2 , r1 , r2 ∈ Z such that a = q1 b + r1 , a = q2 b + r2 , and 0 ≤ r1 , r2 < b. We show that this implies q1 = q2 and r1 = r2 : = q1 b + r1 a = q2 b + r2 =⇒ 0 = (q1 − q2 )b + (r1 − r2 ) a This means that |q1 − q2 |b = |r1 − r2 |. Because r1 and r2 are both less than b, we know that |r1 − r2 | < b. So |q1 − q2 | < 1. But q1 and q2 are integers, so the only way that this can happen is if q1 = q2 . If q1 = q2 , then 0 = 0 · b + (r1 − r2 ), implying r1 = r2 . We have shown that q1 = q2 and r1 = r2 as desired. 2 Feasting on Leftovers: Summary notes on decimal representation of rational numbers • Math486-W11 • Y. Lai Decimals of rationals eventually repeat or terminate Using long division, find the decimal expansions for: 2 7 4 13 Questions to think about: • What do you think the decimal expansions are? How would you justify that your answer is correct? • Before turning the page, circle the “remainders” after each step. Call these the leftover terms. What patterns do you see in the leftovers? Your observations motivate the technique we use in the theorem and proof of the day: Theorem (Rational Expansion Theorem). If r is a rational number, then the decimal expansion for r must either terminate or eventually be periodic. Before we get to the proof, we need to introduce some terminology to help us communicate our observations in a more precise way. 3 Feasting on Leftovers: Summary notes on decimal representation of rational numbers • Math486-W11 • Y. Lai 3 Describing Leftover Terms A leftover is the number that remains after each step of a long division problem, used to begin the next step. A critical property of leftovers is the following: 0 ≤ leftover < divisor. 3.1 Example In the division problem 7 2 , the leftover L 2 6 4 .. . gave us the decimal digit D 2 8 5 .. . Each leftover L is less than 7. How exactly did we get D from L in each one of these instances? 20 − 7 · 2 < 7 60 − 7 · 8 < 7 40 − 7 · 5 < 7 10L − 7 · D < 7 In each case, the decimal digit D is the largest multiple of 7 that is smaller than 10 times the leftover L for that step. 3.2 Leftover and Decimal Observation aka Predestination of Leftovers Observation (Leftover and Decimal Observation). In the division problem b a , suppose the leftover is L at a particular step. Then the decimal digit for that step is the largest integer D so that 10L − bD < b. (This is the same as saying that bD is the largest multiple of b that is less than or equal to 10L.) Moreover, the leftover for the next step is given by 10L − bD. These are the only decimal digits and leftovers possible. In other words, it’s impossible to do a long division problem and get more than one correct answer. 3.3 Leftover Sequences A leftover sequence is the sequence of leftovers of a division problem, in order. We count the term used in the first step of a division problem as a leftover. Example. The leftover sequence for the division problem 7 2 is . . . → 2 → 6 → 4 → 5 → 1 → 3 → ... 4 Feasting on Leftovers: Summary notes on decimal representation of rational numbers • Math486-W11 • Y. Lai where the above block repeats. (I circled the first term to keep track of where the division begins.) Example. Find the leftover sequence for the division problem 13 4 . ⊂→4 → 1 → 10 → 9 → 12 → 3 ⊃ Example. Find the leftover sequence for the division problem 4 1 . 1 → 2 → 0← ⊃ Example. Find the leftover sequence for the division problem 40 1 . 1 → 10 → 20 → 0← ⊃ Puzzler. . . Can we ever have the leftover sequence . . . → 2 → 3 → 2 → 1 → . . .? (Answer is upside down for your mathematical protection!) No – We can’t have both 3 and 1 follow 2, by predestination of leftovers and remainders. There is only one leftover that can follow 2. Another puzzler. . . Can we ever have the decimal sequence . . . 2, 3, 2, 1, 2, 3, 2, 1 . . .? Yes! This would represent a decimal such as 0.232123212321. . . . Unlike leftovers, it is not easy to predict what the next decimal digit will be. This is why we need to work with leftover sequences to prove things about decimals: it is easier to prove things if we can always predict what leftover will come next. Theorem (Leftover Sequence Theorem). Leftover sequences must eventually repeat. Proof. Let b a be a division problem. Suppose by contradiction that its leftover sequence never repeats. By the Leftover and Remainder Observation, never repeating means there must be an infinitely many different numbers in the leftover sequences. But leftovers must always lie between 0 and b (possibly including 0), and they are always whole numbers. This is a contradiction, as there cannot be an infinite number of whole numbers between 0 and b. So the remainder sequence must eventually repeat. Corollary (Leftover Block Length). Suppose a and b are positive integers. The repeating block of a leftover sequence for the division problem b a has length at most b − 1. Proof. Either the sequence has a 0 or not. Case 1: the leftover sequence contains a 0. If this is the case, then the sequence looks like . . . → 0← ⊃ . This is because the only leftover that can follow 0 is 0. So the repeating block is 0← ⊃ . This is a block of length 1. Case 2: the leftover sequence does not contain a 0. Then the only possibly numbers the leftover sequence can contain are 1, 2, . . . , b − 1. So the length of the repeated block is at most b − 1. 5 Feasting on Leftovers: Summary notes on decimal representation of rational numbers • Math486-W11 • Y. Lai 4 Decimal Sequences A decimal sequence is the decimal digits in the quotient of a division problem. Important fact: We can always read off the decimal sequence from the leftover sequence! Example. Write down the leftover sequence and decimal sequence for 7 2 . Can you get the decimal sequence from the leftover sequence without using the standard representation of the long division algorithm? ... ... /2 /6 /4 /5 /1 /3 20−7· 2 60−7· 8 40−7· 5 50−7· 7 10−7· 1 30−7· 4 2, 8, 5, 7, 1, 4, / ... leftover sequence ... decimal sequence Example. Find the decimal sequence for 5 4 . Relate it to the leftover sequence. The decimal sequence is 8, 0, 0, 0, 0, . . . and the leftover sequence is 4 → 0← ⊃. We get 8 from 4 because 8 · 5 is the largest multiple of 5 less than or equal to 40. We get 0 because 0 · 5 is the largest multiple of 5 less than or equal to 0. Cool Example. (a) Find the decimal expansions 7 3 and 7 5 . If you use the previous examples wisely, you will not have to do any long division! (Again, explanation is upside down for your mathematical protection.) We can read it off the leftover sequence for 7 2 . (!) This means that all the decimal expansions for n/7 are just rotations of each other! This is a beautiful consequence of the Leftover and Decimal Observation. Finally, we are ready for the theorem and proof of the day. 6 Feasting on Leftovers: Summary notes on decimal representation of rational numbers • Math486-W11 • Y. Lai 5 Theorem and Proof of the Day Theorem (Rational Expansion Theorem). If r = a/b is a rational number, where a, b ∈ Z, then a decimal expansion for r eventually terminates or repeats. Proof. The division problem b a gives us a decimal expansion for r. By the Leftover Sequence Theorem, the leftover sequence for b a must eventually repeat. Suppose the leftover sequence contains a 0. Then the leftover sequence eventually looks like 0← ⊃ , so the decimal sequence eventually looks like 0, 0, 0, . . ., meaning the decimal expansion terminates. Suppose the leftover sequence doesn’t contain a 0. Suppose the repeating block is . . . → L1 → L2 → . . . → L N → . . . . Then the decimal sequence must end with the repeating block . . . → D1 → D2 → . . . → D N → . . . where Dk is the largest multiple of b smaller than 10Lk , by the Leftover and Decimal Observation. Therefore the decimal sequence eventually repeats. We have now shown that given a rational number, its decimal expansion must either terminate or eventually repeat. 7