My Mathematical Magic Show: Part 8c

This mathematical trick was not part of my Pi Day magic show but probably should have been… I’ve performed this for my Precalculus classes in the past but flat forgot about it when organizing my Pi Day show. The next time I perform a magic show, I’ll do this one right after the 1089 trick. (I think I learned this trick from a Martin Gardner book when I was young, but I’m not sure about that.)

Here’s a description of the trick. I give my audience a deck of cards and ask them to select six cards between ace and nine (in other words, no tens, jacks, queens, or kings). The card are placed face up, side by side.

After about 5-10 seconds, I secretly write a pull out a card from the deck and place it face down above the others.

 

pascalcardtrick1

I then announce that we’re going to some addition together… with the understanding that I’ll never write down a number larger than 9. For example, the 4 and 6 of spades are next to each other. Obviously, 4+6 = 10, but my rule is that I’m going to write down a number larger than 9. So I’ll subtract 9 whenever necessary: 10-9 = 1. Since 1 corresponds to ace, I place an ace about the 4 and 6 of spades.

Continuing in this way (and having the audience participate in the arithmetic so that this doesn’t get boring), I eventually get to this position:

pascalcardtrick5

Finally, I add the two cards at the top (and, in this case, subtract 9) to get 6+9-9 = 6, and I dramatically turn over the last card to reveal a 6.

pascalcardtrick6

I’ll often perform this trick when teaching Precalculus, as the final answer involving Pascal’s triangle. As discussed yesterday, suppose that the six cards are a, b, c, d, e, and f. Forgetting for now about subtracting by 9, here’s how the triangle unfolds (turning the triangle upside down):

a \qquad \qquad \qquad \quad b \qquad \qquad \qquad \quad c \qquad \qquad \qquad \quad d \qquad \qquad \qquad \quad e \qquad \qquad \qquad \quad f

a+b \qquad \qquad \qquad b+c \qquad \qquad \qquad c+d \qquad \qquad \qquad d+e \qquad \qquad \qquad e+f

a+2b+c \qquad \qquad b+2c+d \qquad \qquad c+2d+e \qquad \qquad d+2e+f

a+3b+3c+d \qquad \quad b+3c+3d+e \qquad \quad c+3d+3e+f

a+4b+6c+4d+e \qquad b+4c+6d+5e+f

a+5b+10c+10d+5e+f

 Not surprisingly, the coefficients in the above chart involve the numbers in Pascal’s triangle. Indeed, the reason that I chose to use 6 cards (as opposed to any other number of cards) is that the bottom row has only 1, 5, and 10 as coefficients, and 10 \equiv 1 (\mod 9). Therefore, the only tricky part of the calculation is multiplying b+e by 5, as the final answer can then be found by adding the remaining four numbers.

My students usually find this to be a clever application of Pascal’s triangle for impressing their friends after class.

green lineP.S. After typing this series, it hit me that it’s really easy to do this trick mod 10 (which means getting rids of only the face cards prior to the trick). All the magician has to do is subtly ensure that the second and fifth cards are both even or both odd, so that b+e is even and hence 5(b+e) is a multiple of 10. Therefore, since 10c+10d is also a multiple of 10, the answer will be just a+f or a+f-10.

(If the magician can’t control the placement of the second and fifth cards so that one is even and one is odd, the answer will be just a+f+5 or a+f-5.)

Henceforth, I’ll be doing this trick mod 10 instead of mod 9.

 

My Mathematical Magic Show: Part 8b

This mathematical trick was not part of my Pi Day magic show but probably should have been… I’ve performed this for my Precalculus classes in the past but flat forgot about it when organizing my Pi Day show. The next time I perform a magic show, I’ll do this one right after the 1089 trick. (I think I learned this trick from a Martin Gardner book when I was young, but I’m not sure about that.)

Here’s a description of the trick. I give my audience a deck of cards and ask them to select six cards between ace and nine (in other words, no tens, jacks, queens, or kings). The card are placed face up, side by side.

After about 5-10 seconds, I secretly write a pull out a card from the deck and place it face down above the others.

 

pascalcardtrick1

I then announce that we’re going to some addition together… with the understanding that I’ll never write down a number larger than 9. For example, the 4 and 6 of spades are next to each other. Obviously, 4+6 = 10, but my rule is that I’m going to write down a number larger than 9. So I’ll subtract 9 whenever necessary: 10-9 = 1. Since 1 corresponds to ace, I place an ace about the 4 and 6 of spades.

Continuing in this way (and having the audience participate in the arithmetic so that this doesn’t get boring), I eventually get to this position:

