Tag computers

Sharing Matt Zucker’s Shadertoy program with kids

Saw an amazing tweet from Matt Zucker yesterday:

My older son is on a school trip this weekend, so this project is just with my younger son (in 6th grade). I thought he’d had a lot of fun playing around with the program, so I let him explore it (with no instruction or even explanation) for about 10 min and then asked him what he thought was neat:

At the end of the last video he was playing around with the different numbers. I didn’t want to go into what those numbers represented, but I did think it would be great to hear some of his ideas and conjectures.

He found some ideas that seemed to work and a few that didn’t – so that was great to hear. By the end we’d found a shape that we could make from our Zometool set.

To finish this morning’s project we built the shape – here’s are his thoughts about having the shape in front of him vs seeing it on a computer screen:

This was a super fun project. I think it might be a nice challenge to try to dive a little deeper into the general Wythoff constructions that the Matt Zucker’s program is designed to explore. For now though, even with any details, the program is really fantastic for kids to play with.


Talking about “sums of divisors” with kids and also a pi surprise

I didn’t do a very good job managing the time on this project today. The trouble is that there are lots of different directions to go with the ideas and we walked down a lot of different paths.

But – I think this is a great topic to show off the beauty of math and we end with an amazing connection between sums of divisors of integers and \pi.

The topic of sums of divisors of an integer came up in my younger son’s weekend enrichment math program yesterday. I thought it would make for a good topic for a project, so I gave it a go this morning.

The first part of the project was mostly about divisors and the kinds of questions that we could ask about them. A lot of the discussion here is about a question you can ask about the product of a number’s divisors:

Next we began to look at the sum of the divisors of a few different numbers. The boys noticed a few patterns – including a pattern in the powers of 2.

At the end we were looking to see if we could find patterns in the powers of 3.

It was proving to be a little difficult to find the pattern in the powers of 3, but we kept trying. After few ideas that didn’t quite help us write down the pattern, they boys had an idea that got us there.

At the end of this video I showed them that the sum of the divisors of powers of 6 was connected with the sum of the divisors of powers of 2 and powers of 3.

To wrap up I wanted to show some larger patterns in divisor sums, so we moved to Mathematica to play around a bit.

While I was doing the same playing around last night I accidentally stumbled on an amazing fact: As n gets large, the average of the sum of the divisors of the numbers from 1 to n is approximately (\pi^2 / 12)*n.

Number theory sure has some fun surprises 🙂

This is definitely a fun topic and also one that could be used in a variety of ways (arithmetic review, intro to number theory, computer math, . . . ). I wish that I’d presented it better. Probably it needs more than one project to really fit in all of the ideas, though.

Sharing basic machine learning ideas with kids

Two weeks ago I saw an interesting lecture from Gil Strang at MIT about the math behind machine learning. Sharing some of those ideas with kids has been on my mind ever since. Today I finally got around to it!

We’ve done a few previous projects that touched on ways to make machine learning accessible to kids. The Martin Gardner hexapawn project is incredibly fun and also is accessible to really young kids, the other project below uses the same Tensorflow website that we played with today:

Introduction to machine learning for kids via Martin Gardner’s article on Hexapawn

Sharing a fun neural network program with kids

Here’s a link to the Tensorflow website:

A Neural Network Playground

Today I began be asking the boys what they knew about machine learning and then I explained a bit about classification problems:

Next I moved on to drawing a clumsy picture of what a neural network might look like and then did a clumsy explanation of how a neural network might work. My older son asked a really great question that gets to the difference between the Hexapawn game and how modern neural networks work – so we chatted about that for a bit.

Then I talked about the so-called “relu” firing function for neurons.

Before moving on to the Tensorflow program, I wanted to spend a few minutes talking about an idea that Gil Strang mentioned in his lecture. That idea is the connection between folding and classification.

This idea, I think, helps make the classification problem accessible to kids.

Next up was playing with the Tensorflow program and exploring some basic classification examples:

Then I let the kids play with the program by themselves for about 15 min – here are a few of the ideas that they found interesting:

Machine learning is an incredibly popular and growing area of math and computer science right now – the Tensorflow website is a great way to share some of the ideas in machine learning with kids.

Sharing hinged tiling quadrilaterals with kids

Saw a really neat tweet from John Carlos Baez last week:

Finally got a chance to share this site with my younger tonight. This site is fantastic to share with kids – my son enjoyed playing around with the tiling patterns, and it was also really interesting to hear him try to describe what he was seeing.

Here’s his initial look at the site:

Here’s his reaction and play with the part of the site that allows you to create and manipulate new quadrilaterals:

This is a wonderfully easy site and a really fun idea to play with. I think with older kids it would be nice to see them try to think through why the cyclic quadrilaterals have this hinged tiling property, but I thought that might be a little much for my younger son. We’ll do a follow up exploring those ideas soon, though.

