Coding, Computer Science, Experiments, Geometry Joys, Milestones, Murderous Maths, Simon's Own Code

Experimenting with random walks in Wolfram Mathematica

Simon’s code is published online at:
https://www.wolframcloud.com/objects/monajune0/Published/Random_walk_distribution.nb
https://www.wolframcloud.com/objects/monajune0/Published/Random_walk_distribution2D.nb

Experimenting with random walks in Wolfram Mathematica

“If I take many random walks and see what the endpoints of those random walks are, what I’ll find is a Gaussian distribution!” Simon says. In the video, he programs 1D and 2D random walks and 2D and 3D histograms to show the distribution of the endpoints​ in Wolfram Mathematica.

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!

Coding, Logic, Machine Learning, Milestones, Murderous Maths, Notes on everyday life, Simon's Own Code

Domain Coloring with Complex Functions in Wolfram Mathematica

Simon has been completely carried away by Wolfram Mathematica. He keeps starting new projects, just to try something out. After working on his Knot Theory book for days, and making beautiful illustrations in Wolfram, he switched over to domain coloring. The images below are some impressions of his experimenting with the color function. He hasn’t applied the complex function yet.

Another new project he started has been Poisson disc sampling.

“Wolfram is the most advanced language! It has most built-in stuff in it! At Wolfram, they are working so hard, that the knowledge base is changing every second!” Simon screams out as he pauses the Elementary Introduction to Wolfram Language book (he was reading it at first and now binge watches it as a series of video tutorials). Simon has been especially blown away by the free-form linguistic input: “From plane English it somehow computes the results and maybe even native Mathematica Syntax!” Wolfram also “has an entire section which is machine learning!”

Simon has started a free trial about a week ago, but I guess we’re buying a subscription.

Starting out
Only brightness left to do
Color function done
Coding, Geometry Joys, Good Reads, Milestones, Murderous Maths, Simon teaching, Simon's Own Code, Simon's sketch book

Simon working on a book about Knot Theory

These are just a couple of pages from Simon’s new book/ digital presentation on knot theory that he’s currently working on:

page 9
page 21

I see him scavenging the internet in search of powerful sources. So far, he has used The Knot Book, the prime links calculator, the Rolfsen Knot Table (that was no longer online and that he found in the web archives), The Knot Atlas, Paul Bourke’s website, Wikipedia of course, more Wikipedia, Wikipedia’s List of Prime Knots, Brilliant’s knots page . Simon created some images on his own, each knot with just one line of code, using the tools on the Wolfram Mathematica website. Below are Simon’s knots in the up to 6 crossings category.