pascalcardtrick5

Finally, I add the two cards at the top (and, in this case, subtract 9) to get 6+9-9 = 6, and I dramatically turn over the last card to reveal a 6.

pascalcardtrick6

How does this trick work? This is an exercise in modular arithmetic (see also Wikipedia). Suppose that the six cards are a, b, c, d, e, and f. Forgetting for now about subtracting by 9, here’s how the triangle unfolds (turning the triangle upside down):

a \qquad \qquad \qquad \quad b \qquad \qquad \qquad \quad c \qquad \qquad \qquad \quad d \qquad \qquad \qquad \quad e \qquad \qquad \qquad \quad f

a+b \qquad \qquad \qquad b+c \qquad \qquad \qquad c+d \qquad \qquad \qquad d+e \qquad \qquad \qquad e+f

a+2b+c \qquad \qquad b+2c+d \qquad \qquad c+2d+e \qquad \qquad d+2e+f

a+3b+3c+d \qquad \quad b+3c+3d+e \qquad \quad c+3d+3e+f

a+4b+6c+4d+e \qquad b+4c+6d+5e+f

a+5b+10c+10d+5e+f

 Therefore, the top card will simply be a+5b+10c+10d+5e+f minus a multiple of 9.

That’s a pretty big calculation for the magician to do on the spot. Fortunately, 9c + 9d is also a multiple of 9, and so the top card will be

 a+5b+10c+10d+5e+f - (9c + 9d) minus a multiple of 9, or

5(b+e) + a +  c + d +  f minus a multiple of 9.

For the case at hand, b = 6 and e =8, so 5(b+e) = 70. That’s still a big number to keep straight when performing the trick. However, since I’m going to be subtracting 9’s anyway, I can do this faster by replacing the 8 by 8 - 9 = -1. So, for the purposes of the trick, 5(b+e) = 5 \times (6-1) = 25, and I subtract 18 to get 7.

I now add the rest of the cards, subtracting 9 as I go along. For this example, I’d add the 2 first to get 9, which is 0 after subtracting another 9. I then add the remaining cards of 4, 3, and 8 (remembering that the 8 is basically 8-9 = -1, yielding 4+3-1 = 6. So the top card has to be 6.

The key point of this calculation is to subtract 9 whenever possible to keep the numbers small, making it easier to do in your head when performing the trick.

 

My Mathematical Magic Show: Part 8a

This mathematical trick was not part of my Pi Day magic show but probably should have been… I’ve performed this for my Precalculus classes in the past but flat forgot about it when organizing my Pi Day show. The next time I perform a magic show, I’ll do this one right after the 1089 trick. (I think I learned this trick from a Martin Gardner book when I was young, but I’m not sure about that.)

Here’s a description of the trick. I give my audience a deck of cards and ask them to select six cards between ace and nine (in other words, no tens, jacks, queens, or kings). The card are placed face up, side by side.

After about 5-10 seconds, I secretly write a pull out a card from the deck and place it face down above the others.

 

 

pascalcardtrick1

I then announce that we’re going to some addition together… with the understanding that I’ll never write down a number larger than 9. For example, the 4 and 6 of spades are next to each other. Obviously, 4+6 = 10, but my rule is that I’m going to write down a number larger than 9. So I’ll subtract 9 whenever necessary: 10-9 = 1. Since 1 corresponds to ace, I place an ace about the 4 and 6 of spades.

Next, I consider the 6 of spades and 2 of diamonds. Adding, I get 8. That’s less than 9, so I pull an 8 out of the deck.

Next, 2+3 = 5, so I pull out a 5 from the deck.

Next, 8+8=16, and 16-9=7. So I pull out a 7.

(To keep this from getting dry, I have the audience perform the arithmetic with me.)

pascalcardtrick2

On the the next row. The next cards are 1+8 = 9, 8+5-9 = 4, 5+2 =7, and 2+7 = 9.

pascalcardtrick3

On the the next row. The next cards are 9+4-9=4, $latex $4+7-9 = 2$, and 7+9-9 = 7.

pascalcardtrick4

Almost there: 4+2 = 6 and 2+7= 9.

 

pascalcardtrick5

Finally, 6+9-9 = 6, and I dramatically turn over the last card to reveal a 6.

 

pascalcardtrick6

 

Naturally, everyone wonders how I knew what the last card would be without first getting all of the cards in the middle. I’ll discuss this in tomorrow’s post.

 

 

 

Siri: What is 0 divided by 0?

In case you missed it, the programming geniuses behind the iPhone’s Siri came up with a startling response to the question, “What is 0 divided by 0?”

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.)

