Thoughts on 1/7 and other rational numbers (Part 6)

In Part 5 of this series, I showed that fractions of the form \displaystyle \frac{M}{10^d}, \displaystyle \frac{M}{10^k - 1}, and \displaystyle \frac{M}{10^d (10^k-1)} can be converted into their decimal representations without using long division and without using a calculator.

The amazing thing is that every rational number \displaystyle \frac{a}{b} can be written in one of these three forms. Therefore, after this conversion is made, then the decimal expansion can be found without a calculator.

green line

Case 1. If the denominator b has a prime factorization of the form 2^m 5^n, then \displaystyle \frac{a}{b} can be rewritten in the form \displaystyle \frac{M}{10^d}, where d = \max(m,n).

For example,

\displaystyle \frac{3}{160} = \displaystyle \frac{3}{2^5 \times 5}

\displaystyle \frac{3}{160} = \displaystyle \frac{3}{2^5 \times 5} \times \frac{5^4}{5^4}

\displaystyle \frac{3}{160} = \displaystyle \frac{3 \times 5^4}{2^5 \times 5^5}

\displaystyle \frac{3}{160} = \displaystyle \frac{1875}{10^5}

\displaystyle \frac{3}{160} = 0.01875

The step of multiplying both sides by \displaystyle \frac{5^4}{5^4} is perhaps unusual, since we’re so accustomed to converting fractions into lowest terms and not making the numerators and denominators larger. This particular form of 1 was chosen in order to get a power of 10 in the denominator, thus facilitating the construction of the decimal expansion.

green line

Case 2. If the denominator b is neither a multiple of 2 nor 5, then  \displaystyle \frac{a}{b} can be rewritten in the form \displaystyle \frac{M}{10^k - 1}.

For example,

\displaystyle \frac{3}{11} = \displaystyle \frac{3}{11} \times \frac{9}{9}

\displaystyle \frac{3}{11} = \displaystyle \frac{27}{99}

\displaystyle \frac{3}{11} = 0.\overline{27}

This example wasn’t too difficult since we knew that 9 \times 11 = 99. However, finding the smallest value of k that works can be a difficult task requiring laborious trial and error.

However, we do have a couple of theorems that can assist in finding k. First, since k is the length of the repeating block, we are guaranteed that k must be less than the denominator b since, using ordinary long division, the length of the repeating block is determined by how many steps are required until we get a remainder that was seen before.

However, we can do even better than that. Using ideas from number theory, it can be proven that k must be a factor of \phi(b), which is the Euler toitent function or the number of integers less than b that are relatively prime with b. In the example above, the denominator was 11, and clearly, if 1 \le n < 11, then \gcd(n,11) = 1. Since there are 10 such numbers, we know that k must be a factor of 10. In other words, k must be either 1, 2, 5, or 10, thus considerably reducing the amount of guessing and checking that has to be done. (Of course, for the example above, k=2 was the least value of k that worked.)

In general, if n = p_1^{a_1} p_2^{a_2} \dots p_r^{a_r} is the prime factorization of n, then

\phi(n) = n \left( \displaystyle 1 - \frac{1}{p_1} \right) \left( \displaystyle 1 - \frac{1}{p_2} \right) \dots \left( \displaystyle 1 - \frac{1}{p_r} \right)

For the example above, since 11 was prime, we have \phi(11) = 11 \left( \displaystyle 1 - \frac{1}{11} \right) = 10.

green line

Case 3. Suppose the prime factorization of the denominator b both (1) contains 2 and/or 5 and also (2) another prime other than 2 and 5. This is a mixture of Cases 1 and 2, and the fraction \displaystyle \frac{a}{b} can be rewritten in the form \displaystyle \frac{M}{10^d (10^k-1)}.

For example, consider

\displaystyle \frac{11}{74} = \displaystyle \frac{11}{2 \times 37}

Following the rule for Case 1, we should multiply by \displaystyle \frac{5}{5} to get a 10 in the denominator:

\displaystyle \frac{11}{74} = \displaystyle \frac{11}{2 \times 37} \times \frac{5}{5} = \frac{55}{10 \times 37}

Next, we need to multiply 37 by something to get a number of the form 10^k - 1. Since 37 is prime, every number less than 37 is relatively prime with 37, so \phi(37) = 36. Therefore, k must be a factor of 36. So, k must be one of 1, 2, 3, 4, 6, 9, 12, 18, and 36.

(Parenthetically, while we’ve still got some work to do, it’s still pretty impressive that — without doing any real work — we can reduce the choices of k to these nine numbers. In that sense, the use of \phi(n) parallels how the Rational Root Test is used to determine possible roots of polynomials with integer coefficients.)

So let’s try to find the least value of k that works.

  • If k = 1, then 10^1 - 1 = 9, but 9 \div 37 is not an integer.
  • If k = 2, then 10^2 - 1 = 99, but 99 \div 37 is not an integer.
  • If k = 3, then 10^3 - 1 = 999, and it turns out that 999 \div 37 = 27, an integer.

Therefore,

\displaystyle \frac{11}{74} = \frac{55}{10 \times 37} \times \frac{27}{27}

\displaystyle \frac{11}{74} = \frac{1485}{10 \times 999}

\displaystyle \frac{11}{74} = \frac{999 + 486}{10 \times 999}

\displaystyle \frac{11}{74} = \frac{999}{10 \times 999}+ \frac{486}{10 \times 999}

