Arithmetic with big numbers (Part 3)

In the previous two posts, we considered the use of base-10^n arithmetic so that a calculator can solve addition and multiplication problems that it ordinarily could not handle. Today, we turn to division. Let’s now consider the decimal representation of \displaystyle \frac{8}{17}.

TI817

There’s no obvious repeating pattern. But we know that, since 17 has neither 2 nor 5 as a factor, that there has to be a repeating decimal pattern.

So… what is it?

When I ask this question to my students, I can see their stomachs churning a slow dance of death. They figure that the calculator didn’t give the answer, and so they have to settle for long division by hand.

That’s partially correct.

However, using the ideas presented below, we can perform the long division extracting multiple digits at once. Through clever use of the calculator, we can quickly obtain the full decimal representation even though the calculator can only give ten digits at a time.

green line

Let’s now return to where this series began… the decimal representation of \displaystyle \frac{1}{7} using long division. As shown below, the repeating block has length 6, which can be found in a few minutes with enough patience. By the end of this post, we’ll consider a modification of ordinary long division that facilitates the computation of really long repeating blocks.

longdivision17

Because we arrived at a repeated remainder, we know that we have found the repeating block. So we can conclude that \displaystyle \frac{1}{7} = 0.\overline{142857}.

Students are taught long division in elementary school and are so familiar with the procedure that not much thought is given to the logic behind the procedure. The underlying theorem behind long division is typically called the division algorithm. From Wikipedia:

Given two integers a and b, with b \ne 0, there exist unique integers q and r such that a = bq+r and $0 \le r < |b|$,  where |b| denotes the absolute value of b.

The number q is typically called the quotient, while the number r is called the remainder.

Repeated application of this theorem is the basis for long division. For the example above:

Step 1.

10 = 1 \times 7 + 3. Dividing by 10, 1 = 0.1 \times 7 + 0.3

Step 2.

30 = 4 \times 7 + 2. Dividing by 100, 0.3 = 0.04 \times 7 + 0.02

Returning to the end of Step 1, we see that

1 = 0.1 \times 7 + 0.3 = 0.1 \times 7 + 0.04 \times 7 + 0.02 = 0.14 \times 7 + 0.02

Step 3.

20 = 2 \times 7 + 6. Dividing by 1000, 0.02 = 0.002 \times 7 + 0.006

Returning to the end of Step 2, we see that

1 = 0.14 \times 7 + 0.02 = 0.14 \times 7 + 0.0002 \times 7 + 0.006 = 0.142 \times 7 + 0.006

And so on.

green line

By adding an extra zero and using the division algorithm, the digits in the decimal representation are found one at a time. That said, it is possible (with a calculator) to find multiple digits in a single step by adding extra zeroes. For example:

Alternate Step 1.

1000 = 142 \times 7 + 6. Dividing by 1000, 1 = 0.142 \times 7 + 0.006

Alternate Step 2.

6000 = 587 \times 7 + 1. Dividing by 100000, 0.006 = 0.000587 \times 7 + 0.000001

Returning to the end of Alternate Step 1, we see that

1 = 0.142 \times 7 + 0.006= 0.142 \times 7 + 0.000587\times 7 + 0.000001 = 0.142857 \times 7 + 0.000001

So, with these two alternate steps, we arrive at a remainder of 1 and have found the length of the repeating block.

The big catch is that, if a = 1000 or a = 6000 and b = 7, the appropriate values of q and r have to be found. This can be facilitated with a calculator. The integer part of 1000/7 and 6000/7 are the two quotients needed above, and subtraction is used to find the remainders (which must be less than 7, of course).

TI17

At first blush, it seems silly to use a calculator to find these values of q and r when a calculator could have been used to just find the decimal representation of 1/7 in the first place. However, the advantage of this method becomes clear when we consider fractions who repeating blocks are longer than 10 digits.

green lineLet’s now return to the question posed at the top of this post: finding the decimal representation of \displaystyle \frac{8}{17}. As noted in Part 6 of this series, the length of the repeating block must be a factor of \phi(17), where \phi is the Euler toitent function, or the number of integers less than 17 that are relatively prime with 17. Since 17 is prime, we clearly see that \phi(17) = 16. So we can conclude that the length of the repeating block is a factor of 16, or either 1, 2, 4, 8, or 16.