Thoughts on the Common Core and its implementation

The following picture appeared on the Facebook page of Daniel Bongino, who is running for Congress in Maryland.

Source: https://scontent-a-dfw.xx.fbcdn.net/hphotos-prn1/t1/1184774_620433314716100_343011500_n.jpg

Here was his commentary on this picture:

Like many of you, I am a parent who is passionate about my child’s education in an increasingly competitive and unforgiving global economy.

Having stated that, I cannot condemn the Common Core in strong enough terms. Look at the picture I have attached to this post. I gave my daughter a relatively easy long-division problem to do today, in an attempt to gauge her progress, and this is what she gave back to me.

This is completely unacceptable. How is it that we are replacing a time-tested, efficient method of long-division with an absurd, multi-step process that not only confuses the students, but the parents too?

Compounding the Common Core disaster is the fact that in my daughter’s last school year she was taught the older, more effective method of long-division and is now completely confused.

Friends, all politics are local and it gets no more local than your kitchen table. Fight back against the Common Core, and do it quickly, by calling and emailing your local, state, and federal elected officials.

This is not a partisan issue. Your child’s education is suffering whether you are a Democrat or a Republican. Every second we lose is another second our kids are being exposed to a third-rate curriculum in a first-world economy. Count on me as an ally in this fight.
-Dan

Source: https://www.facebook.com/dan.bongino/photos/a.517057181720381.1073741827.101043269988443/620433314716100/?type=1&theater

green line

Yesterday, I discussed the mathematical logic behind this unorthodox approach to subtraction. Today, I want to briefly talk about the Common Core standards for mathematics and their implementation, as this is a topic that I’ve been following for several years.

  1. To the mindless critics who think that America is headed to communism because of the Common Core: there’s no point having a rational discussion about this. Michael Gerson is one of many conservative commentators who is not ideologically opposed to the Common Core; see http://www.washingtonpost.com/opinions/michael-gerson-gop-fear-of-common-core-education-standards-unfounded/2013/05/20/9db19a94-c177-11e2-8bd8-2788030e6b44_story.html.
  2. Also to the mindless critics: while Texas (where I live) is not a Common Core state, the standards for mathematics that we’ve had for the past 10 years or so align fairly well with the Common Core. And Texas is about as far away from a blue state as any of the 50.
  3. To the thoughtful critics who are worried about the appropriateness of the Common Core standards: as I said, while not in perfect alignment, for the last few years Texas has had content and process standards for mathematics education that are decently close to those stipulated by the Common Core. I’m more than happy to declare that the implementation of the Common Core has been thoroughly botched from sea to shining sea. Still, I believe that a good implementation is possible, and I hope that you don’t throw out the baby with the bath water when critiquing the potential of the Common Core standards.
  4. To the supporters of the Common Core standards: you better read Diane Ravitch’s thoughtful critique of how the standards have been rolled out: http://dianeravitch.net/2013/02/26/why-i-cannot-support-the-common-core-standards/. It seems to me that textbook publishers are driving the rollout of the Common Core, and educators are desperately trying to shift from the previous standards to the new standards while also trying to figure how they are being required to teach because of the textbook… and not because of the standards themselves.
  5. Also to the supporters of the Common Core standards: voters — and, more importantly, parents — will not tolerate these standards if a rationale for these standards are not carefully explained. I do think that most parents do care about the mathematical education of their children and will rationally discuss cutting-edge ways of teaching mathematics, but they have to be convinced that these cutting edge methods actually make sense. The rollout of the Common Core will be studied in public-relation circles for years to come for how *not* to make drastic changes.
  6. And though they are not specifically required by the Common Core, don’t get me started on the hours we’re wasting high-stakes testing, an intellectually lazy and ineffective way of measuring teacher quality.

Thoughts on unorthodox ways of teaching long division

The following picture appeared on the Facebook page of Daniel Bongino, who is running for Congress in Maryland.

Source: https://scontent-a-dfw.xx.fbcdn.net/hphotos-prn1/t1/1184774_620433314716100_343011500_n.jpg

Here was his commentary on this picture:

Like many of you, I am a parent who is passionate about my child’s education in an increasingly competitive and unforgiving global economy.

Having stated that, I cannot condemn the Common Core in strong enough terms. Look at the picture I have attached to this post. I gave my daughter a relatively easy long-division problem to do today, in an attempt to gauge her progress, and this is what she gave back to me.