\displaystyle \frac{11}{74} = \frac{1}{10}+ \frac{486}{10 \times 999}

\displaystyle \frac{11}{74} = 0.1 + 0.0\overline{486}

\displaystyle \frac{11}{74} = 0.1\overline{486}

Thoughts on 1/7 and other rational numbers (Part 5)

Students are quite accustomed to obtaining the decimal expansion of a fraction by using a calculator. Here’s an (uncommonly, I think) taught technique for converting certain fractions into a decimal expansion without using long division and without using a calculator. I’ve taught this technique to college students who want to be future high school teachers for several years, and it never fails to surprise.

First off, it’s easy to divide any number by a power of 10, or 10^k. For example,

\displaystyle \frac{4312}{1000} = 4.312 and \displaystyle \frac{71}{10000} = 0.00071

What’s less commonly known is that it’s also easy to divide by 10^k - 1, or 99\dots 9, a numeral with k consecutive 9s. (This number can be used to prove the divisibility rules for 3 and 9 and is also the subject of one of my best math jokes.) The rule can be illustrated with a calculator:

TI999

In other words, if M < 10^k - 1, then the decimal expansion of \displaystyle \frac{M}{10^k-1} is a repeating block of k digits containing the numeral M, possibly adding enough zeroes to fill all k digits.

To prove that this actually works, we notice that

\displaystyle \frac{M}{10^k - 1} = M \times \frac{ \displaystyle \frac{1}{10^k}}{\quad \displaystyle 1 - \frac{1}{10^k} \quad}

 \displaystyle \frac{M}{10^k - 1} = M \times \left(\displaystyle \frac{1}{10^k} + \frac{1}{10^{2k}} + \frac{1}{10^{3k}} + \dots \right)

\displaystyle \frac{M}{10^k-1} = M \times 0.\overline{00\dots01}

The first line is obtained by multiplying the numerator and denominator by \displaystyle \frac{1}{10^k}. The second line is obtained by using the formula for an infinite geometric series in reverse, so that the first term is \displaystyle \frac{1}{10^k} and the common ratio is also \displaystyle \frac{1}{10^k}. The third line is obtained by converting the series — including only powers of 10 — into a decimal expansion.

If M > 10^k - 1, then the division algorithm must be used to get a numerator that is less than 10^k-1. Fortunately, dividing big numbers by 10^k-1 is quite easy and can be done without a calculator. For example, let’s find the decimal expansion of \displaystyle \frac{123456}{9999} without a calculator. First,

123456 = 12(10000) + 3456

123456 = 12(9999 + 1) + 3456

123456 = 12(9999) + 12(1) + 3456

123456 = 12(9999) + 3468

Therefore,

\displaystyle \frac{123456}{9999} = \displaystyle \frac{12(9999) + 3468}{9999}

\displaystyle \frac{123456}{9999} = \displaystyle \frac{12(9999)}{9999} + \frac{3468}{9999}

\displaystyle \frac{123456}{9999} = \displaystyle 12 + \frac{3468}{9999}

\displaystyle \frac{123456}{9999} = \displaystyle 12.\overline{3468}

This can be confirmed with a calculator. Notice that the repeating block doesn’t quite match the digits of the numerator because of the intermediate step of applying the division algorithm.

TI9999

green line

In the same vein, it’s also straightforward to find the decimal expansion of fractions of the form \displaystyle \frac{M}{10^d (10^k-1)}, so that the denominator has the form 99\dots9900\dots00. This is especially easy if M < 10^k -1. For example,

\displaystyle \frac{123}{99900} = \frac{1}{100} \times \frac{123}{999} = \frac{1}{100} \times 0.\overline{123} = 0.00\overline{123}

On the other hand, if M > 10^k-1, then the division algorithm must be applied as before. For example, let’s find the decimal expansion of \displaystyle \frac{51237}{99000}. To begin, we need to divide the numerator by 99, as before. Notice that, for this example, an extra iteration of the division algorithm is needed to get a remainder less than 99.

51237 = 512(100) + 37

51237 = 512(99 + 1) + 37

51237 = 512(99) + 512 + 37

51237 = 512(99) + 549

51237= 512(99) + 5(100) + 49

51237 = 512(99) + 5(99 + 1) + 49

51237 = 512(99) + 5(99) + 5 + 49

51237 = 517(99) + 54

Therefore,

\displaystyle \frac{51237}{99000} = \displaystyle \frac{517(99) + 54}{99000}

\displaystyle \frac{51237}{99000} = \displaystyle \frac{517(99)}{99000} + \frac{54}{99000}

\displaystyle \frac{51237}{99000} = \displaystyle \frac{517}{1000} + \frac{54}{99000}

\displaystyle \frac{51237}{99000} = 0.517 + 0.000\overline{54}

\displaystyle \frac{51237}{99000} = 0.517\overline{54}

In particular, notice that the three 0s in the denominator correspond to a delay of length 3 (the digits 517), while the 99 = 10^2 - 1 in the denominator corresponds to the repeating block of length 2.

These can be confirmed for students who may be reluctant to believe that decimal expansions can be found without a calculator.

TI99000

Thoughts on 1/7 and other rational numbers (Part 4)

In Part 3 of this series, I considered the conversion of a repeating decimal expansion into a fraction. This was accomplished by an indirect technique which was pulled out of the patented Bag of Tricks. For example, if x = 0.\overline{432} = 0.432432432\dots, we start by computing 1000x and then subtracting.