Here’s the result of the calculator again:

TI817

We clearly see from the calculator that the repeating block doesn’t have a length less than or equal to 8. By process of elimination, the repeating block must have a length of 16 digits.

Now we perform the division algorithm to obtain these digits, as before. This can be done in two steps by multiplying by 10^8 = 100,000,000.

TI817b

So, by the same logic used above, we can conclude that

\displaystyle \frac{8}{17} = 0.\overline{4705882352941176}

In other words, through clever use of the calculator, the full decimal representation can be quickly found even if the calculator itself returns only ten digits at a time… and had rounded the final 2941176 of the repeating block up to 3.

(Note: While this post continues exploring the unorthodox use of a calculator to handle arithmetic problems, it also appeared in a previous series on the decimal expansions of rational numbers.)

Arithmetic with big numbers (Part 2)

Ready for an elementary arithmetic problem? Here it is:

bigmult1

Nothing to it… just multiply the two numbers. Of course, we’d rather not multiply them by hand, so let’s use a calculator instead:

bigmult2

Uh oh… the calculator doesn’t give the complete answer. It does return the first nine significant digits, but it doesn’t return all 16 digits. Indeed, we can’t be sure that the final 5 in the answer is correct because of rounding.

So now what we do (other than buy a more expensive calculator)?

In yesterday’s post, I posed a similar problem involving addition. Adding two big numbers by hand is no big deal. However, multiplying two big numbers, one digit at time, would be tedious!

When I pose this question to students, the knee-jerk reaction is to groan when facing the prospect of multiplying these two big numbers by hand. However, it is possible to use modern technology to make ordinary grade-school multiplication move a lot quicker. Perhaps the fastest way to do this is to split the numbers into block of five digits instead of the usual three:bigmult3

Now we proceed as if each block of five digits was a single digit. We begin with the last block of digits on the second row, which is 48974. First, we multiply 6797 and 48974 using a calculator. Because most modern scientific calculators have a 10-digit display, we can be assured that the complete answer will be shown. (This is why I chose to divide the numbers using block of five digits and not six or more.) The last five digits in the answer are written down; the more significant digits are carried.

Next, we multiply 2236 and 48974 and then add the number that was carried.

bigmult4We then repeat using 2449, the next (and final) block of digits on the second row. First, we multiply 6797 and 2449 using a calculator. The last five digits in the answer are written down; the more significant digits are carried.

Next, we multiply 2236 and 2449 and then add the number that was carried.

bigmult5

Finally, it remains to add these two partial products to obtain the final product. For this problem, this can be accomplished with only a single addition: the block of digits 76278 simply carry down to the final answer, and so we can start by adding the second and third blocks of digits. As this sum is less than 10^{10}, there is no digit to carry, and so the leading 54 also carries down to the final answer.

bigmult6The above technique is logically equivalent to using base 100,000 as opposed to the customary use of base 10 arithmetic. So while multiplying two numbers in the billions still takes some time, judiciously using a calculator makes this exercise go a lot quicker than the ordinary grade-school method of multiplying one digit at a time.

 

 

Arithmetic with big numbers (Part 1)

Ready for an elementary arithmetic problem? Here it is:

bigadd1

Nothing to it… just add the two numbers. Of course, we’d rather not add them by hand, so let’s use a calculator instead:

bigadd5

Uh oh… the calculator doesn’t give the complete answer. It does return the first nine significant digits, but it doesn’t return all 16 digits. Indeed, we can’t be sure that the final 7 in the answer is correct because of rounding.

So now what we do (other than buy a more expensive calculator)?

When I pose this question to students, the knee-jerk reaction is to just start adding one digit at a time. Though that’s not the worst possible response, it is possible to use modern technology to make ordinary grade-school addition move a lot quicker. One way to do this is to take three digits at a time while using a calculator:

 

bigadd2

Notice that the 1 in 1369 gets carried over to the next block of three digits in much the same way that a sum greater than 10 has the tens digit carried over to the next digit. Continuing:

