top of page

Mathematical Blackhole

Shruti Bhanushali

April 14, 2024

Warning: Do not try to solve this math problem. I know you will be tempted, but just...no.


The infamous Collatz conjecture (also known as the "3n+1" sequence, Syracuse problem, the Ulam problem, the Hasse algorithm, or the Kakutani problem) was proposed by German mathematician Lothar Collatz in the year 1937. Despite being the simplest math problem, it remains unsolved to date and has also been declared computationally unsolvable.


The problem is simple: You take a number, any number. If it's odd, you multiply it by 3 and add 1, and if it's even, you divide it by 2. If you keep this up, you’ll eventually get stuck in a loop. At least, that’s what we think will happen, Are you with me so far? Brilliant! 


Let's take a random number, say 13. 13 is odd, so we multiply by 3, which gives us... 39 + 1 = 40. Now 40 is even, so we divide it in half, which gives us 20. Again, even, divide by 2, and we get 10. Again, even, divide, and it gives us 5. Now it's odd, so we multiply by 3 and add 1, which gives us 16. Even, so we divide 8, 4, 2, 1. Okay? But now our n = 1, which is odd, so we multiply by 3 and add 1, which gives us 4, 2, 1, and hence the loop.


The conjecture suggests that for any number you take and apply the rule, you will always end up at 4, 2, 1 loop, or in other words every number will converge at 1.


People have tried to visualise this sequence and it comes out looking like a beautiful seaweed


https://www.technologyreview.com/2021/07/02/1027475/computers-ready-solve-this-notorious-math-problem/



But I approached the problem slightly differently (thanks to this article https://steemit.com/steemstem/@hugobohor/a-mathematical-black-hole-yes-the-collatz-conjecture-or-3n-1-conjecture-the-problem-that-has-baffled-the-great-mathematicians-of) The author of this article made an analogy of the conjecture with that of a black hole.

Just like the amazing bodies of the universe with immense masses whose gravitational fields are so intense that no object, even light, can escape them, Collatz's sequence, called the Collatz Conjecture, can be considered a mathematical black hole, because regardless of the number from which it starts, it always leads to the same result, that is, no number can escape the "final vortex" of the Collatz sequence. 

Super fun right? I used JavaScript and the p5.js library, which is based on Processing, to create this visualization.


Source Code: https://github.com/sbhanushali2010/CollatzBlackhole.git

Continue Reading

More insights to help you make better decisions and improve IT operations.

The Human Effect of AI

As artificial intelligence becomes part of everyday life, questions arise about its impact on human intelligence, critical thinking, and creativity. This article examines the risks of overreliance on AI and the importance of keeping our minds actively engaged in learning and problem-solving.
READ NEXT

Mathematical Blackhole

Take a closer look at the Collatz Conjecture, a seemingly simple number puzzle that remains unsolved. Through an imaginative JavaScript visualization, explore its intriguing patterns and the idea of a mathematical black hole.
READ NEXT

You Can't Shift Left Until You Make Room on the Left

Discover why successful shift-left strategies require more than transferring skills from L2 to L1. Learn how automation, self-service, and AI can create the capacity needed for service desk transformation.
READ NEXT
bottom of page