Nassim’s problem really isn’t accessible to kids, but a slight variant is -> how many sequences of 250 coin flips are there where no run of heads or tails is longer than 2 flips?
I decided to go through that problem with the boys this morning. It was just at the right level to really challenge them, but still fit inside of a 30 min project.
We started by looking at Xi’s problem and they both had pretty good intuition for which sequence was which:
After the short introduction we started trying to figure out how to tackle the problem about sequences where the longest run was at most 2. After thinking of a few other ideas first, they decided to take a look at some shorter sequences to see if that would help us get some intuition for how many had runs that were no longer than 2:
Now we took a look at the sequences of length 4. Luckily there are only 16 different coin flip sequences of length four, so we could write them all out. The boys found that there were 10 sequences with runs no longer than 2. That led to an idea about how many would work in general:
Now we had a conjecture – there would be 16 sequences of length 5 that had runs no longer than 2 – so we tried to count those sequences directly to see if the conjecture was right:
Finally, we sketched a general proof of the conjecture (I’m intentionally being vague on what it is to not give it away). This part was also a little difficult for the boys, but they eventually saw the right pattern and that pattern led to the general proof:
This problem made for a really fun project this morning and Nassim’s problem led to some great twitter discussions that lasted all week. I was happy to be able to find a piece of Nassim’s problem that the boys could tackle.
My younger son was working on a problem in the Wolfram Programming Challenges that is best solved using generating functions:
Yesterday we did an introduction to generating functions but unfortunate our camera’s memory card died and the videos were lost. Instead of repeating that introduction we just dove into some of the examples from the book we are using.
The first problem was about distributing juggling balls. It takes a few minutes for the ideas we talked about yesterday to click in, but eventually we were able to work through this problem:
Next is a really neat example of the kind of problem generating functions can solve – counting solutions to relatively simple equations (sorry for forgetting the camera was zoomed in at the beginning – we finally zoom out around 2:45):
Now we tried out a few of the exercises. The first one I chose was about distributing juggling balls. With the work we’d put in on the first example, this problem wasn’t too hard:
Finally, we tried out a new problem asking about the number of integer solutions to an equation. The ideas about generating functions seemed to be really sinking in now and this problem didn’t give them too much trouble:
Introducing the boys to generating functions made for a really fun weekend of math – happy that working through the Wolfram Programming Challenges gave us this opportunity.
This challenge was difficult for the kids and took about 3 days working for roughly 30 min each day to complete. I think that part of the difficulty came from having to think about a list of lists, which is a new idea for them (programming or otherwise).
For today’s project I wanted them to talk through their approach to the problem and eventually discuss the solution. We started with looking at the problem statement and talking a bit about what made this challenge a little difficult:
Next we talked about some of our initial ideas about the program and how we thought about the problem with an even number:
Now we discussed what was different (maybe surprisingly different) about the case with odd numbers:
Two wrap up we looked at the program the boys wrote and they talked through the code:
I’m really excited about working through more of these challenges. Some seem absurdly hard and I’m sure won’t be able to solve all of them, but I think we’ve got a fun summer ahead of us!
I managed to squeeze in a path counting project before he used it!
I started with a question about counting paths that he could solve by listing all of the possibilities:
In the last video my son was getting a little stuck trying to find a way to count the paths, but he did have a few ideas. Here we looked at a different set of paths and were able to find a good counting method:
Finally, with our counting formula in hand, we calculated the number of paths from the bottom left corner to the top right one:
Obviously this wasn’t a planned project, but it was fun to share this neat counting idea!
For today’s project we decided to explore some of the probability ideas around playing poker with 2 decks of cards. First we just looked at the possible hands and talked about some potential questions to ask:
For an introductory problem, we looked at the number of ways of getting a Royal Flush and then all types of flushes with a 5 card hand dealt from a single deck of cards:
Now we looked at how regular flushes could happen when dealt from a two decks of cards shuffled together. We also had a good discussion about whether or not it was more likely or less likely to get a flush in the 2 deck situation:
Finally, we went back to Mathematica to take a look at the numbers for a general flush with one and two decks. Here we are lumping all kings of flushes together – regular ones, straight flushes, and Royal flushes are all the same.
Compute the chances of various hands with 2-deck poker is a pretty fun math exercise for kids.
A couple of years ago Jim Propp suggested a neat counting exercise for the boys – counting tilings of 2xN rectangles by 2×1 dominos. We’ve played with this idea twice before, but thought it would be fun to revisit it today.
Today we continued the project (with just my older son as my younger son was hiking) and studied the problem that originally motivated this project -> If you have 24 students in a class, what is the chance that exactly 3 pairs of students will share a birthday? This is the surprisingly fun situation in my son’s English class.
We will – as I think it standard for the introductory version of this problem – be making the assumption that all birthdays are equally likely. If you want to see a really neat discussion – though not really a math for kids paper! – see the paper in this tweet:
So, to start the project today we first reviewed the main ideas from yesterday:
Next we took a step towards solving the problem by looking at the chance of having exactly 2 pairs. Once piece of the counting here is tricky, so we used the computer to help see what the problem was.
Now we tackled the “exactly 3 pairs problem”:
Finally, I had my son make up a problem to solve – he decided to find the chance of all 24 students pairing up. This problem wasn’t too hard given the prior work. It was also a fun challenge to try to estimate the chance of this happening.
Earlier in the week I learned that my older son’s high school English class has 24 students and 3 pairs of students who share the same birthday. None are twins, so no tricks or anything like that, just a fun fact for this particular class.
I thought it would be fun to figure out how rare something like this would be – assuming, of course, that all of the birthdays are randomly distributed amount the 366 possible birthdays (366 because many of the kids were born in 2004).
It turns out the chance of having exactly three pairs of kids with the same birthday (and no other shared birthdays) in a class of 24 kids is roughly 2.3%, or if you prefer the exact answer:
Instead of continuing with Mosteller’s book this weekend, I thought it would be fun to dive into the birthday problem. I started today with the standard problem – how many people do you need in a room for a 50% chance of two people sharing the same birthday. This is not an easy problem and the answer is not intuitive.
Here’s how we got started – not surprisingly, down a path that wasn’t quite right:
After coming up with a formula in the last video, we went to Mathematica to see what it said. Here we discovered that the formula was giving answers that were not correct:
Now we returned to the whiteboard and the boys found a new formula – this one calculated the chance of having exactly 1 pair with the same birthday. I was happy that they were able to derive this formula and even happier for the chance to show them it didn’t agree with our computer modelling!
Now we went back to the computer to see the surprise that our new – and much closer to correct – formula actually didn’t agree with the modelling. What was wrong?
Finally, having figured out why the two approaches didn’t match, the boys were able to find the correct formula to solve the problem. Tomorrow we’ll dive into the more complicated problem of finding the probability of 3 pairs:
We are up to problem #8 in Mosteller’s 50 Challenging Problems in Probability.
The problem today is a classic -> What is the probability that you would be dealt a bridge hand with 13 cards of the same suit from a well-shuffled deck of cards?
We started off by taking a quick look at the problem and getting a few ideas from the boys about how to solve it. One question that came up was whether or not the method used to deal the cards would matter:
The first cut at solving the problem involved dealing the cards in a circle – so what I’d think of as the standard way to deal cards:
Next up we took a little detour into choosing numbers because some of the details of how those numbers worked were a little fuzzy. It was a nice review and I was happy that the boys had recognized that the choosing numbers were somehow related to problem:
Finally, we wrapped up by checking to see if the probability changed when we used a different method of dealing.
I think this is a great question for kids to think through. The thoughts from the boys here are probably representative of some of both the struggles and connections that kids will have thinking through this problem.