Blog Entries

May 2019
M T W T F S S
« May    
 12345
6789101112
13141516171819
20212223242526
2728293031  

Collatz Conjecture: Dabbling with Python and Graphviz

[This is slightly off topic from my usual Free Software analysis.]

So the Collatz Conjecture came to mind. I took a look at the Wikipedia article and was struck by a couple of things: I liked the stopping time (the number of steps you have to take to get from the given starting number to 1) plot and the graph showing the paths from certain starting numbers to 1.

Both also disappointed me for not showing enough data; this had clearly been done for clarity. Fair enough, but sometimes if you throw enough data in a visualisation it just “looks” right. Right? (OK, this is far from true). So, since it had been a while since I had last dusted off my Python and Graphviz skills, I thought I would try to replicate these visualisations, just with more data.

So let’s start with the stopping time plot (click to enlarge):

Nice pattern. Hardly exciting.

What is a little more fun is the graph showing the paths from given starting numbers back to 1 (click to see the full image, 36mb):

Be Sociable, Share!

Comments are closed.