1000x = 432.432432\dots

x = 0.432432\dots

999x = 432

x = \displaystyle \frac{432}{999} = \displaystyle \frac{16}{37}

As mentioned in Part 3, most students are a little bit skeptical that this actually works, and often need to type the final fraction into a calculator to be reassured that the method actually works. Most students are also a little frustrated with this technique because it does come from the Bag of Tricks. After all, the first two steps (setting the decimal equal to x and then multiplying x by 1000) are hardly the most intuitive things to do first… unless you’re clairvoyant and know what’s going to happen next.

In this post, I’d like to discuss a more direct way of converting a repeating decimal into a fraction. In my experience, this approach presents a different conceptual barrier to students. This is a more direct approach, and so students are more immediately willing to accept its validity. However, the technique uses the formula for an infinite geometric series, which (unfortunately) most senior math majors cannot instantly recall. They’ve surely seen the formula before, but they’ve probably forgotten it because a few years have passed since they’ve had to extensively use the formula.

Anyway, here’s the method applied to 0.\overline{432}. To begin, we recall the meaning of a decimal representation in the first place:

0.432432432 \dots = \displaystyle \frac{4}{10} + \frac{3}{100} + \frac{2}{1000} + \displaystyle \frac{4}{10^4} + \frac{3}{10^5} + \frac{2}{10^6} + \displaystyle \frac{4}{10^7} + \frac{3}{10^8} + \frac{2}{10^9} + \dots

Combining fractions three at a time (matching the length of the repeating block), we get

0.432432432 \dots = \displaystyle \frac{432}{10^3} + \displaystyle \frac{432}{10^6} + \frac{432}{10^9} + \dots

This is an infinite geometric series whose first term is \displaystyle \frac{432}{10^3}, and the common ratio that’s multiplied to go from one term to the next is \displaystyle \frac{1}{10^3}. Using the formula for an infinite geometric series and simplifying, we conclude

0.432432432 \dots = \displaystyle \frac{ \quad \displaystyle \frac{432}{1000} \quad }{\quad 1 - \displaystyle \frac{1}{1000} \quad}

0.432432432 \dots = \displaystyle \frac{ \displaystyle \quad \frac{432}{1000} \quad}{ \displaystyle \quad \frac{999}{1000} \quad}

0.432432432 \dots = \displaystyle \frac{ 432}{ 999}

0.432432432 \dots = \displaystyle \frac{ 16}{ 37}

green line

For what it’s worth, the decimal representation could have been simplified by using three separate geometric series. Some students find this to be more intuitive, combining the unlike fractions at the final step as opposed to the initial step.

0.432432432 \dots = \left( \displaystyle \frac{4}{10} + \frac{4}{10^4} + \displaystyle \frac{4}{10^7} + \dots \right)

\quad \quad \quad \quad + \left( \displaystyle \frac{3}{100} + \frac{3}{10^5} + \displaystyle \frac{3}{10^8} + \dots \right)

+ \left( \displaystyle \frac{2}{1000} + \frac{2}{10^6} + \displaystyle \frac{2}{10^9} + \dots \right)

0.432432432 \dots = \displaystyle \frac{ \quad \displaystyle \frac{4}{10} \quad }{\quad 1 - \displaystyle \frac{1}{1000} \quad} + \frac{ \quad \displaystyle \frac{3}{100} \quad }{\quad 1 - \displaystyle \frac{1}{1000} \quad} + \frac{ \quad \displaystyle \frac{2}{1000} \quad }{\quad 1 - \displaystyle \frac{1}{1000} \quad}

0.432432432 \dots = \displaystyle \frac{ \quad \displaystyle \frac{4}{10} \quad }{\quad \displaystyle \frac{999}{1000} \quad} + \frac{ \quad \displaystyle \frac{3}{100} \quad }{\quad \displaystyle \frac{999}{1000} \quad} + \frac{ \quad \displaystyle \frac{2}{1000} \quad }{\quad \displaystyle \frac{999}{1000} \quad}

0.432432432 \dots = \displaystyle \frac{ 400}{ 999} + \frac{30}{999} + \frac{2}{999}

0.432432432 \dots = \displaystyle \frac{ 432}{ 999}

0.432432432 \dots = \displaystyle \frac{ 16}{ 37}

green lineFinally, this direct technique also works for repeating decimals with a delay, like 0.41\overline{6}.

0.41666\dots = \displaystyle \frac{4}{10} + \frac{1}{100} + \left( \frac{6}{1000} + \frac{6}{10^4} + \frac{6}{10^5} + \dots \right)

0.41666\dots = \displaystyle \frac{4}{10} + \frac{1}{100} + \displaystyle \frac{ \quad \displaystyle \frac{6}{1000} \quad }{\quad 1 - \displaystyle \frac{1}{10} \quad}

0.41666\dots = \displaystyle \frac{4}{10} + \frac{1}{100} +\displaystyle \frac{ \quad \displaystyle \frac{6}{1000} \quad }{\quad \displaystyle \frac{9}{10} \quad}

0.41666\dots = \displaystyle \frac{4}{10} + \frac{1}{100} +\frac{6}{900}

0.41666\dots = \displaystyle \frac{375}{900}

0.41666\dots = \displaystyle \frac{5}{12}

Thoughts on 1/7 and other rational numbers (Part 3)

