An introduction to the “inclusion / exclusion” principle

My older son is enrolled in a math enrichment program that is currently assigning some great counting problems. The program has a 3 week break now so I thought I’d continue on a little bit with some counting ideas and study the “inclusion / exclusion” principle.

We started off last night with the classic case of “derangements” after getting loads of good suggestions on twitter thanks to Patrick Honner, Justin Lanier, Bowen Kerins, and David Butler.

The initial question went like this: If you permute 4 numbers (or snap cubes) how many of those permutations leave no number in its original position?

First we just studied the problem to make sure that we understood it:

Next we moved on to see if we could count all of the cases. Unfortunately our camera ran out of memory in the middle of this video, so sorry for the jump. We did manage to count all of the cases, though:

Having written down all of the cases, we now tried to see if we could count them. The fun thing is that my older son’s idea led us down the “inclusion / exclusion” path:

Finally, I worked through an example with 5 blocks instead of 4. The purpose of this example wasn’t to lay out all of the theory but rather just to reinforce the ideas from the original example of 4 blocks. We’ll build from here in the next project:

A good introductory counting problem for kids – counting rectangles

My older son had a neat problem about counting rectangles on his homework (from an enrichment math program). He and I talked about these types of problems for a little bit during the afternoon, but they are such good examples that I thought it would be fun to do a short project on them.

We started with an introduction to the problem and a simple case – how many rectangles (with integer coordinates) are there in a 1×6 grid?

The neat thing here is that there was an accidental connection to Kelsey Houston-Edwards’s latest “Proof” video that we did a project on a few days ago:

Kelsey Houston-Edwards’s “Proof” video is incredible

Next we moved on to a more complicated problem – how many rectangles are in a 4×3 grid? Can we use the choosing number idea from the last video to count all of the rectangles here, too?

Finally, I wanted to show a counting procedure that was a little different than the choosing number approach in the last video. Here we defined a rectangle by the corners rather than the rows and columns.

This is a more complicated approach, but I thought it would be useful to show that two seemingly different counting strategies led to the same answer.

Revisiting Stephen Wolfram’s MoMath talk

Last week Stephen Wolfram posted an incredible summary of his talk at the Museum of Math:

We did a project using some of the code here:

Sharing Stephen Wolfram’s MoMath talk with kids

I think the ideas from the talk can provide kids with a really wonderful opportunity to explore math. We’ll hopefully revisit the ideas many times!

Today’s exploration follows the same line of ideas that we followed in the first project. The procedure we are looking at goes like this:

(2) Whatever number you get here, cycle the digits to the left -> so, 123 becomes 231, 1045 becomes 0451 (so just 451 for computations), 110110 becomes 101101, and etc . . .

(3) Now multiply the number from step 2 by a fixed number N and add 1.

We look at the sequence of outputs from this procedure in base 2, 3, 4, and 5 today. Quite amazingly, Stephen Wolfram showed that this entire procedure could be done with some very short code in Mathematica. Here’s a pic of the short code and also patterns we see in the digits when we multiply by 1, 2, 3, 4, 5, 6, and 7 at each step when we reun the procedure above in base 4.

If this seems way too complicated I’m not explaining the procedure well enough – go back to our first post on the subject or to Wolfram’s blog. I promise you’ll see that the explorations are totally accessible to kids.

We started our project today by revisiting the results in base 2 and looking for strange or unusual or really anything that caught our eye in the digit patterns.

Also, I’m sorry that the zoomed in shots are so fuzzy (so, the first minute here and basically all of the 4th video). I didn’t realize how bad the footage was until it was published. Even with the fuzziness, though, you can still hear how engaged this kids are and how interesting it was for them to explore all of the strange patterns:

For the 2nd part of the project we looked at the patters of the digits in base 3:

Then we looked at base 4 and immediately saw something that we’d not seen before:

So, having explored bases 2, 3, and 4 we went back to some of the patterns we’d seen and got a nice surprise – we were able to find structure in some of those patterns. This video is the exploration that led to us finding the pattern in base 2.

Again, I’m sorry this video is so fuzzy – wish I would have caught that when we were filming 😦

Now we moved on to exploring some of the patterns that we’d seen in base 3 and base 4 – that exploration allowed us to predict a pattern in base 5 even though we’d not yet looked at any of the digit patterns in base 5!

I can’t wait to play with Wolfram’s ideas a bit more. The ideas are such a great way to expose kids to exploration in math!

A math exploration via an interesting integral from Nassim Taleb

Yesterday Nassim Taleb posted an interesting integral yesterday:

Here’s the integral:

Taleb frequently posts difficult problems and I have a thought about maybe 1 in 10 of them. This one caught my eye, though, because I’ve been reviewing basic complex analysis trying to understand more about recent work by Laura DeMarco’s and Kathryn Lindsey:

3-D Fractals Offer Clues to Complex Systems

Convex shapes and harmonic caps on arXiv.org