bigadd3This is logically equivalent to using base 1000 to add these two numbers (as opposed to base 10) and is certainly a lot faster than using only one digit at a time. Of course, it’d go even faster if we use up to nine digits a time (which is equivalent to using base one billion).

bigadd4

Scientific research and false positives

I just read the following interesting article regarding the importance of replicating experiments to be sure that a result is scientifically valid: http://www.slate.com/articles/health_and_science/science/2014/07/replication_controversy_in_psychology_bullying_file_drawer_effect_blog_posts.single.html. This strikes me as an engaging way to introduce the importance of P-values to a statistics class. Among the many salient quotes:

Psychologists are up in arms over, of all things, the editorial process that led to the recent publication of a special issue of the journal Social Psychology. This may seem like a classic case of ivory tower navel gazing, but its impact extends far beyond academia. The issue attempts to replicate 27 “important findings in social psychology.” Replication—repeating an experiment as closely as possible to see whether you get the same results—is a cornerstone of the scientific method. Replication of experiments is vital not only because it can detect the rare cases of outright fraud, but also because it guards against uncritical acceptance of findings that were actually inadvertent false positives, helps researchers refine experimental techniques, and affirms the existence of new facts that scientific theories must be able to explain…

Unfortunately, published replications have been distressingly rare in psychology. A 2012 survey of the top 100 psychology journals found that barely 1 percent of papers published since 1900 were purely attempts to reproduce previous findings…

Since journal publications are valuable academic currency, researchers—especially those early in their careers—have strong incentives to conduct original work rather than to replicate the findings of others. Replication efforts that do happen but fail to find the expected effect are usually filed away rather than published. That makes the scientific record look more robust and complete than it is—a phenomenon known as the “file drawer problem.”

The emphasis on positive findings may also partly explain the fact that when original studies are subjected to replication, so many turn out to be false positives. The near-universal preference for counterintuitive, positive findings gives researchers an incentive to manipulate their methods or poke around in their data until a positive finding crops up, a common practice known as “p-hacking” because it can result in p-values, or measures of statistical significance, that make the results look stronger, and therefore more believable, than they really are.

I encourage teachers of statistics to read the entire article.

My favorite SSA problem

Last month, I had a series of posts on solving a triangle when two sides and a non-included angle are given. Here is my all-time favorite word problem along these lines:

Assume that Venus and Earth both have circular orbits around the sun with radii 68 million miles and 93 million miles, respectively. Just after sunrise, an astronomer sees Venus on the horizon and measures the angle between Venus and the sun to be 20 degrees. Find the possible distances from Venus to Earth at that moment.

venus

I won’t go through the solution of the problem… it’s a fairly straightforward application of SSA techniques. But I’ve always had a soft spot for this problem… probably because I have a soft spot for astronomy and the picture of the planets in their orbits makes perfectly clear why the information can narrow down the answer to two possible solutions, but more information is needed in order to figure out which one is actually correct.

How high can you count on two hands?

How high can you count on two hands? The answer is 1023, if you use binary. I made the following video to demonstrate this to my students.

True story: This is a trick that I came up with when I was 10 years old. As is common in classrooms, my teacher had had enough disruptions in class, and told us students to put our heads on our desks in silence for 15 or 20 minutes as punishment. Naturally, I was trying to think of something to do to pass the time, and I somehow came up with the idea that I could keep myself entertained by counting in binary using my fingers.

When I was a kid, I could count to 1023 in about 5 minutes. But I was a lot more dextrous then, and so it takes me about 6 or 7 minutes today.

Engaging students: Introducing the number e

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 comes from my former student Kenna Kilbride. Her topic, from Precalculus: introducing the number e.

green line

How can this topic be used in your students’ future courses in mathematics or science?

 

Students will add on to this constant from calculus up to differential equations and even further. In Calculus I students use the number e to solve exponential functions and logarithm function. Calculus II uses the number e when computing integrals. In Complex Numbers you see the number e written as the Taylor series

$latex e^x = \displaystyle \sum_{n=0}^\infty \frac{x^n}{n!}

Differential equations utilizes the number e in y(x) = Ce^x. The number e can be utilized in many other areas since it is considered to be a base of the natural logarithm. The number e is also defined as:

e = \displaystyle \lim_{x \to \infty} \left(1 + \frac{1}{x} \right)^x