In Part 2 of this series, I discussed the process of converting a fraction into its decimal representation. In this post, I consider the reverse: starting with a decimal representation, and ending with a fraction.

Let me say at the onset that the process I’m about to describe appears to be a dying art. When I show this to my math majors who want to be high school teachers, roughly half have either not seen it before or else have no memory of seeing it before. (As always, I hold my students blameless for the things that they were simply not taught at a younger age, and part of my job is repairing these odd holes in their mathematical backgrounds so that they’ll have their best chance at becoming excellent high school math teachers.) I’m guessing that this algorithm is a dying art because of the ease and convenience of modern calculators.

So let me describe how I describe this procedure to my students. To begin, suppose that we’re given a repeating decimal like 0.\overline{432} = 0.432432432\dots. How do we change this into a decimal? Let’s call this number x.

I’m now about to do something that, if you don’t know what’s coming next, appears to make no sense. I’m going to multiply x by 1000. Students often give skeptical, quizzical, and/or frustrated looks about this non-intuitive next step… they’re thinking, “How would I ever have thought to do that on my own?” To allay these concerns, I explain that this step comes from the patented Bag of Tricks. Socrates gave the Bag of Tricks to Plato, Plato gave it to Aristotle, it passed down the generations, my teacher taught the Bag of Tricks to me, and I teach it to my students. Multiplying by 1000 on the next step is absolutely not obvious, unless you happen to know via clairvoyance what’s going to come next.

Anyway, let’s write down x and also 1000x.

1000x = 432.432432\dots

x = 0.432432\dots

Notice that the decimal parts of both x and 1000x are the same. Subtracting, the decimal parts cancel, leaving

999x = 432

or

x = \displaystyle \frac{432}{999} = \displaystyle \frac{16}{37}

In my experience, most students — even senior math majors who have taken a few theorem-proof classes and hence are no dummies — are a little stunned when they see this procedure for the first time. To make this more real and believable to them, I then ask them to pop out their calculators to confirm that this actually worked. (Indeed, many students need this confirmation to be psychologically sure that it really did work.)

TI1637

Then I ask my students, why did we multiply by 1000? They’ll usually give the correct answer: so that the decimal parts will cancel. My follow-up question is, what should we do if the decimal is 0.\overline{24}? They’ll usually respond that we should multiply by 100 or, in general, by 10^n, where n is the length of the repeating block.

This strategy, of course, works for $0.\overline{142857}$, eventually yielding

0.\overline{142587} = \displaystyle \frac{142857}{999999} = \displaystyle \frac{1}{7}

after cancellation.

green line

The same procedure works for decimal expansions with a delay, like x = 0.72\overline{3}. This time, I’ll ask them how we should go about changing this into a fraction. I usually get at least one of three responses. I love getting multiple responses, as this gives the students a chance to came the “different” answers, compare the different strategies, and

Answer #1. Multiply x by 1000 since the repeating pattern starts at the 3rd decimal place.

1000x = 723.333\dots

x = 0.7233\dots

\therefore 999x = 722.61

x =\displaystyle\frac{722.61}{999} = \displaystyle\frac{72261}{99900} = \displaystyle \frac{217}{300}

Answer #2. Multiply x by 10 since the repeating block has length 1.

10x = 7.23333\dots

x = 0.7233\dots

\therefore 9x = 6.51

x = \displaystyle \frac{6.51}{9} = \displaystyle\frac{651}{900} = \displaystyle\frac{217}{300}

Answer #3. First multiply x by 100 to get rid of the delay. Then multiply 100 x by an extra 10 since the repeating block has length 1.

1000x = 723.333\dots

100x = 72.33\dots

\therefore 900x = 651

x = \displaystyle\frac{651}{900} = \displaystyle\frac{217}{300}

green line

The above discussion concerned repeating decimals. For completeness, converting terminating decimals into a fraction is easy. For example,

0.124 = \displaystyle \frac{1}{10} + \frac{2}{100} + \frac{4}{1000} = \displaystyle \frac{124}{1000} = \displaystyle \frac{31}{250}

green line

One more thought. The concept behind Part 2 of this series shows that a rational number of the form k/n, where both k and n are integers, must have either a terminating decimal expansion or else a repeating decimal expansion (possibly with a delay). In this post, we went the other direction. Therefore, we have the basis for the following theorem.

Theorem. A number x is rational if and only if it has either a terminating decimal expansion or else a repeating decimal expansion.

The contrapositive of this theorem is perhaps intuitively obvious.

Theorem. A number x is irrational if and only if it has a non-terminating and non-repeating decimal expansion.

In my experience, most students absolutely believe both of these theorems. For example, most students believe that \sqrt{2} has a decimal expansion that neither terminates nor repeats. That said, most math majors are surprised to discover that it does take quite a bit of work — like a formal write-up of Parts 2 and 3 of this series — to actually prove this statement from middle-school mathematics.

Thoughts on 1/7 and other rational numbers (Part 2)

Let’s take another look at the decimal expansion of 1/7:

TI17

This result from a calculator should convince most students that \displaystyle \frac{1}{7} = 0.\overline{142857}. After all, there’s a second 142 after the first 7, and the ending 9 is consistent with rounding up the 857.

So the evidence that \displaystyle \frac{1}{7} = 0.\overline{142857} is persuasive.

But does this prove beyond a shadow of a doubt that this decimal representation is correct?