Anyway, I had 90 min this morning while my older son is at an archery class, so I thought it would be fun to write up the little exploration I had yesterday with this integral.

In Taleb’s integral, the substitution $u = e^z$ transform the integral (after a little algebra and ignoring some constants) to one in the form:

Other than the square term in the exponential (which will become a big deal shortly!) this integral looked a lot like one of the contour integral examples in my old complex analysis book:

Playing around a bit on Mathematica encouraged me that integrals in the form above did have closed form solutions:

Also encouraging was this paper I found online showing how to evaluate the usual Gaussian integral via countour integration (see example 9):

“The Gaussian Integral” by Keith Conrad

I was surprised that the countour integration solution was only recently (well, recently for math) discovered, but the really amazing coincidence is that the form of the integral used to evaluate the Gaussian integral via countour integration is nearly the same form as the integral we are trying to evaluate here. So, I dove in to the calculations but unfortunately didn’t have much luck finding a contour that worked.

Then this paper was posted on Math Stackexcange and on twitter:

The form of the integral had been studied before and, unfortunateley, the general solution was unknown. However, lots of interesting stuff was known including a recurrence relation that gives the values that Mathematica had found plus a few more. It is a surprise that you can know the values of these integrals when $k$ is an integer, but not in other situations. Another surprise was the odd form of periodicity discussed in the paper.

Along the way I also found this surprise on Mathematica, which probably has an easy analysis-related explanation but isn’t obvious to me geometrically:

So, despite not getting to a complete solution, this problem Taleb posted was a really fun one to study. It never ceases to amaze me how much fun math gets shared on Twitter.

Buckets of Fish and Defeating Hydras

[sorry for a quick and unedited write up – wanted to get this out before we headed out for the day . . . .]

Saw a really neat post from Joel David Hamkins thanks to this tweet from Patrick Honner:

Buckets of Fish by Joel David Hamkins

We started today’s project by talking through the game. The question of whether the game ends in a finite number of steps was a little harder for them to understand than I think – but they got it eventually.

The confusion seemed to be the difference between:

(i) Here’s a path through the game than does end in a finite number of steps, and

(ii) there is no path that has an infinite number of steps.

After the short introduction to “Buckets of Fish” we watched Kelsey Houston-Edwards’s video on “Killing the Mathematical Hydra”. We’d watched this video when it came out a few weeks ago but didn’t use it for a project. I was happy that the boys remembered seeing it, though.

After viewing Houston-Edwards’s video we returned to whiteboard to talk about Hydras. My younger son did a nice job summarizing the hydra game, which I think is a testament to how good Houston-Edwards’s videos are explaining mathematical ideas to the public.

Next up – how are the hydras related to the fish?

Finally, to wrap up the project I thought it would be fun to study the case with 2 buckets more carefully. The motivation for this last section was a combination of the induction argument in Hamkins’s blog post and the introduction to induction proofs in Houston-Edwards’s latest video. For our project on that video see here:

Kelsey Houston-Edwards’s “Proof” video is incredible!

Anyway, I think the buckets of fish game makes for a nice introduction to mathematical induction for kids.

Definitely a fun project – sorry the write up is so rushed, but I wanted to get this out the door before we had to run out the door ourselves today 🙂

Kelsey Houston-Edwards’s ‘Proof’ video is incredible

Kelsey Houston-Edwards’s latest video is amazing:

It absolutely blew me away. The kids have a late karate class today so I had to wait a few extra hours to use the new video for a project – WORST WAIT EVER!!!

To start the project I had the boys look at three of the problems in the video to see what approach each kid would take to prove the mathematical statement. My younger son is in 5th grade and my older son is in 7th grade, so I’m not expecting perfect proofs (by any stretch of the imagination) but rather just looking for their ideas.

Here’s the first problem – can you cover an 8×8 checker board with 2×1 dominoes if you remove two opposite corners:

The next problem was to show that the sum:

$1 + 3 + 5 + \ldots + (2n - 1) = n^2$

Here’s what they had to say – both ideas here were really interesting and used arithmetic. I was excited to see their reaction to the geometric proof in the video:

The next problem was to show that ” n choose 2″ was equal to $1 + 2 + 3 + \ldots + (n-1)$.

My younger son had a nice idea to start small and work his way up. He got stuck so I helped him a little. As in the last video, my older son did the proof by calculating.

After working through these three problems we watched the new video together. The problem about the L-shaped tile covering the $2^n x 2^n$ grid caught my youngers son’s eye. That led to a short discussion of induction.

The problem about breaking the stick into 3 parts and forming a triangle caught my older son’s eye. He reconstructed the cool proof from the video. I’d like to show him some alternate proofs from geometric probability, too, since they are all so fun!

I’m really enjoying the math videos that Houston-Edwards is making. This one is especially amazing. How great would it be for every math class in the country to watch her video tomorrow! I think it would change the way that kids see math.

A fun shape for kids to explore: the Permutohedron

