Coding, Crafty, Experiments, Geometry Joys, JavaScript, Math and Computer Science Everywhere, Math Riddles, Milestones, Murderous Maths, Notes on everyday life, Simon makes gamez, Simon teaching, Simon's Own Code, Simon's sketch book

Approximating pi and e with Randomness

This has been one of Simon’s most ambitious (successful) projects so far and a beautiful grand finale of 2019, also marking his channel reaching 1K subscribers. The project – approximating Euler’s number (e) in a very weird way – is based upon a Putnam exam puzzle that Simon managed to prove:

The main part of the project was inspired by 3Blue1Brown Grant Sanderson’s guest appearance on Numberphile called Darts in Higher Dimensions, showing how one’s probable score would end up being e to the power of pi/4. Simon automated the game and used the visualization to approximate e. Below is the main video Approximating pi and e with Randomness. You can run the project online at: https://editor.p5js.org/simontiger/present/fNl0aoDtW

Code: https://editor.p5js.org/simontiger/sketches/fNl0aoDtW

The history and the math behind the project:

Simon’s proof od the math behind the project:

Simon has visualized this problem and proof at: https://editor.p5js.org/simontiger/present/2uMPZ8THW

Code: https://editor.p5js.org/simontiger/sketches/2uMPZ8THW

Crafty, Math and Computer Science Everywhere, Math Riddles, motor skills, Murderous Maths, Simon makes gamez, Simon teaching, Simon's sketch book

Proof Visualization. Warning: Mind-boggling!

Inspired by the Card Flipping Proof by Numberphile, Simon created his own version of this proof. He made a solitaire game and proved why it would be impossible to solve with an even number of orange-side-up circles. He drew all the shapes in Microsoft Paint, printed them out and spent something like two hours cutting them out, but it was worth it!

The colourful pieces in the lower row are a “key” to solve the solitaire puzzle. The objective is to remove all the circles. One can only remove a circle if it’s orange side up. Once a circle is removed, its neighbouring circles have to be flipped. Using the key, start with the yellow pieces, and move in the direction of the “grater than” sign (from smallest to largest).

If there’s an odd number of orange circles in the middle, then the end pieces are the same, both orange or both white. In both cases the total number of orange circles will also be odd. If there’s an even number of orange circles in the middle, then the ends have to be different (one orange, one white).

In the case of odd number of orange pieces, the ends have to match. In the case of an even number of orange pieces, you would have pieces that point the same way at both ends. “Now we’ve proven that to make this puzzle possible it has to have an odd number of orange pieces”, Simon says.

Why? Imagine a stick figure that always walks to the right, but always faces in the direction of the arrow (as in it can’t go backwards). It would flip every time it reaches an orange circle. Focusing on everything except the ends, if there are an odd number of orange circles, the puzzle pieces would face the other way. Which means that the end pieces are the same, and therefore the end circles are the same. If there are an even number of orange circles in the middle, the puzzle pieces would face the same way. Which means that the end pieces are different, and therefore the end circles are different.

Simon finds this sort of proof easy, but I felt like my brains are going to boil and dripple through my ears and nostrils. He patently exlained it to me several times and types the above explanation, too.

Experiments, Group, Milestones, Murderous Maths, Physics, Together with sis, Trips

All Nerds Unite: Simon meets Steve Mould and Matt Parker in London

Hilarious, inspirational and loaded with cosmic coincidences, this was one of the best evenings ever! Many of our currently favourite themes were mentioned in the show (such as the controversy of Francis Galton, the BED/ Banana Equivalent Dose, sound wave visualizations, laser, drawing and playing with ellipses, Euler’s formula). Plus Simon got to meet his teachers from several favourite educational YouTube channels, Numberphile, StandUpMaths and Steve Mould.

With Steve Mould
With Matt Parker
Crafty, Geometry Joys, motor skills, Murderous Maths, Simon teaching, Simon's sketch book

A Square Triangle?

Simon explains what Gaussian formula is to check a shape’s curvature and shows how to make a triangle with three 90° angles. Or is it a square, since it’s a shape with all sides equal and all angles at 90°? He also says a few words about the curvature of the Universe we live in.

Almost everything he shares in this video Simon has learned from Cliff Stoll on Numberphile:
https://www.youtube.com/watch?v=n7GYYerlQWs
https://www.youtube.com/watch?v=gi-TBlh44gY

Milestones, Murderous Maths, Music, Piano, Simon teaching, Simon's sketch book

Simon’s Fibonacci Music Pesano Periods

Simon writes:

I have composed a piece of music based on the Fibonacci sequence, using modular arithmetic (I assigned numbers from 0-6, the remainders after ÷ by 7, to notes C-B, i.e. 1-C, 2-D, 3-E, 4-F, 5-G, 6-A, 0-B. Then I added harmonies to the left hand). I noticed that after 16 notes, the sequence comes back to where it started!

But what really amazed me, is:

> I tried the same with Lucas #s, and Double fibonacci #s, and it always came back to where it started! Not only that, but always with the same length of period as well! It’s amazing!!!!

