Collatz Proof Proposed: Hailstone Sequences End In 1
mikejuk writes "A proof [preprint PDF] has been proposed for the Collatz conjecture about hailstone sequences. A hailstone sequence starts from any positive integer n the next number in the sequence is n/2 if n is even and 3n+1 if n is odd. The conjecture is that this simple sequence always ends in one. Simple to state but very difficult to prove and it has taken more than 60 years to get close to a solution."
A redditor to be more precise.
Never trust a spiritual leader who cannot dance -- Mr. Miyagi
The sequence ends in 1 rather than 1, 4, 2, 1, 4, 2..... by definition. A hailstone sequence has one additional rule, which is that the first 1 is the last 1, and the sequence ends.
"Who is the Journal of Quantum Physics going to believe?" --Stephen Hawking
A hailstone sequence starts from any positive integer n the next number in the sequence is n/2 if n is even and 3n+1 if n is odd.
It wouldn't have taken any more time to properly punctuate this "sentence" once -- for everyone -- than it takes everyone to punctuate it in their heads in order to make sense of it. I realize they just cut and pasted the bulleted points -- minus the bullets -- but c'mon, they didn't put those there just for decoration.
I am not a crackpot.
No.
The reason mathematicians are interested in the 3n+1 problem is that we do not have a very good understanding of the process -- it is a fairly simple process to describe, but it is not so easy to explain why it would always fall into the same cycle (1,4,2,1,4,2,1,4,2). A lot of problems in number theory are like this; Fermat's last theorem was similarly easy to state but very difficult to understand and prove. The real-life application of these problems is often more related to the various methods required to solve them than the problem itself.
For example, consider the problem of the quintic formula. As everyone with a middle school education should know, there is a formula that gives the solution to any linear equation (ax+b = 0), and there is a formula that gives the solutions to any quadratic equation (ax^2 + bx + c = 0). Some more educated people will also know that there are formulas for cubic equations (ax^3 + bx^2 + cx + d = 0) and quartic equations (ax^4 + bx^3 + cx^2 + dx + e = 0). The obvious question is, "What about quintic equations (ax^5 + bx^4 + cx^3 + dx^2 + ex + f = 0)?"
The answer is a somewhat intellectually interesting, "No, there is no formula that gives the solution to all quintic equations (using only arithmetic and radicals)." There is no real-world application of that answer; we can get good enough approximations of the solutions to quintic equations by various numeric methods, which is perfectly fine for any problem that involves solving a quintic. However, the proof that there is no quintic formula involves fields of mathematics that are very much applicable to real-world problems: group theory and field theory are very important in cryptography and certain branches of physics. Additionally, those fields of study led to the research of more general abstract algebra, with still more real-world application.
So, no, there is no real-world use for the Collatz conjecture, at least none that I am aware of. In all likelihood, the proof of the Collatz conjecture will lead to some practical application, or a better understanding of certain real world problems.
Palm trees and 8
Rebuttal of the "proof" here: http://mathlesstraveled.com/2011/06/04/the-collatz-conjecture-is-safe-for-now/
Every end has half a stick.
Such sequences are called hailstone sequences because the values typically rise and fall, somewhat analogously to a hailstone inside a cloud. While a hailstone eventually becomes so heavy that it falls to ground, every starting positive integer ever tested has produced a hailstone sequence that eventually drops down to the number 1 and then "bounces" into the small loop 4, 2, 1, ....
It lists as one of its sources this book on the etymology of math terms in English. It looks interesting. Maybe I'll get a copy myself....
I first heard about this conjecture many years ago (25?) and did what most geeks would do; I wrote a program to test all odd integer values and check that they did in fact reach 1.
The obvious approach is to remember the count for each value as you try them, then check any intermediate result against this table:
If found, just add that value to the current count and store the result.
This approach breaks down when you want to test starting values much larger than 2^32, because the space to store the table becomes larger than available memory.
One of the first optimizations is to realize that the result of taking 3n+1 starting from an odd (n) will always be even, so you can simply include the following n/2 (a shift) and increase the count, while getting rid of the multiplication by 3:
Odd(n):
n = 2m+1
3n+1 = 6m + 4
(3n+1)/2 = 3m + 2 = n + (n>>1) + 1
In asm this can be simplified to:
again: ;; Assume even, so divide by two and shift the bottom bit into carry ;; If the result of the shift was zero, we're done!
shr eax,1
jz done
inc edx ;; Increment number of steps ;; No carry means even input, so go back up
jnc again
inc edx ;; One extra increment ;; The starting value was odd, so now we need to multiply by 3 and add 2:
lea eax,[eax+eax*2+2]
jmp again
done:
A much more sophisticated step is to see that the next N operations are determined by the bottom N bits of the current value (as long as there are more than N bits available), basically allowing you to convert those N operations into a multiplication, an add and a shift right.
Next you realize that the intermediate values can very quickly overflow a 32-bit unsigned integer, and even using 64-bit values does not get you very far.
My approach back in those days was to use a variable number of 32-bit counters:
With a single counter I check for getting to 1 or overflowing so I need to use two counters.
With two (or more) counters I test for the top counter becoming zero, allowing me to reduce the number of counters, or for overflow forcing another incease.
All of this is of course much easier in asm than C,since you can use the ADD/ADC combination to perform arbitrary precision
Terje
"almost all programming can be viewed as an exercise in caching"
If that's your solution, you're a terrible engineer.
--
make install -not war
...by xkcd.