Sadly, no. Taken by itself, the result of the calculator is also consistent with, to give just one example, \displaystyle \frac{1}{7} = 0.\overline{142857142910235}, which also would truncate after 10 decimal places to the result shown above.

In short, the calculator gives evidence that the decimal expansion is correct, but does not prove that it’s correct.

Which leads to the obvious question: how do we prove it?

green_speech_bubble

One method, which used to be taught in elementary school (I honestly don’t know if this is taught anymore), is by traditional long division:longdivision17

After six steps, we finally get to a remainder that was previously seen (in this case, on the first step). Therefore, we tell students, the subsequent digits have to repeat.

By the way, this is the essence of the proof for why every rational number has either a repeating decimal representation (possibly with a delay, like 0.1\overline{6}) or else a terminating decimal representation. Though a more formal proof would be preferred by professional mathematicians, the idea is simple: in the algorithm for long division for k/n, there are only n possible remainders: 0, 1, \dots, n-1. So we eventually have to arrive at a remainder that was seen before. If that remainder is 0, then the decimal representation terminates. Otherwise, the decimal representation repeats itself.

In my experience, every math major that I’ve ever met intuitively knows that the above theorem is true. After all, they’ve worked intensively with decimals since 5th grade and have seen decimals in the lower elementary grades. However, very few can articulate why it’s true.

Thoughts on 1/7 and other rational numbers (Part 1)

I’m guessing that not many people ever blocked time out of their busy schedules to purposefully memorize the decimal representation of a fraction. Nevertheless, in my experience, most math majors and math teachers can immediately convert, from memory, most (but not all — more on this later) fractions of the form \displaystyle \frac{k}{n} into its decimal representation as long as the denominator n is less than or equal to 10. They can also go the other direction, mentally recognizing a decimal expansion as a fraction of this form.

This memorization occurs not because of purposeful study but because these fractions arise so commonly from 6th grade through college that students can’t help but memorize them. They just come up so often that good students almost can’t help but memorize them.

Here are the decimal representations of \displaystyle \frac{k}{n}, where the fraction is in lowest terms and 1 \le k < n \le 10.

\displaystyle \frac{1}{2} = 0.5

\displaystyle \frac{1}{3} = 0.\overline{3} \quad \displaystyle \frac{2}{3} = 0.\overline{6}

\displaystyle \frac{1}{4} = 0.25 \quad \displaystyle \frac{3}{4} = 0.75

\displaystyle \frac{1}{5} = 0.2 \quad \displaystyle \frac{2}{5} = 0.4 \quad \displaystyle \frac{3}{5} = 0.6 \quad \displaystyle \frac{4}{5} = 0.8

\displaystyle \frac{1}{6} = 0.1\overline{6} \quad \displaystyle \frac{5}{6} = 0.8\overline{3}

\displaystyle \frac{1}{7} = 0.\overline{142857} \quad \displaystyle \frac{2}{7} = 0.\overline{285714} \quad \displaystyle \frac{3}{7} = 0.\overline{428571}

\displaystyle \frac{4}{7} = 0.\overline{571428} \quad \displaystyle \frac{5}{7} = 0.\overline{714285} \quad \displaystyle \frac{6}{7} = 0.\overline{857142}

\displaystyle \frac{1}{8} = 0.125 \quad \displaystyle \frac{3}{8} = 0.375 \quad \displaystyle \frac{5}{8} = 0.625 \quad \displaystyle \frac{7}{8} = 0.875

\displaystyle \frac{1}{9} = 0.\overline{1} \quad \displaystyle \frac{2}{9} = 0.\overline{2} \quad \displaystyle \frac{4}{9} = 0.\overline{4} \quad \displaystyle \frac{5}{9} = 0.\overline{5} \quad \displaystyle \frac{7}{9} = 0.\overline{7} \quad \displaystyle \frac{8}{9} = 0.\overline{8}

\displaystyle \frac{1}{10} = 0.1 \quad \displaystyle \frac{3}{10} = 0.3 \quad \displaystyle \frac{7}{10} = 0.7 \quad \displaystyle \frac{9}{10} = 0.9

Like I said, most (but not all) of these have been memorized by math majors and math teachers. The exceptions, not surprisingly, are the fractions with a denominator of 7.

When I was a child, I read somewhere the following rule for memorizing the decimal expansion of \displaystyle \frac{k}{7}. I must have been lucky, because I have yet to meet a student that also saw this rule. The following is not a formal proof of the rule, but it does work for the purposes of memorization.

Step 1. Let’s begin with \displaystyle \frac{1}{7}. The decimal expansion can be remembered by repeating “3, 2, 6” along with repeating “up, down.” Repeating both patterns, we get

up 3

down 2

up 6

down 3

up 2

down 6

So,

Start at 1:

up 3: \quad 1 + 3 = 4

down 2: \quad 4 - 2 = 2

up 6: \quad 2 + 6 = 8

down 3: \quad 8 - 3 = 5

up 2: \quad 5 + 2 = 7

down 6: \quad 7 - 6 = 1

The pattern returns back to 1, and the digits repeat. That’s the decimal expansion:

\displaystyle \frac{1}{7} = 0.142857142857\dots

Steps 2-6. For \displaystyle \frac{2}{7}, \dots, \frac{6}{7}, the digits repeat in the same pattern as \displaystyle \frac{1}{7}, just starting at a different place. For example:

