Modular arithmetic, Khan Academy, and a NY Times puzzle

I’ve had a busy week at work and haven’t been able to put as much time in with the boys as I normally do. Yesterday I spent most of the time with my younger son catching up on some of the problems in our Introduction to Number theory book and ended up with nothing obvious for him to work on for homework. I ended up telling him just to play around on Khan Academy.

This morning I got a bit of a surprise when he asked me what modular arithmetic has to do with cryptography. I was sort of caught off guard by the question – we are on the modular arithmetic section in our number theory book, but I don’t remember the book mentioning anything about cryptography, and I certainly haven’t.

His reason behind the question was interesting – he saw the connection on Khan Academy. Apparently some of the feedback he’d gotten on the modular arithmetic section was that he had made 5% progress towards a cryptography badge (or some other achievement, I don’t really know). It is always surprising what catches a kid’s attention.

This question about applications of modular arithmetic made me switch up what I was planning on talking about with him today. I saw this puzzle in the NY Times posted by Stephen Strogatz yesterday:

If you don’t have time to click the link, here’s the puzzle:

“A chess master is preparing for a tournament. She plays at least one game a day, but no more than 12 games over any seven-day stretch. Can you show that, if she keeps practicing like this for a long time, there will be a series of consecutive days in which she plays exactly 20 games?”

This is a modular arithmetic question in disguise, so I figured that he might like working through this question even though it is certainly not something that I would expect him to be able to solve on his own. I hoped that the surprise connection to modular arithmetic would be interesting to him.

Before diving into the videos, I need to say that this is tough question and I did no prep work at all for this project. I mean none at all – he asked me the question about cryptography as we were walking into the study. Partially as a result of the lack of prep, the conversation is far from polished and it takes us a while to get to the punch line. Still, a couple of little smiles at the end showed me that he found it to be a really interesting puzzle. With a little more work, I think there’s a really fun project for kids hiding in this project somewhere.

We started with a quick review of what it means for two numbers to be equal mod m. The idea here was to remind him of the congruence definition in the book – two numbers are equal mod m if their difference is divisible by m.

 

With our short review out of the way, we started in on the puzzle. The first step was to write down a sequence of games played on each day that meets the conditions of the problem. For a young kid, just writing down this numbers is an interesting problem.

 

Now that we had a sequence of games per day written down, we added up the total number of games played from the start. Luckily we didn’t hit 20 exactly, though, trust me, that was just luck! The next step was to look and see if there was ever a sequence of days were she played 20 games exactly. Noticing where the 20 games were hiding was a tough question for him, but not totally inaccessible.

 

Finally the connection to modular arithmetic. He notices the connection mod 20 (after noticing a connection in mod 10 – ha!). The reason that our list would definitely have a repeat mod 20 took a while to understand (in fact, the bulk of the video is about why a repeat happens), but at least I think he understood the explanation.

I’m really happy to see how excited he was at the end of this little project 🙂

 

So, a surprise connection from a little work on Khan Academy combined with a neat NY Times puzzle leads to a fun day. Watching this again just now I’d like a 2nd shot at this project, but I’m still really glad we did it. It is neat to see the math you are studying show up in a some surprising places!

Not quite a “day in the life” call it a “morning in the life”

Had a great morning working with the boys today that included a particularly fun exchange with my older son that I wanted to write about.

It started with a continuation of a brief conversation on Twitter about Khan Academy.  I’ve been quite happy to use their problem bank for review exercises with my kids.  I’m glad that the resource is around, and I’m glad that it is free.  No need to post the whole conversation, but you can get to it from here if you enjoy reading twitter conversations:

This school year I’m walking through Art of Problem Solving’s Geometry book with my older son and  today we were covering the section on exterior angles in triangles.  I’ve never taught geometry before and I find thinking about how to talk to my son about basic concepts in geometry to be both fun and challenging. Exploring the beginnings of mathematical proof from a few basic axioms has been particularly fun.

The talk about exterior angles got pushed back a tad because of a challenge problem that gave my son a bit of trouble.  The problem is from an old AMC 8 exam and is here:

http://www.artofproblemsolving.com/Wiki/index.php/2003_AMC_8_Problems/Problem_22

Two interesting things came up talking about this problem.  The first was showing how you could find the area of a square if you knew the length of one of the diagonals.  Maybe not the most interesting piece of mathl, but still pretty cool when you see it for the first time.

More interesting from a math point of view was the idea that 4 - \pi could never be equal to an expression like \pi - 2, or even something like \pi - \sqrt{2}.   I explained to my son that \pi was “more than irrational” and couldn’t be written as the sum of a rational number or square (or other) roots of rational numbers.  His response was great – “So it is super irrational?”  Well, sort of yes, actually!

These are the conversations that I love having.  Going back to the Khan Academy point, I’d much rather have the kids spend time doing a few Khan Academy review problems on  fractions, or basic facts about prime numbers (to name two things that I’ve used it for so far this year)  if it means I can have these conversations with them.

Not wanting to pass up the opportunity to explore this particular conversation a little more, we went to the whiteboard and I explained the difference between algebraic numbers and transcendental numbers.  I even wrote down the series for Sin(x) and Cos(x) to show him that \pi did satisfy some polynomial-like equations, just not ones with finitely many terms.  Next, almost if the morning was a set up, he asked if e satisfied any special equations.

In response to that question I down the series for e^x and showed how these three equations led to the relation that e^{\pi i} = -1.