I learned about permutohedrons from a comment by Allen Knutson on a prior blog post. See the first comment here:

A morning with the icosidodecahedron thanks to F3

I prnted the shape from Thingiverse and it was amazing!

“Permutahedron” by PFF000 on Thingiverse

We started the project today by examining the shape and comparing it to a few other shapes we printed. The comparison wasn’t planned – the other shapes just happened to still be on the table from prior projects . . . only at our house 🙂

Next we talked about permutations and the basic idea we were going to use to make the permutohedrons. We drew the 1 dimensional version on the whiteboard and talked about what we thought the 2 dimensional version would look like.

We used our zometool set to make a grid to make the 2 dimensional permutohedron. Lots of different mathematical ideas for kids in this part of the project -> coordinate geometry, permutations, and regular old 2d geometry!

Next we went back to talk about how PFF000’s shape was made. Here’s the description on Thingiverse in case I messed up the description in the video:

“The boundary and internal edges of a 3D permutahedron.

The 4! vertices are given by the permutations of [1, 3, 4.2, 7], with an edge connecting two vertices if they agree in two of the four coordinates. The 4D vertices live in a 3D hyperplane, namely the sum of the coordinates is 15.2.

This part of the project was a little longer, but worth the time as both the simple counting ideas on the shape and the combinatorial ideas in the connection rules are important ideas:

Finally we wrapped up by taking a 2nd look at the shape and also comparing it to Bathsheba Grossman’s “Hypercube B” which was also still laying around on our project table!

This was a really fun project that brought in many ideas from different areas of math. I’m grateful to Allen Knutson for the tip on this one!

Sharing “The Secret Life of Equations” with the boys

I saw Rich Cochrane’s The Secret Life of Equations at the book store yesterday and bought it for some fun with the boys. Here’s the book on Amazon:

I’ve done a few other projects previously in which the boys pick out ideas from a book. Here’s what they had to say flipping through this one.

My younger son like the chapter on the equation \$latex e^{\pi i} + 1 = 0:

By lucky coincidence Grant Sanderson has a neat new video on the subject – maybe that’ll be interesting to my son, too:

The idea that caught my older son’s attention was the heat equation. We haven’t quite gotten to calculus yet (ha ha ), but it was still fun to hear what he had to say:

I like the book even though it really isn’t intended for kids. We’ll probably do several more projects like this one over the next few months.

Sharing Stephen Wolfram’s MoMath talk with kids

I saw an amazing tweet from Stephen Wolfram today:

Based on the blog post, his talk at MoMath must have been incredible!

I decided to try out one of his explorations with the boys tonight. We did the first few parts by hand and the last part using Mathematica and the code from Wolfram’s blog post.

The process we studied works as follows:

(1) Pick an integer to start with and pick a number $n$ to multiply by in step (3),

(2) Cycle the digits of the number to the left. A few examples will make the process clear:

123 goes to 231
402 goes to 024, or simply 24
111 would stay 111

(3) Multiply the new number by $n$ and then add 1.

The video below shows how our exploration began. Our initial integer was 12 and we multiplied by 1 at each step (so, starting easy, though I picked 12 at random so I really didn’t know what was going to happen):

Now we moved to a slightly more complicated example -> the same process as in the first part but we’ll be working in binary rather than in base 10.

We started with the number 6 (110 in binary) and multiplied by 2 at each step. Once again we found a fun surprise:

To get one more round of practice in before moving upstairs to the computer we looked at the same situation as in part 2, but this time starting with 1 and looking at several cases – multiplying by 1, by 2, and by 3:

Finally, we went to the computer to explore the process in many different situations. We used code from Wolfram’s blog post to recreate the work from the MoMath talk:

What I *love* about this project is that the exploration works really well with kids on the whiteboard and on the computer. The whiteboard exploration gave us a great opportunity for a little practice with arithmetic, with binary, and with algorithms. We also saw some really fun surprises!

The computer exploration is obviously fantastic, too. I’m so grateful that Stephen Wolfram shared the ideas from his talk!

Sharing a shape from calculus with kids

Finding the volume of the intersection of two cylinders is a common calculus problem. The shape also plays a role in this old (for the internet!) video from Brooklyn tech that inspired me to get a 3d printer:

Today for a fun project to start the week I decided to share the shape with the boys and see what they thought about it. My younger son went first:

After playing on the computer I had him explore the printed version of the shape – make sure to stay to about 1:25 to hear where he thinks this shape might occur in “real life” 🙂

Next my older son played with the shape on the computer. He remembered seeing it before in a project from a month ago on the intersection of 3 cylinders:

Exploring 3 intersecting cylinders with 3d printing

Next he played with printed shape. I asked him to describe how he thought you’d be able to figure out that the shape was made out of squares – I thought his answer was pretty interesting. This question gets to the math ideas behind the calculus problem.

It is sort of fun for kids to see and play with shapes like this – no need to wait for calculus anymore to explore interesting shapes!