For \displaystyle \frac{2}{7}, the second smallest of the digits 1, 4, 2, 8, 5, \hbox{~and~} 7 is 2. So we’ll drop the first 1 and 4 and start on 2:

\displaystyle \frac{1}{7} = 0.2857142857\dots = 0.\overline{285714}

For \displaystyle \frac{4}{7}, the fourth smallest of the digits 1, 4, 2, 8, 5, \hbox{~and~} 7 is 5. So we’ll drop the first 1, 4, 2, and 8 and start on 5:

\displaystyle \frac{4}{7} = 0.57142857\dots = 0.\overline{571428}

green line

P.S. Plenty of math majors (though perhaps not a majority) have also memorized the decimal expansions of \displaystyle\frac{k}{11} and \displaystyle \frac{k}{12}. For 11, the rule is multiply k by 9 to form the two-digit repeating block. In other words:

4 \times 9 = 36, and so \displaystyle \frac{4}{11} = 0.\overline{36}

8 \times 9 = 72, and so \displaystyle \frac{8}{11} = 0.\overline{72}

1 \times 9 = 9, and so \displaystyle \frac{1}{11} = 0.\overline{09}

For 12, the only lowest-term fractions are \displaystyle \frac{1}{12}, \displaystyle \frac{5}{12}, \displaystyle \frac{7}{12}, and \displaystyle \frac{11}{12}. To begin, the first should be memorized:

\displaystyle \frac{1}{12} = 0.08333\dots = 0.08\overline{3}

The others are obtained by addition or subtraction:

\displaystyle \frac{7}{12} = \displaystyle \frac{1}{2} + \frac{1}{12} = 0.5 + 0.08333\dots = 0.58333\dots = 0.58\overline{3}

\displaystyle \frac{5}{12} = \displaystyle \frac{1}{2} - \frac{1}{12} = 0.5 - 0.08333\dots = 0.41666\dots = 0.41\overline{3}

\displaystyle \frac{11}{12} = 1 - \frac{1}{12} = 1 - 0.08333\dots = 0.91666\dots = 0.91\overline{6}

Calculator errors: When close isn’t close enough (Part 2)

In the previous post, I gave a simple classroom demonstration to illustrate that some calculators only approximate an infinite decimal expansion with a terminating decimal expansion, and hence truncation errors can propagate. This example addresses the common student question, “What’s the big deal if I round off to a few decimal places?”

TItrunc1

(For what it’s worth, I’m aware that some current high-end calculators are miniature computer algebra systems and can formally handle an answer of \displaystyle \frac{1}{3} instead of its decimal expansion.)

Students may complain that the above exercise is artificial and unlikely to occur in real life. I would suggest following up with a real-world, non-artificial, and tragic example of an accident that happened in large part due to truncation error. This incident occurred during the first Gulf War in 1991 (perhaps ancient history to today’s students). I’m going to quote directly from the website http://www.ima.umn.edu/~arnold/disasters/patriot.html, published by Dr. Douglas Arnold at the University of Minnesota. Perhaps students don’t need to master the details of this explanation (a binary expansion as opposed to a decimal expansion might be a little abstract), but I think that this example illustrates truncation error vividly.

On February 25, 1991, during the Gulf War, an American Patriot Missile battery in Dharan, Saudi Arabia, failed to track and intercept an incoming Iraqi Scud missile. The Scud struck an American Army barracks, killing 28 soldiers and injuring around 100 other people. Patriot missile A report of the General Accounting office, GAO/IMTEC-92-26, entitled Patriot Missile Defense: Software Problem Led to System Failure at Dhahran, Saudi Arabia reported on the cause of the failure.

It turns out that the cause was an inaccurate calculation of the time since boot due to computer arithmetic errors. Specifically, the time in tenths of second as measured by the system’s internal clock was multiplied by 1/10 to produce the time in seconds. This calculation was performed using a 24 bit fixed point register. In particular, the value 1/10, which has a non-terminating binary expansion, was chopped at 24 bits after the radix point. The small chopping error, when multiplied by the large number giving the time in tenths of a second, led to a significant error.

Indeed, the Patriot battery had been up around 100 hours, and an easy calculation shows that the resulting time error due to the magnified chopping error was about 0.34 seconds.

The number 1/10 equals

\displaystyle \frac{1}{2^4} + \frac{1}{2^5} +\frac{1}{2^8} + \frac{1}{2^9} + \frac{1}{2^{12}} + \frac{1}{2^{13}} + \dots

In other words, the binary expansion of 1/10 is

0.0001100110011001100110011001100....

Now the 24 bit register in the Patriot stored instead

0.00011001100110011001100

introducing an error of

0.0000000000000000000000011001100... binary,

or about 0.000000095 decimal. Multiplying by the number of tenths of a second in 100 hours gives

0.000000095 \times 100 \times 60 \times 60 \times 10=0.34.

A Scud travels at about 1,676 meters per second, and so travels more than half a kilometer in this time. This was far enough that the incoming Scud was outside the “range gate” that the Patriot tracked.

Ironically, the fact that the bad time calculation had been improved in some parts of the code, but not all, contributed to the problem, since it meant that the inaccuracies did not cancel.

The following paragraph is excerpted from the GAO report.