Sharing the ABRACADABRA problem with kids

Yesterday we did a fun project on Markov chains and sharing the “COVFEFE” problem with kids:

Sharing Markov chains and the “covfefe” problem with kids

For me math behind this problem was the most interesting math I learned in 2017:

The most interesting piece of math I learned in 2017 -> the “covfefe” problem

Today we moved on to a really neat surprise, and what makes the math behind this problem incredibly fun -> the “ABRACADABRA” problem.

First, we reviewed the ideas from yesterday:

After that review, we though through a few of the states and the transition probabilities in the new word. The transition probabilities are subtly different than in the “COVFEFE” problem:

Now we went to Mathematica to code in the ideas we discussed in part 2. We did about half of the coding on camera and did the other half off camera:

Finally, having finished the code we discussed what results we expected. I don’t see how anyone could get the right intuition here seeing the problem for the first time, so what do you expect here is almost an unfair question. Still, the boys had some nice ideas and then we checked out the results:

There are other approaches to these problems – the approach via Martingales, for example:

What that approach is also interesting (and incredible – you can solve the stopping time in your head!) I think the Markov chain approach is a bit more accessible to kidsd. Well . . . maybe because the math is buried in the background.

Anyway – super fun project, and an great piece of math to share with kids.

Sharing Markov chains and the “COVFEFE” problem with kids

In 2017, the most interesting piece of math I learned can via Christopher Long and Nassim Taleb and related to the “COVFEFE” problem:

Screen Shot 2017-12-11 at 5.05.10 AM

I wrote about the problem here:

The most interesting piece of math I learned in 2017 -> the “covfefe” problem

It turned out that we’ve looked at Markov chains before thanks to this great video from Kelsey Houston-Edwards:

Sharing Kelsey Houston-Edward’s Markov chain video with kids

I’d forgotten about that project, but when I mentioned to my younger son that we’d be looking at Markov chains today he told me he already knew about them!

So, I started today by having the boys watch the PBS Infinite Series video again. Here’s what they thought:

Next I introduced the “COVFEFE” problem. I was really happy how quickly the boys were able to pick up on how Markov chains could be used to solve this problem.

Next we looked at Nassim Taleb’s Mathematica code – that code is so clear that the problem becomes instantly accessible to kids, which is pretty amazing.

Finally, since things were going so well this morning, I introduced the word that we’ll study tomorrow -> ABRACADABRA. The kids were able to see why the transitions in this word were different. I’m excited to see how they think through the “ABRACADABRA” problem tomorrow!

The math behind this problem really was the most interesting math that I learned in 2017. It is really important math, too, and I’m excited that the Mathematica code makes some of the ideas accessible to kids. This was a fun one!

An attempt to share some Katherine Johnson’s math ideas from Hidden Figures with my son

For the last few months I’ve been daydreaming about ways to share some of the math from the movie Hidden Figures with kids. As part of that prep work I found one of Katherine Johnson’s technical papers on NASA’s website:

NASA’s Technical Note D-233 by T. H. Skopinski and Katherine G. Johnson

As you’d expect, there’s a lot of trig, calculus and spherical geometry. I like finding ways to share the work that mathematicians do with kids, but this work is pretty technical and I wasn’t getting any great ideas.

Then my son had a homework problem from his Precalculus book that made me think it was time to stop daydreaming and just try something. Here is that problem, which is a completely standard law of cosines problem:

The problem reminded me of one of the equations for an ellipse used in the Technical Note. One surprising thing is that the equation of an ellipse in polar coordinates is that is is a rational function in \cos{\theta}.

So, I drew an ellipse and showed my son that equation.

One of the neat things about the Technical Note is that the solution to some of the complicated trig equations were found by an iteration method. The specific ideas for solving those equations are too advanced for kids, so I decided to show my son a different (and really simple) iteration method that converges to a well known number:

After that introduction to iteration methods, I decided to jump to a second and slightly more complicated example -> solving x = 3*x*(1 – x).

The ideas in the iteration method we use here can be explored purely geometrically:

Next we went upstairs to the computer to see some of the ideas we just talked about. The first idea was the polar coordinate equation for an ellipse:

Now we played with the second dynamical system -> solving x = 3*x(1-x).

By the way, the ideas here are incredibly fun to explore (especially seeing when this method converges and when it doesn’t), but the details of this method wasn’t really the idea here. I just wanted to show him what an iterative method looks like.

Finally, I showed him the actual paper and pointed out some of the parts we explored. Sorry that this film didn’t come out as well as I’d hoped, but you can view the paper from the first link in this post:

This was a fun project – even if it wasn’t planned really well. Showing some of the math behind Hidden Figures I hope helps motivate some of the topics that my son is studying right now. It will be fun to return to a second Hidden Figures project when he is studying calculus.

A fun math surprise with a 72 degree angle.

We’ve been talking a lot about 72 degree angles recently. Yesterday’s project was about a question our friend Paula Beardell Krieg asked:

Paula Beardell Krieg’s 72 degree question

In that project we learned that a right triangle with angles 72 and 18 (pictured below)

72 degree picture

Is nearly the same as a right triangle with sides of 1, 3, and \sqrt{10}

one three root 10 picture

Today I wanted to show the boys a neat surprise that I stumbled on almost by accident. The continued fraction expansion for the cosine of the two large (~72 degree angles) are remarkable similar and lead to the “discovery” of a 3rd nearly identical triangle.

We got started by reviewing a bit about 72 degree angles:

Now we did a quick review of continued fractions and the “split, flip, and rat” method that my high school teacher, Mr. Waterman, taught me. Then we looked at the continued fraction for 1 / \sqrt{10}:

Now we looked at the reverse process -> given a continued fraction, how do we figure out what number it represents? Solving this problem for the infinite continued fraction we have here is a challenging problem for kids. One nice thing here was that my kids knew that they could do it if the continued fraction had finite length – that made it easier to show them how to deal with the infinitely long part.

Finally, we went to the computer to see the fun surprise:

Here’s that 3rd triangle:

3rd Triangle

I love the surprise that the continued fractions for the cosine of the (roughly) 72 degree angles that we were looking at are so similar. It is always really fun to be able to share neat math connections like this with kids.

Exploring Newton’s method with kids

Yesterday we had about a 30 min drive and I had the boys open up to a random page in this book for a few short discussions in the car:

There were some fun topics that were accessible for kids, but then Newton’s method came up. Ha ha – not really drive time talk 🙂

It did seem like it could be a fun project, though, so I took a crack at it today. The goal was not computation, but mainly just the geometric ideas. Here’s how we got started:

Next I asked the boys if they could find situations in which Newton’s method wouldn’t work as nicely as it did in the first video. They were able to identify a few potential problems:

Now I had both kids draw their own picture to play out what would happen when you used Newton’s method to find roots. I think there’s a lot of ways to used the exercise here to help older kids understand ideas about tangent lines and function generally. I mostly let the kids play around here, though, and the results were actually pretty fun:

Finally, we went to Mathematica to see some situations in which Newton’s method produces some amazing pictures. Here we switch from real-valued functions to complex valued functions. Since I wasn’t going into the details of now Newton’s method works, rather than using some easier to understand code, I just borrowed some existing code from here:

The page from A. Peter Young at U.C. Santa Cruz that gave me the Newton’s method code for Mathematica

The boys were amazed by the pictures. For example, (and this is one we looked at with the camera off) here’s a picture showing which root Newton’s method converges to depending on where you start for the function f(z) = z^3 - 2z + z - 1:


Definitely a fun project. Even if the computational details are a bit out of reach, it is fun to share ideas like this with kids every now and then.

Sharing Tim Gowers’s nontransitive dice talk with kids

During the week I attending a neat talk at Harvard given by Tim Gowers. The talk was about a intransitive dice. Not all of the details in the talk are accessible to kids, but many of the ideas are. After the talk I wrote down some ideas to share and sort of a sketch of a project:

Thinking about how to share Tim Gowers’s talk on intransitive dice with kids

One of the Gowers’s blog posts about intransitive dice is here if you want to see some of the original discussion of the problem:

One of Tim Gowers’s blog posts on intransitive dice

We started the project today by reviewing some basic ideas about intransitive dice. After that I explaine some of the conditions that Gowers imposed on the dice to make the ideas about intransitive dice a little easier to study:

The next thing we talked about was 4-sided dice. There are five 4-sided dice meeting Gowers’s criteria. I thought that a good initial project for kids would be finding these 5 dice.

Now that we had the five 4-sided dice, I had the kids choose some of the dice and see which one would win against the other one. This was an accessible exercise, too. Slightly unluckily they chose dice that tied each other, but it was still good to go through the task.

Now we moved to the computer. I wrote some simple code to study 4-sided through 9-sided dice. Here we looked at the 4-sided dice. Although it took a moment for the kids to understand the output of the code, once they did they began to notice a few patterns and had some new ideas about what was going on.

Having understood more what was going on with 4-sided dice, we moved on to looking at 6-sided dice. Here we began to see that it is actually pretty hard to guess ahead of time which dice are going to perform well.

Finally we looked at the output of the program for the 9-sided dice. It is pretty neat to see the distribution of outcomes.

There are definitely ideas about nontransitive dice that are accessible to kids. I would love to spend more time thinking through some of the ideas here and find more ways for kids to explore them.