art, Crafty, Geometry Joys, Math and Computer Science Everywhere, Math Riddles, Murderous Maths, Notes on everyday life, Simon makes gamez, Simon teaching, Simon's sketch book, Together with sis

Math puzzles: Is it Possible?

Simon has been fascinated by these possible-impossible puzzles (that he picked up from the MajorPrep channel) for a couple of days. He prepared many paper visuals so that Dad and I could try solving them. This morning he produced this beautiful piece of design:

Simon showing one of the puzzles to another parent while waiting for Neva during her hockey training
Simon’s original drawing of the doors puzzle. The solution of the puzzle is based on graph theory and the Eulerian trail rule that the number of nodes with an odd degree should be either 0 or 2 to be able to draw a shape without lifting your pencil. The number of rooms with an odd number of doors in the puzzle is 4 (including the space surrounding the rectangle), that’s why it’s impossible to close all the doors by walking though each of them only once.
Simon explaining odd degree nodes
Computer Science, Crafty, Electronics, Engineering, Good Reads, Milestones, Simon's sketch book

Simon trying to build a 8-bit computer in circuit simulators

As some of you may know, Simon is working on building a real-life 8-bit computer from scratch, guided by Ben Eater’s tutorials (it’s a huge project that may takes months). He has also been enchanted by the idea to build the computer in a simulator as well, researching all virtual environments possible. The best simulator Simon has tried so far has been Circuitverse.org, although he did stumble upon a stack overflow error once, approximately half-way through (maybe the memory wasn’t big enough for such an elaborate circuit, Simon said). You can view Simon’s projects on Circuitverse here: https://circuitverse.org/users/7241

Link to the project that ended up having a stack overflow: https://circuitverse.org/users/7241/projects/21712

And here is a link to Simon’s new and more successful attempt to put together a SAP-1 (simple as possible) processor (work in progress), something he has been reading about in his new favourite book, the Digital Computer Electronics eBook (third edition): https://circuitverse.org/users/7241/projects/22541

https://circuitverse.org/users/7241/projects/21712
the register
the RAM
https://circuitverse.org/users/7241/projects/22541

Simon has also tried building an 8-bit computer in Simulator.io, but it was really difficult and time consuming:

Version in simulator.io

The next hopeful candidate was the Virtual Breadboard desktop app for pc. Simon downloaded it about ten times from the Microsoft store but it somehow never arrived, most probably because our Windows version was slightly outdated but who knows.

And finally, Simon has also discovered Fritzing.org, an environment for creating your own pcbs with a real-life look. He may attempt actually making a hardcopy SAP-1 via Fritzing after he’s done with the Ben Eater project. Conclusion: sticking with Circuitverse for the time being.

Computer Science, Crafty, Logic, Math and Computer Science Everywhere, Murderous Maths, Simon teaching, Simon's sketch book, Together with sis

The Diffe-Hellman key exchange algorithm

This is Simon explaining Diffe-Hellman key exchange (also called DiffeHellman protocol). He first explained the algorithm mixing watercolours (a color representing a key/ number) and then mathematically. The algorithm allows two parties (marked “you” and “your friend” in Simon’s diagram) with no prior knowledge of each other to establish a shared secret key over an insecure channel (a public area or an “eavesdropper”). This key can then be used to encrypt subsequent communications using a symmetric keycipher. Simon calls it “a neat algorithm”). Later the same night, he also gave me a lecture on a similar but more complicated algorithm called the RSA. Simon first learned about this on Computerphile and then also saw a video about the topic on MajorPrep. And here is another MajorPrep video on modular arithmetic.

originally there are two private keys (a and b) and one public key g
Neva helping Simon to mix the colors representing each key
Mixing g and b to create the public key for b
Mixing the public and the private keys to create a unique shared key
Done!Both a and b have a unique shared key (purplish)
Simon now expressed the same in mathematical formulas
Simon explained that the ≡ symbol (three stripes) means congruence in its modular arithmetic meaning (if a and b are congruent modulo n, they have no difference in modular arithmetic under modulo n)
Computer Science, Electronics, Geometry Joys, Logic, Math and Computer Science Everywhere, Murderous Maths, Notes on everyday life, Simon's sketch book, Trips