So, when you see something like this, you try to go over to a whiteboard and prove it, right? This is exactly what I did. In the vid below, you can see my proof of why this happens. I also analyze it a bit more, by seeing what is special of the Fibonacci #s, and also try ÷ by different numbers, instead of 7.

Disclaimer: Numberphile has already done a musical piece based on the Fibonacci numbers and a discussion of Pesano periods. What’s specific to my video:

* Trying different fibonacci-style sequences
* Proof
* What’s then special about the Fibonacci #s
* Making a table of different divisors
* (And, mathematics-aside, doing my composition in a more mathematical way, by being more strict about the melody)

Simon’s original score
Coding, JavaScript, Math Riddles, Murderous Maths, Simon makes gamez, Simon teaching, Simon's Own Code

Cat and Mouse

This is a project that Simon started a few weeks ago but never finished, so I think it’s time I archive it here. It’s based upon this wonderful Numberphile video, in which Ben Sparks shows a curious math problem – a game of cat and mouse – in a computer simulation he’d built. The setting is that the mouse is swimming in a round pond and is trying to escape from a cat that is running around the pond. What is the strategy that the mouse should apply to escape, considering that it swims at a quarter of the speed the cat runs?

Simon came up with his own code to recreate the simulation from the Numberphile video. In the four fragments I recorded, he showcases what he has built. Please ignore my silly questions, at the time of the recording I hadn’t viewed the Numberphile video yet and had no idea what the problem entailed.

Coding, Milestones, Murderous Maths, Python, Simon teaching, Simon's Own Code, Simon's sketch book

The Van Eck Sequence

Simon explains that the Van Eck Sequence is and shows the patterns he has discovered in the sequence by programming it in Python and plotting it in Wolfram Mathematica. Simon’s project in Wolfram is online at: https://www.wolframcloud.com/objects/4066d93a-893b-4a99-9fdc-54e265d27888

He also shows Neil Sloane’s proof of why the sequence is not periodic and adds an extra bit to make the proof more complete.

This video is inspired by the Numberphile video about the Van Eck sequence.

Simon’s code in Python to generate the Van Eck sequence
Biology, Murderous Maths

The All Common Ancestors Generation

This project is a simulation of how many people can stem from the same ancestor, something Simon has learned from James Grime’s “Every Baby is a Royal Baby” video on Numberphile. In this simplified version, there’re only 6 people per generation. Simon was throwing two dice to determine who the two parents were for every person (in the case when both dice came out to be the same number, this was considered “virgin birth” or simply that the father had come from outside the limited sample Simon was working with).

the present generation
Simon marking who the children of a person were in pink pencil
Some parents don’t have the digits corresponding to their children written next to them, but letters N and E: N means that that person from the parent generation had no children and is therefore related to no one from the future generations; E on the conrrary, means that that person “has been busy” and is related to everyone in the next generation!
identifying the most recent common ancestor generation and the identical ancestors generation
the all common ancestors generation
Coding, Milestones, Murderous Maths, Simon's Own Code, Simon's sketch book

Multiplicative Persistence in Wolfram Mathematica

Simon has tried Matt Parker’s multiplicative persistence challenge on Numberphile: by multiplying all the digits in a large number, looking for the number of steps it takes to bring that large number to a single digit. Are there numbers that require 12 steps (have the multiplicative persistence of 12)?

Simon explaining the project

Simon has worked on this for two days, creating an interface in Wolfram Mathematica. He wrote the code to make the beautiful floral shapes above, they are actually graphs of how many steps three digit numbers take to get to single digit numbers (each ”flower” has the end result at its center).

What about the numbers with many more digits than three? Simon has tried writing code to look for the multiplicative persistence of really large numbers and also came up with some efficiencies, i.e. shortcuts in the search process. He did manage to find the persistence for 2^233 (the persistence was 2):


persistence for 2^233

However after he applied one of his efficiencies to the code to be able to search through many numbers at once, the code didn’t run anymore. You can read Simon’s page about this project and see his code here:

https://www.wolframcloud.com/objects/monajune0/Published/persistence.nb

Simon writes:

277777788888899 is the smallest number with a persistence of 11.
The largest known is 77777733332222222222222222222:

This code works with a few efficiencies:
1. They’ve already checked up to 10^233, so we don’t have to check those again.
2. We can rearrange the digits, and the multiplication will be the same. So we don’t have to check any of the rearrangements of any of the numbers we’ve already checked.
3 
3a. We should never put in a 0 (a digit of the number). Because then you would be multiplying by 0, which would result in 0 in 1 step!
3b. We should also never put in a 5 and an even number. Because, in the next step, the number would be divisible both by 5 and by 2, so it’s also divisible by 10. That would put a 0 in the answer, which we saw we should never do!
3c. With similar reasoning (assuming we want to find the smallest number of the type we want), we’ll see we should never put in:
– Two 5s
– A 5 and a 7
– When we put in a… (- means anything, the order doesn’t matter):
1,- , remove the 1
2,2, put 4 instead
2,3, put 6 instead
2,4, put 8 instead
3,3, put 9 instead
So, we can reduce the search space and time collossaly, with just some logic!