The range gate’s prediction of where the Scud will next appear is a function of the Scud’s known velocity and the time of the last radar detection. Velocity is a real number that can be expressed as a whole number and a decimal (e.g., 3750.2563…miles per hour). Time is kept continuously by the system’s internal clock in tenths of seconds but is expressed as an integer or whole number (e.g., 32, 33, 34…). The longer the system has been running, the larger the number representing time. To predict where the Scud will next appear, both time and velocity must be expressed as real numbers. Because of the way the Patriot computer performs its calculations and the fact that its registers are only 24 bits long, the conversion of time from an integer to a real number cannot be any more precise than 24 bits. This conversion results in a loss of precision causing a less accurate time calculation. The effect of this inaccuracy on the range gate’s calculation is directly proportional to the target’s velocity and the length of the the system has been running. Consequently, performing the conversion after the Patriot has been running continuously for extended periods causes the range gate to shift away from the center of the target, making it less likely that the target, in this case a Scud, will be successfully intercepted.

green line

A quick note of clarification. To verify the binary expansion of 1/10, we use the formula for an infinite geometric series.

S = \displaystyle \left(\frac{1}{2^4} + \frac{1}{2^5}\right) +\left(\frac{1}{2^8} + \frac{1}{2^9}\right) + \left(\frac{1}{2^{12}} + \frac{1}{2^{13}}\right) + \dots

S = \displaystyle \frac{3}{2^5} + \frac{3}{2^9} + \frac{3}{2^{13}} + \dots

S = \displaystyle \frac{\displaystyle \frac{3}{2^5}}{\quad \displaystyle 1 - \frac{1}{2^4} \quad}

S = \displaystyle \frac{\displaystyle \frac{3}{32}}{\quad \displaystyle \frac{15}{16} \quad}

S = \displaystyle \frac{3}{32} \times \frac{16}{15}

S = \displaystyle \frac{1}{10}

OK, that verifies the answer. Still, a curious student may wonder how one earth one could directly convert 1/10 into binary without knowing the above series ahead of time. I will address this question in a future post.

Calculator errors: When close isn’t close enough (Part 1)

Far too often, students settle for a numerical approximation of a solution that can be found exactly. To give an extreme example, I have met quite intelligent college students who were convinced that \displaystyle \frac{1}{3} was literally equal to 0.3.

That’s an extreme example of something that nearly all students do — round off a complicated answer to a fixed number of decimal places. In trigonometry, many students will compute \sin \left( \cos^{-1} 0.3 \right) by plugging into a calculator and reporting the first three to six decimal places, like 0.95394. This is especially disappointing when there are accessible techniques for getting the exact answer (in this case, \displaystyle \frac{\sqrt{91}}{10}) without using a calculator at all.

pictsqrt9110

TIsqrt9110

Unfortunately, even maintaining eight, nine, or ten decimal places of accuracy may not be good enough, as errors tend to propagate as a calculation continues. I’m sure every math teacher has an example where the correct answer was exactly $\displaystyle\frac{3}{2}$ but students returned an answer of 1.4927 or 1.5031 because of roundoff errors.

Students may ask, “What’s the big deal if I round off to five decimal places?” Here’s a simple example — which can be quickly demonstrated in a classroom — of how such truncation errors can propagate. I’m going to generate a recursive sequence. I will start with \displaystyle \frac{1}{3}. Then I will alternate multiplying by 1000 and then subtracting 333. More mathematically,

 a_1 = \displaystyle \frac{1}{3}

a_{2n} = 1000 a_{2n-1}

a_{2n+1} = a_{2n} - 333 if n > 0

Here’s what happens exactly:

1000 \times \displaystyle \frac{1}{3} = \displaystyle \frac{1000}{3} = \displaystyle 333\frac{1}{3} = 333.\overline{3}

\displaystyle 333\frac{1}{3} - 333 = \displaystyle \frac{1}{3} = 0.\overline{3}

So, repeating these two steps, the sequence alternates between \displaystyle \frac{1}{3} and \displaystyle 333\frac{1}{3}.

But looks what happens if I calculate the first twelve terms of this sequence on a calculator.

TItrunc1

Notice that by the time I reach a_{11}, the terms of the sequence are negative, which is clearly incorrect.

So what happened?

This is a natural by-product of the finite storage of a calculator. The calculator doesn’t store infinitely many digits of $\displaystyle \frac{1}{3}$ in memory because a calculator doesn’t possess an infinite amount of memory. Instead, what gets stored is something like the terminating decimal 0.33333333333333, with about fourteen 3s. (Of course, only the first ten digits are actually displayed.)

So multiplying by 1000 and then subtracting 333 produces a new and different terminating decimal with three less 3s. Do this enough times, and you end up with negative numbers.

Full lesson plan: Platonic solids

Over the summer, I occasionally teach a small summer math class for my daughter and her friends around my dining room table. Mostly to preserve the memory for future years… and to provide a resource to my friends who wonder what their children are learning… I’ll write up the best of these lesson plans in full detail.

This was the first lesson that I taught to this audience: constructing the five regular polyhedra and inductively deriving Euler’s formula. This lesson plan is written in a 5E format — engage, explore, explain, elaborate, evaluate — which promotes inquiry-based learning and fosters student engagement.

Platonic Solids Lesson

Post Assessment 1

Post Assessment 2

V-E-F Chart

Vocabulary Sheet

Engaging students: Distinguishing between inductive and deductive reasoning

In my capstone class for future secondary math teachers, I ask my students to come up with ideas for engaging their students with different topics in the secondary mathematics curriculum. In other words, the point of the assignment was not to devise a full-blown lesson plan on this topic. Instead, I asked my students to think about three different ways of getting their students interested in the topic in the first place.