Also the number e can be seen in the infinite series

$latex e = \sum_{k=0}^\infty \frac{1}{k!}

The number e can be seen in many different areas of mathematics and with many different series and equations. Stirling’s approximation, Pippenger product, and Euler formula are just a few more examples of where you can see the number e.

http://mathworld.wolfram.com/e.html

http://tutorial.math.lamar.edu/Classes/CalcII/ImproperIntegralsCompTest.aspx

 

 

green line

What interesting (i.e., uncontrived) word problems using this topic can your students do now? (You may find resources such as http://www.spacemath.nasa.gov to be very helpful in this regard; feel free to suggest others.)

 

Introducing this constant can be a very hard thing for a teacher to do and using a word problem that involves a satellite that students can comprehend what they do in the sky will help.

A satellite has a radioisotope power supply. The power output in watts is given by the equation

P = 50e^(-t/250)

where t is the time in days and e is the base of natural logarithms.

Then when introducing, e, you can give them problems that they can easily solve without fully understanding what e is. Give them problems such as, how much power will be available in a year. The solution is:

P = 50e^(-365/250)

= 5Oe^(-1.46)

= 50 x 0.232

= 11 .6

Once e has been more formally introduced and the students can then become more familiar (this should only be added on when the students fully understand e) you can add onto this problem by giving them questions such as, what is the half-life of the power supply? Students must use natural log to solve this equation:

25 = 50e^(-t/250)

for t and obtain

– t/250 = ln O.5

= -0.693

t = 250 x 0.693

= 173 days

http://er.jsc.nasa.gov/seh/math49.html

green line

What interesting things can you say about the people who contributed to the discovery and/or the development of this topic? (You might want to consult Math Through The Ages.)

 

John Napier was born in Scotland around 1550. Napier started attending St. Andrews University at the age of 13. After leaving St. Andrews without a degree he attended Cambridge University. Later he studied abroad, presumably in Paris. In 1614 Napier invented logarithms and later exponential expressions. Along with mathematics, Napier was interested in peace keeping and religion. Napier died on April 4, 1617 of gout.

Euler contributed to e, a mathematical constant. He was born 1707 in the town Basel of Switzerland. By the age of 16 he had earned a Master’s degree and in 1727 he applied for a position as a Physics professor at the University of Basel and was turned down. Due to extreme health problems by 1771 he had lost almost all of his vision. By the time of his death in 1783, the Academy of Sciences in Petersburg had received 500 of his works.

 

http://www.macs.hw.ac.uk/~greg/calculators/napier/great.html

http://www.pdmi.ras.ru/EIMI/EulerBio.html

 

Story of George Dantzig

Every math teacher should be familiar with this famous story concerning George B. Dantzig (1914-2005). Dantzig is universally hailed as the Father of Linear Programming for his development of the simplex method, which was named one of the top 10 algorithms of the 20th century. The following story happened while he was a graduate student at the University of California.

 

If you search the Web for “urban legend George Dantzig” you will probably find the first hit to be “Snopes.com, The Unsolvable Math Problem.” That site recounts the story of how George, coming in late for class, mistakenly thought two problems written on the board by Neyman were homework problems. After a few days of struggling, George turned his answers in. About six weeks later, at 8 a.m. on a Sunday morning, he and Anne were awakened by someone banging on their front door. It was Neyman who said, “I have just written an introduction to one of your papers. Read it so I can send it out right away for publication.”

George’s answers to the homework problems were proofs of then two unproven theorems in statistics. The Web site gives all the details about how George’s experiences ended up as a sermon for a Lutheran minister and the basis for the film, “Good Will Hunting.” The solution to the second homework problem became part of a joint paper with Abraham Wald who proved it in 1950, unaware that George had solved it until it was called to his attention by a journal referee. Neyman had George submit his answers to the “homework” problems as his doctoral dissertation.

Source: http://www.orms-today.org/orms-8-05/dantzig.html

True story: my own paths actually overlapped with Dantzig’s once. When I was a sophomore in college and he was a professor emeritus, we both attended the same seminar, and he was stick as sharp as a tack. However, I couldn’t build up enough courage to introduce myself to the great man.