With this little side track into transcendental numbers behind us, we finally got around to talking about exterior angles in triangles.  We started with a couple of simple examples and then moved on to proving the theorem that the measure of the exterior angle in a triangle is equal to sum of the other two angles in the triangle.  The proof we did is probably the standard one and uses the fact that the angles in a triangle add up to 180 degrees.  After we finished this proof my son turned to me and said that he thought there was another way to prove the same theorem.   That was a nice little surprise and I asked him if he wanted to do this new proof for his morning movie.  He agreed and I turned on the camera with no idea of what he was going to say.  Turned out that he had a really good idea:

Fun morning.  Really love having conversations like these.

Area, Perimeter, and Fence Posts

A couple of years ago we stumbled on a pretty neat section of Khan Academy that talks about basic counting techniques:
https://www.khanacademy.org/math/pre-algebra/order-of-operations/counting%20tutorial/e/counting_1

I remember being surprised at how difficult it was for me to explain the concepts in this section to my older son.    Of course, I struggle to explain lots of math topics, but the struggle talking through these problems really stuck with me.  We even went outside to our deck and actually counted fence posts to try to help make the problems more real.

This week we ran across another “fence post” problem playing around with some old AMC 8 exams on the Art of Problem Solving site:

http://www.artofproblemsolving.com/Wiki/index.php/1986_AJHSME_Problems/Problem_18

This problem gave me the idea for our Family Math topic for this weekend – area, perimeter, and fence posts.

As we often do, we started out with snap cubes.   After some informal talk about a few basic geometry concepts, we made a little shape out of 4 snap cubes and talked about area and perimeter.  I was happy that we were able to find  two completely different ways of calculating the perimeter of the shape:

Next we talked about fence posts.  Watching the video just now, I’m not thrilled with how well I explained the fence post idea, but hopefully the example with the line was helpful.  The main thing I was trying to show is that counting the fence posts isn’t always super easy.  With a straight line you get one answer and with a closed “loop” you get a different answer.    Not necessarily intuitive, but there is a nice relationship with the perimeter (at least for the simple shapes we are looking at today).

and having dealt with the cat distraction,  the dog gets into the act:

finally, can we finish up with out another distraction . . . . :

So, despite the distractions, this was a pretty fun project.  I remember the difficulty walking through problems like this a few years ago, and I can see that both kids remain challenged by this type of problem.  Hopefully playing around with the snap cubes and the Penrose tiles help them get a better feel for each of the three geometry concepts we were talking through today.

Neat coin flipping problem found on Twitter yesterday

An essay by Jeremy Kun, a graduate student at the University of Illinois at Chicago, published on Edsurge on Feb 12 caused quite a stir on twitter yesterday.  I’m not interested in getting drawn into the discussion about the essay, but if you haven’t see it, you can read it here:

https://www.edsurge.com/n/2014-02-12-opinion-you-never-did-math-in-high-school

One response that seemed to get a lot of traction is here:

http://christopherdanielson.wordpress.com/2014/02/13/edsurgemath/

I first saw a reference to the Edsurge piece in a tweet from Justin Lanier yesterday morning:

I didn’t know what Justin was referring to, so I checked out @mathprogramming’s blog and found a really neat problem about coin flipping.    That piece is here:

Simulating a Fair Coin with a Biased Coin

We had lots of free time yesterday because of the blizzard, so I turned the coin flipping article into a fun afternoon project with the boys.

First I walked them through the problem – if we have some coins that don’t flip heads/tails 50% of the time, how can we use these coins to make 50/50 decisions?  It is a pretty neat problem:

With that as the introduction, we moved to the whiteboard and discussed a little bit about probability.  Some of the details were a bit above what my kids have studied, but not so much that they were totally lost.  I was actually pretty happy to be able to talk through a problem that used fractions since I just finished up a unit on fractions with my younger son last week.  It is always nice when a new or advanced problem lets you sneak in a little review 🙂

Finally, having worked through the probabilities, we jumped over to the computer to write a little program to simulate the problem.  I like to use Khan Academy’s programming site with the kids because it is easy to share.  The code in the original blog entry is obviously more compact than mine (to say the least!), but I thought breaking the problem into a few different chunks would help them understand the code a little better.  The program is here if you want to play with it:

https://www.khanacademy.org/cs/coin-flipping/5632235388534784

and the discussion where I walk the boys through the code is here:

As I said above, I really liked this activity.  I think the problem will be really fun for any kids who’ve played around a little with fractions and percents and also for any kids looking to learn some basics of computer modelling.

Computer math and the Chaos game

In the last blog post I mentioned the talk that Conrad Wolfram gave at the Computer Based Math Education Summit which you can find here:

http://www.computerbasedmath.org/events/education-summit-newyork-2013/

I found his thoughts on using computers in math education to be extremely interesting.  As I wrote yesterday, I’m not sure that I’d take things as far as he does, but I think that his arguments have a lot of merit.  My plan is to introduce the boys to more computer based math, and do so as soon as possible.

Following a field trip on Monday, my older son is starting a chapter on graphing quadratic equations on Tuesday, so bringing computers into the fold there should be easy.  I’m currently covering some introductory number theory with my younger son, so the computer side there isn’t quite as obvious.  Guess I’ve got something to think through for tomorrow!

Today I introduced them to the “Chaos Game.”  Seemed like a nice and easy starting point for computer-based math – the math itself is fairly easy and the result is stunning.  The program I wrote to work with them uses the programming section of Khan Academy.  I picked that simply because it is easy to share with others who are interested.  The program is here:

https://www.khanacademy.org/cs/chaos-game/2777397046

Feel free to play around with it, share it with kids, and make fun spin offs.  The video of the three of us going though the game is here:

/

If today’s exercise is any indication, the boys are really going to enjoy the computer math.  Can’t wait to do more!