# Why mathematics may become computer science

Walking home from the swimming pool (where he and Neva had been jumping into the water exactly 24 times, calling out all the permutations of 1,2,3 and 4), Simon suddenly stopped to tell me that some day, mathematics may become engulfed by computer science. Apparently, this was what he was thinking about the whole time he kept silent on the way. Once we got home I sat down to listen to the elaborate proof he had coined for his hypothesis. Here is comes, in his own words:

Someday mathematics may become computer science because most of mathematics uses simple equations and stuff like that, but computer science uses algorithms instead. And of course, algorithms are more powerful than equations. Let me just give you an example.

There’s this set of numbers called algebraic numbers, and there’s this set of numbers called computable numbers. The algebraic numbers are everything you can make with simple equations (finite polynomials), so not like trig numbers, which are actually infinite polynomials, just simple finite equations with arithmetic and power. Computable numbers, however, are a set of numbers that you can actually make with a finite algorithm. It may not represent a finite equation, but the rules for the equation have to be finite. So the algorithm that generates that equation has to be finite. It’s pretty easy to see that every algebraic number is by definition computable. Because the algorithm would just basically be the equation itself.

Is every computable number algebraic? Well, we can easily disprove that. It took very long to prove that Pi is not algebraic, that it is transcendental, as it’s called. But Pi is computable, of course, because, well, that’s how we know what Pi is, to 26 trillion decimal places. So there you go. That’s a number that is computable but not algebraic. So the Euler diagram now looks like this:

Now we look back at the beginning and we see that algebraic numbers have to do with equations and computable numbers have to do with algorithms. And because the set of all algebraic numbers is in the set of all computable numbers as we’ve just proved, the set of computable numbers will have more numbers than algebraic numbers. We have given just one example of how algorithms are more powerful than equations.

What about the mathematics that deals with numbers that are incomputable? – I asked.

Well, that’s set theory, a different branch of mathematics. I meant applied mathematics, the mathematics that has application.

# Infinite Series Calculator in Repl.it

Simon has made a small calculator/approximator in Repl.it that shows what number an infinite series converges to: https://repl.it/@simontiger/Series

# Simon’s Pi Composition

Simon has finished working on his Pi Composition, a piece of music entirely based on Pi (in the treble clef). Simon used only the digits of Pi he knew from memory (the first 19 digits), assigning each digit to a specific frequency on the grand piano (the 4th octave and three notes in the 5th octave). The accompanying tune for the left hand (bass clef) is not based on Pi and is purely added for the purpose of harmony (with the help of Simon’s piano tutor.

Simon has already made two other music videos about number sequences: one about the Recaman Sequence and one about the Fibonacci sequence. The Pi Composition, however, is the first time he has tried turning a sequence into an artistic peace, with rhythm and harmony.

# Happy Pi Day 2019!

Just like last year, Pi Day activities are going to spill over to the next few days, I’m sure. Simon’s not yet done working on a Pi piano composition and there’s a Pi day MathsJam coming up! What you see above are some impressions of today, March 14, including Simon trying to approximate Pi the way ancient Greeks (Archimedes) did.

# Simon’s code for an intriguing problem from the 3Blue1Brown math channel

The number of collisions between two objects equals a number of digits of Pi. The code on GitHub: https://github.com/simon-tiger/Pool_Pi

Simon writes:

From where I got this
I called this sketch Pool_pi because the original paper about this (written in 2003) was called something like Pi in Pool. I learned about this from a recent 3Blue1Brown series:

3rd video: [not out yet]

The idea
The idea is 2 blocks on a frictionless surface. One slides towards the other, that is facing a wall. All collisions are perfectly elastic.

If the two blocks have the same mass, you can quickly calculate that there will be 3 collisions.

If the one block is 100x the other, it just so happens that there will be 31 collisions.

If the one block is 10000x the other, there will be 314 collisions (I get tired of making graphics). If the one block is 1000000x the other, there will be 3141 collisions.

That’s pi!

The issue!
In my own code, I first used Box2D.
It worked for mass ratios of 1 and 100, but it didn’t work for 10000.

Then I started writing my own physics engine, hoping to fix this issue. But it was even worse.
I couldn’t even get 100 to work.

Then I figured that the blocks are colliding too frequently. So I slowed the 1st block down.
I could get 100 to work this way, but not 10000.

Can anybody help to fix this issue?

I borrowed part of the code from here: https://processing.org/examples/circlecollision.html

# Salle Pi

Simon talking about his favourite infinite sum at the circular room known as the “pi room” at the Palais de la Découverte (“Discovery Palace”) in Paris. Inscribed on the walls are 707 digits of the number π. The ratio of coprime pairs of numbers to pairs of numbers is 6/π^2. And 1/1^2 + 1/2^2 + 1/3^2 +… = π^2/6 So that means that the ratio of coprime pairs of numbers to pairs of numbers equals to 1 over Simon’s favourite infinite sum!

Simon made two more short videos at the pi room:
Proof that π is irrational: https://youtu.be/CUHgsCLxL0k
Looking for 2019 among the digits of π: https://youtu.be/5qIaA7MwzHY

Daniel Shiffman later showed Simon how to look for any number in the digits of Pi using this amazing project by Ben Fry: http://pi.fathom.info/

Murderous Maths

# Rational Approximations for Phi

“If I get the next two digits right, I’ll be ecstatic!” Simon says, as he hurries on with a φ (Phi) approximation algorithm using Fibonacci numbers. He keeps dividing every following Fibonacci number by the previous one and eventually gets quite a good Phi approximation a precision of 6 digits! This experiment is inspired by Mathologer, who applied this algorithm to approximate both Pi and Phi and show how “wildly less irrational Pi is than Phi”, Simon says. Simon calculated more terms for Phi though.