This is completely unacceptable. How is it that we are replacing a time-tested, efficient method of long-division with an absurd, multi-step process that not only confuses the students, but the parents too?

Compounding the Common Core disaster is the fact that in my daughter’s last school year she was taught the older, more effective method of long-division and is now completely confused.

Friends, all politics are local and it gets no more local than your kitchen table. Fight back against the Common Core, and do it quickly, by calling and emailing your local, state, and federal elected officials.

This is not a partisan issue. Your child’s education is suffering whether you are a Democrat or a Republican. Every second we lose is another second our kids are being exposed to a third-rate curriculum in a first-world economy. Count on me as an ally in this fight.
-Dan

Source: https://www.facebook.com/dan.bongino/photos/a.517057181720381.1073741827.101043269988443/620433314716100/?type=1&theater

This picture was shared by a friend on Facebook; the resulting discussion follows. I’m sharing this because I think the following reactions are typical of parents when their children are taught mathematics using non-traditional methods.

While I don’t think that any of the commentators said anything personally embarrassing, I’m withholding the actual names of the correspondents for the sake of anonymity.

Anonymous #1: What in the world is this?

Me: In the worst case scenario, it’s a waste of time for children who already know how to divide.

In the best case scenario, it’s an effective and pedagogically reasonable first step — for children who don’t yet know how to divide. (FYI, this technique has been used long before the advent of the Common Core.

Here’s the justification: Young children often have a hard time coming up with the “best” first step that 43 divided by 8 is 5 with remainder 3. However, they often can come up with a reasonable first step, whether it’s subtracting off 10 groups of 8 or 40 groups of 8. The important thing is that they’re reducing 432 by a multiple of 80, not necessarily the “best” or “optimal” multiple of 80. With practice, children hopefully get better at guessing the optimal multiple of 80, thus leading to the traditional method of long division.

The idea is that the children can, with time, figure out the reason why long division works, rather than mindlessly following an algorithm that leads them to an answer that they don’t understand.

Anonymous #2: It’s the longest division problem ever. Lol

Anonymous #3: OMG John, that answer was more confusing than the picture!! LOL just kidding! What I want to see from that picture is, did she eventually get the answer right? Did she give up? If the kids learn how to get a right answer, I’m hard pressed to find a valid argument against any teaching method. If it frustrates them to the point that they give up, well then that is a problem. That picture he posted doesn’t give us any real information. It just makes us old farts think “what the hell??” Because it’s so different from what we learned.

Maybe it isn’t pulling up right, but I don’t see an answer in that picture. Is because she couldn’t do it or because he just wanted to post the weird method to promote fear of something new?

My daughter was taught the “lattice” way to do 3 digit multiplication. I wanted to cry trying to figure that out. But it made sense to her and she got the answers right.

But, I will admit that it looks crazy to me, too!

Me: I agree that the person who posted the picture did not (deliberately?) show if the student ultimately got the right answer. I can say that the partial steps that are shown are correct.

I’m for teaching any technique in elementary school that’s (1) logically correct, whether or not it’s the way it’s (mythically) “always been taught,” (2) encourages students to think mathematically, as opposed to mindlessly following a procedure with no real conceptual understanding, and (3) prepares students for algebra in a few years’ time.

I’ll also say this: unorthodox teaching practices usually go over better when both the practices and the rationale for the practices are clearly explained to parents. Sadly, while a lot of thought has gone into improving mathematics education, not much thought has gone into justifying these new practices to parents, and that’s a shame.

Anonymous #2: The problem isn’t teaching the method. I’m all for showing kids multiple ways to do things. The problem is forcing all kids to use this method. We are all different and therefore we all think differently. If it makes sense this way to you great however if it doesn’t make sense then why not let kids use the way that works for them. Yes teaching different methods is great but forcing kids to use methods they don’t understand is foolish.

Me: No argument from me.

Anonymous #4: I am troubled by this and other styles of math that no longer require children to learn and memorize simple mathematical tables of simple addition, subtraction, multiplication, and division. It disappoints me to no end that people allow children to avoid learning thoroughly these tables, as though they are not necessary in life. I am appalled here that kids are encouraged as early as 3rd grade to start using a calculator for basic math!

I appreciate different styles of doing math here, Subtraction and Division are quite different in (European Country) than in America. But sometimes it just seems that so many new methods are obscure attempts to help an overly super small subset of kids which are then exposed to them, and at times, forced on them; much to the chagrin of parents.

Me: (Anonymous #4), I agree about the importance of children memorizing mathematical tables at a young age. I disagree that this particular algorithm — unorthodox long division — necessarily tells children that such memorization isn’t particular useful.

My own daughter struggled with long division when she first learned it. She already knew that 36 divided by 4 was 9 and hence knew the “right” step when computing 368 divided by 4. However, when the problem changed to something like dividing 384 by 4, she had difficult with the first step, as she didn’t have anything memorized for “38 divided by 4.”

My friends who are elementary teachers tell me that this particular conceptual barrier is fairly common when children first learn long division.

For 384 divided by 4, the best first step is subtracting 90 groups of 4 from 384, but she was having trouble immediately coming up with the largest multiple of 10 that would work. However, subtracting *any* multiple makes progress toward the solution, even if it isn’t necessarily the “best” step for solving the problem as fast as possible.

In those early stages of her learning, she computed 384 divided by 4 using suboptimal steps. I can’t remember exactly how she did it, but a reconstruction from memory is shown in the attached picture. She knew that 50 times 4 was less than 384, so it was “safe” to subtract 200. When she did this, I didn’t correct her by telling her that she should have subtracted 90 groups of 4. Instead, I let her make this step (emphasis, step — and not mistake) and let her proceed.

The step that always surprised me was when she’d occasionally subtract 12 groups of 4… she had memorized her multiplication table up to 12 and instinctively knew that subtracting 12 groups of 4 brought her closer to the correct answer than subtracting 10 groups of 4.

Obviously, as she got better at long division, she made fewer and fewer suboptimal steps when dividing. That’s the beauty of this unorthodox method… children don’t have to stress so much about making the best next move, as any next move will bring them closer to the answer. Hopefully, with practice, children get better at making the best moves quicker, but that’s a skill that they develop as they get used to long-division algorithm.

longdivision

Me: One more thought: (Anonymous #1), I’m sorry if I’ve completely commandeered your original post! 🙂

Anonymous #1: John you crack me up! I have never had such lengthy discussion about anything I have ever posted! I still have NO idea how to do all these extra steps-but I know who I will be asking for help when the time comes for me to deviate from my old school method of math!

Full lesson plan: Modular multiplication and encryption

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.

In this lesson, the students practiced their skills with multiplication and division to create modular multiplication tables. Though this is a concept ordinarily first encountered in an undergraduate class in number theory or abstract algebra, there’s absolutely no reason why elementary students who’ve mastered multiplication can’t do this exercise. This exercise strengthens the notion of dividing with a remainder and leads to a fun application with encrypting and decrypting secret messages. Indeed, this activity made be viewed as a child-appropriate version of the RSA encryption algorithm that’s used every time we use our credit cards. This was mentioned in two past posts: https://meangreenmath.com/2013/10/17/engaging-students-finding-prime-factorizations and https://meangreenmath.com/2013/07/11/cryptography-as-a-teaching-tool

This lesson plan is written in a 5E format — engage, explore, explain, elaborate, evaluate — which promotes inquiry-based learning and fosters student engagement.

Lesson Plan: Kid RSA Lesson

Other Documents:

Vocabulary Sheet

Three Letter Words

RSA Numbers

 Modular Multiplication Tables

Modular Multiplication Assessment

Modular Multiplcation Practice

Kid RSA

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

In the previous post, I showed a quick way of obtaining a full decimal representation using a calculator that only displays ten digits at a time. To review: here’s what a TI-83 Plus returns as the (approximate) value of 8/17:

TI817

Using this result and the Euler totient function, we concluded that the repeating block had length 16. So we multiply twice by 10^8 (since 10^8 \times 10^8 = 10^{16}) to deduce the decimal representation, concluding that

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

TI817b

Though this is essentially multi-digit long division, most students are still a little suspicious of this result on first exposure. So here’s a second way of confirming that we did indeed get the right answer. The calculators show that

8 \times 10^8 = 17 \times 47058823 + 9 and 9 \times 10^8 = 17 \times 52941176 + 8

Therefore,

8 \times 10^{16} = 17 \times (47058823 \times 10^8) + 9 \times 10^8 and 9 \times 10^8 = 17 \times 52941176 + 8

so that

8 \times 10^{16} = 17 \times (47058823 \times 10^8) + 17 \times 52941176 + 8

8 \times 10^{16} = 17 \times 4705882352941176 + 8

8 \times 10^{16} - 8 = 17 \times 4705882352941176

8 (10^{16}-1) = 17 \times 4705882352941176

\displaystyle \frac{8}{17} = \displaystyle \frac{4705882352941176}{10^{16}-1}

Using the rule for dividing by 10^k -1, we conclude that

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

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

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.