Collatz Conjecture
The Collatz problem is one of those unsolved problems in mathematics which can be understood (ironically) by common people. Beginning with any positive integer x1 = k, we successively iterate using xn = xn-1 / 2 if xn-1 is even, or xn = 3 * xn-1 + 1 otherwise. Collatz conjecture claims that xn eventually reaches '1' for every positive integer k that we begin with. The following graph portrays the behaviour of the input number when subjected to the aforementioned iterations. Stopping time is the number of iterations after which we obtain '1'.
Brief Description
Despite the apparent simplicity of the conjecture, no one has been able to prove it. It has been found correct for number until 300 quintillion, via brute-force computation). However, that is hardly a proof. There are two circumstances under which this conjecture is false: 1) If there is a number that never converges to 1 or 2) If the number go about in an infinitely repeating loop. There are a lot of proofs which convey that this conjecture is true for almost all numbers. or that most numbers, on average, decrease during iterations. A conclusive proof is at large.
Note:
- Obtain interesting data about stopping times from here.
- Some numbers undergo a lot of iterations before reaching 1. In such cases, the graph may look horizontally compressed if your device is low-width.
- Some numbers iterate through a large range of values. The maximum value attained is displayed at the end. If this value is high, then small changes go unnoticed.
Developed by ChanRT | Fork me at GitHub