I plan to share some of the best of these ideas on this blog (after asking my students’ permission, of course).

This student submission again comes from my former student Caitlin Kirk. Her topic, from Geometry (and proof writing): distinguishing between inductive and deductive reasoning.

green line

C. Culture: How has this topic appeared in pop culture (movies, TV, current music, video games, etc.)?

Inductive and deductive reasoning are often used on TV, radio, or in print in the form of advertising.

Deductive Reasoning

Man: What’s better, faster or slower?

All kids: Faster!

Man: And what’s fast?

Boy: My mom’s car and a cheetah.

Girl: A space ship.

Man: And what’s slow?

Boy: My grandma’s slow.

Man: Would you like her better if she was fast?

Boy: I bet she would like it if she was fast.

Man: Hmm, maybe give her some turbo boosters?

Boy: Or tape a cheetah to her back.

Man: Tape a cheetah to her back, it seems like you’ve thought about this before.

Narrator: It’s not complicated, faster is better. And iPhone 5 downloads fastest on AT&T 4G.

Deductive reasoning, which applies a general rule to specific examples, can be seen in advertisements like the AT&T commercial above. The kids establish in their conversation that faster things are better. The narrator says that iPhone 5 downloads fastest on AT&T 4G. Thus the viewer is left with the conclusion that AT&T 4G is better. This commercial’s deduction can be summed up as follows:

Faster things are better.

AT&T 4G is faster.

AT&T 4G is better. (conclusion)

Inductive Reasoning

Hotch: Sprees usually end in suicide. If he’s got nothing to live for, why wouldn’t he end it?

Reid: Because he’s not finished yet.

Reid: He’s obviously got displaced anger and took it out on his first victim.

Hotch: The stock boy represented someone. We need to know who. What about the other victims.

Reid: Defensive.

Hotch: Was he military?

Garcia: Negative.

Hotch: He’s lashing out. There’s got to be a reason. Rossi and Prentiss, dig through his house. Reid and JJ, get to the station. Morgan and I will take the crime scene. This guy’s got anger, endless targets and a gun. And from the looks of it, he just got started.

Inductive reasoning, which uses specific examples to make a general rule, can be seen frequently in episodes of TV shows or movies that involve crime scene investigation. The show Criminal Minds features a special unit of the FBI that profiles criminals. They do this by interviewing criminals who have already been caught and then inducing general rules about all criminals in order to catch the one they are looking for. Conversations among the profilers, like the one above, lead to inductive reasoning that can be summed up as follows:

He has nothing to live for.

He doesn’t want to commit suicide.

He wasn’t in the military.

He has displaced anger.

He has endless targets.

He has a gun.

He is a dangerous man who will hurt more people. (conclusion)

green line

C. Culture: How has this topic appeared in high culture (art, classical music, theatre, etc.)?

 When in the Course of human events, it becomes necessary for one people to dissolve the political bands which have connected them with another, and to assume among the powers of the earth, the separate and equal station to which the Laws of Nature and of Nature’s God entitle them, a decent respect to the opinions of mankind requires that they should declare the causes which impel them to the separation.

 We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable rights, that among these are Life, Liberty, and the pursuit of Happiness. That to secure these rights, Governments are instituted among Men, deriving their just powers from the consent of the governed. That whenever any Form of Government becomes destructive of these ends, it is the Right of the People to alter or to abolish it, and to institute new Government, laying its foundation on such principles and organizing its powers in such form, as to them shall seem most likely to effect their Safety and Happiness.

-The Declaration of Independence

July, 4, 1776

The Declaration of Independence was drafted as a deductive argument as to why the United States can and should be a country independent of Great Britain. Thomas Jefferson drafted the declaration with a series of premises leading to four different conclusions.

  1. George III is a tyrant
  2. The colonies have a right to be free and independent states
  3. All political connections between Britain and the colonies should be dissolved
  4. The “united states” have the right to do all things that free nations do

These four conclusions then serve as premises for the final conclusion that the United States is now an independent country. The declaration is a great example of deductive reasoning because it takes specific examples, such as the 27 grievances against the monarch, and makes logical conclusions, such as “George III is a tyrant,” from the examples. Its deduction can be plainly seen.

The Declaration of Independence is a great example of high culture to use in the classroom because every student who is educated in the United States will have some knowledge of this document. Therefore learning to analyze it “mathematically” in terms of deductive versus inductive reasoning, is a great engagement tool.

green line

E. Technology: How can technology be used to effectively engage students with this topic?

Crime Scene Games & Deductive Reasoning: https://sites.google.com/a/wcsga.net/mock-trial/crime-scene-games-deductive-reasoning

This website contains links to several crime scene investigation games. Several of the games require students to collect clues, compare evidence, and then determine who is responsible for committing a given crime. These games are great for having students use their deductive skills. A couple of the other games require students to review given qualities of a criminal and inductively decide who the criminal in a scenario is based on these broad statements.

This website could be used to engage students easily. Having students play a game, especially one like these where they cannot pick out the mathematical skill they are using, is a great way to get students to abandon their potential distaste for a topic and be involved. After the students have completed a game and solved their crime, the teacher can smoothly transition into a geometrical lesson on inductive and deductive reasoning. The teacher will have activated the students’ knowledge of reasoning through a fun game. They will then be in a better position to learn a new, mathematical application of the reasoning they just used.