Doing math and computer science everywhere

One more blog post with impressions from our vacation at the Cote d’Azur in France. Don’t even think of bringing Simon to the beach or the swimming pool without a sketchbook to do some math or computer science!

This is something Simon experimented with extensively last time we were in France. Also called the block-stacking or the book-stacking problem.
Simon wrote this from memory to teach another boy at the pool about ASCII binary. The boy actually seemed to find it interesting. A couple days later two older boys approached him at the local beach and told him that they knew who he was, that he was Simon who only talked about math. Then the boys ran away and Simon ran after them saying “Sorry!” We have explained to him that he doesn’t have to say sorry for loving math and for being the way he is.
Drinking a cocktail at the beach always comes with a little lecture. This time, the truth tables.
Coding, Contributing, Geometry Joys, Math Tricks, Murderous Maths, Python, Simon teaching, Simon's Own Code, Simon's sketch book

Why the Golden Ratio and not -1/the Golden Ratio?

Take any real number and call it x. Then plug it into the equation f(x) = 1 + 1/x and keep doing it many times in a row, plugging the result back into the equation.

At some point you will see that you arrive at a value that will become stable and not change anymore. And that value will be… φ, the golden ratio!

But this equation also has another answer, -1/φ. If you plug that value into the equation, it will be the same, too. The real magic happens once you have rounded the -1/φ down (or up), i.e. once what you plug into the equation is no longer exactly -1/φ. What happens is that, if you keep going, you will eventually reach… φ as your answer!

Simon saw this interesting fact in a video by 3Blue1Brown and then came up with a proof as to why it happens.

Simon also sketched his proof in GeoGebra: https://www.geogebra.org/classic/zxmqdspb

Community Projects, Contributing, Math Riddles, Math Tricks, Milestones, Murderous Maths, Simon teaching, Simon's sketch book

Simon having fun solving math puzzles on Twitter.

While in Southern France, Simon really enjoyed solving this puzzle (he originally saw in a Brilliant.org vid). He was so happy with his solution he kept drawing it out on paper and in digital apps, and later shared the puzzle on Twitter. This sparked quite a few reactions from fellow math lovers, encouraged Brilliant to tweet new puzzles and now Brilliant follows Simon on Twitter, how cool is that!

history, Milestones, Murderous Maths, Simon teaching, Simon's sketch book

Another evening tea

Simon was showing Dad a graph of how technology is developing exponentially, y = a^x. Dad asked for a specific value of a, and Simon said: “All exponentials are stretched out or squished versions of the same thing.” He then quickly came up with the proof (“a few lines of relatively simple algebra”). “If all exponentials are pretty much the same, that means that all exponentials have proportionately the same derivative.”

“I’m converting a to e, because e has a place in calculus that we can work with”.
Coding, Murderous Maths, Python, Simon teaching, Simon's Own Code, Simon's sketch book

Prime Generation Algorithm in Python

Simon has written a code in Python that generates primes using the finite list from Euclid’s proof that there are infinitely many primes. “Starting with one prime (2) the code uses the finite list to generate a couple more numbers that aren’t in the list but are primes. It may not even get to all the primes in the long run!” There is only one problem with Simon’s algorithm…

Simon has written down Euclid’s proof in his own words first https://imgur.com/ML2tI6n
and then decided to program it in Python.

Resources:
https://www.programiz.com/python-programming/methods/list/remove
https://www.geeksforgeeks.org/iterate-over-a-set-in-python/
https://www.youtube.com/watch?v=OWJCfOvochA
https://numbermatics.com/n/10650056950807/
https://defuse.ca/big-number-calculator.htm