
Computer scientists attempt to corner the Collatz conjecture - beefman
https://www.quantamagazine.org/can-computers-solve-the-collatz-conjecture-20200826/
======
placebo
At some point I gave the Collatz conjecture some thought and understood the
probabilistic intuition of why it should be the case. Although I obviously
couldn't prove it, I decided to write my thoughts on why it is intuitively
obvious [1]. A few months later I received a comment mentioning that a proof
has been submitted based on the same intuition [2].

[1] [http://nocurve.com/virtual-lab/contemplating-the-collatz-
con...](http://nocurve.com/virtual-lab/contemplating-the-collatz-
conjecture-3n1/)

[2] [http://nocurve.com/about/](http://nocurve.com/about/)

~~~
Liron
> Every time the coin turns out heads, I take half of the money on the table
> (i.e the total you have left is divided by 2). Every time it turns out to be
> tails, your money is multiplied by 1.5 (plus a 50 cents bonus). It’s obvious
> that this game is totally rigged to my advantage as the amount of heads will
> converge to be similar to the amount of tails, but the loss you incur with
> each head result (money divided by 2) is larger than the win gained with
> each tail result (money multiplied by 1.5 + change).

This game has positive expected value, the only problem is risk of ruin if you
size your bets too aggressively as a percentage of your chip stack

~~~
beojan
You can't be ruined if you can only lose a percentage of what you bet.

------
md224
> Aaronson came up with a rewriting system with seven symbols and 11 rules
> that was analogous to the Collatz procedure.

Has Aaronson written about this anywhere? I'm curious what system he came up
with & how it maps onto Collatz.

~~~
hardmath123
See Denend's thesis, around pg. 44

[https://repositories.lib.utexas.edu/bitstream/handle/2152/74...](https://repositories.lib.utexas.edu/bitstream/handle/2152/74439/DENEND-
THESIS-2018.pdf)

~~~
plafl
Well, thank you. Actually it's possible to follow even for someone without CS
education like me. I have skimmed over it and actually it seems that although
they are confident that the string rewriting system is equivalent to the
conjecture it has not been proven yet. Anyway it's very interesting, I will
try to read it in depth.

------
emerged
One interesting way to look at this is as a bit twiddling puzzle. The "N /= 2
if even" step is removing all the rightmost 0s in the binary representation.
The remaining bits on the left have "(N << 1) + N + 1" applied. Wonder if the
behavior of those remaining bits can be broken down into a finite set of
conditions and be shown to eventually yield a power of 2.

~~~
acqq
Yes in pseudo C-like binary-oriented notation the step is:

if ( lowest bit of x is 0 ) x >>= 1 else x += ( x << 1 ) + 1

And it's immediately obvious that the else branch always produces an even
number.

~~~
eigenket
Yes, this is quite well known. See (e.g.) the third paragraph on Terrence
Tao's blog here

[https://terrytao.wordpress.com/2011/08/25/the-collatz-
conjec...](https://terrytao.wordpress.com/2011/08/25/the-collatz-conjecture-
littlewood-offord-theory-and-powers-of-2-and-3/)

For what its worth Tao is possibly the only person in the world I wouldn't be
shocked to hear of making progress on the Collatz conjecture. He actually
proved a pretty nice result on it recently

[https://arxiv.org/abs/1909.03562](https://arxiv.org/abs/1909.03562)

but the technology employed doesn't seem strong enough to go beyond "almost
all" statements.

~~~
acqq
> Yes, this is quite well known.

Sure, thanks for that Terence Tao links! I just wanted to confirm the
efficiency of C notation to "see" what happens with the bits at the lowest
level in this case, at least to those used to C. Now thinking about it,
literal C would be even more concise:

if ( x & 1 ) x >>= 1 else x += ( x << 1 ) + 1

~~~
zvr
You have the then/else parts reversed -- and missing semicolons.

~~~
acqq
Yes, you‘re right, thanks.

------
praptak
I'm wondering if the matrix method is powerful enough for this particular
problem.

What do we know about the class of terminating rewriting systems that are
solvable by translation to matrixes of size n? Is there a known terminating
system that does not have a matrix solution? Or maybe at least a proof that
such a system exists?

~~~
auggierose
I am also wondering about that. I guess it is just one way to prove
termination, it might be the case that this approach does not work for the
Collatz conjecture.

~~~
praptak
There definitely exist rewriting systems where no size of a matrix works.
String rewriting is in general undecidable, so matrices, being enumerable,
can't prove every system.

------
ginko
A while ago I played around with the Collatz conjecture a bit myself. I guess
this is all well-known but maybe some people find it interesting:

One thing I noticed was that the seemingly chaotic directed graph can be
ordered if you arrange the integers in a two dimensional grid where the x axis
is the uneven numbers and each row doubles the previous one. So like:

    
    
        1   3   5   7   9 ...
        2   6  10  14  18
        4  12  20  28  36 
       ..
    

It's clear to see that if n ≡ 0 (mod 2) we'll be on some row other than the
first so we'd just move all the way to the top. For integers on the first row
there's some interesting "orbits" forming[1].

You can categorize them by which 2^n row the 3n+1 rule will jump to and each
of those will attract to some specific position the 2^1 and 2^2 ones seem to
be the only ones with an integer center point (at 1 and -1 respectively, so
that's where you have cycles). Another interesting pattern I've noticed (not
really shown) is that "combined" jumps like "first a jump into the 2^1 row
followed by a jump into the 2^2 row" also follow these fixed intervals.

[1]
[https://raw.githubusercontent.com/gist/ginkgo/7120618db058d6...](https://raw.githubusercontent.com/gist/ginkgo/7120618db058d6280d7bf9ea0b8db4e1/raw/27bba3b9ba409375ce1b7819849762e29647ae1e/collatz_grid.svg)

------
kkylin
Another relatively recent article on this topic:

[https://www.quantamagazine.org/mathematician-terence-tao-
and...](https://www.quantamagazine.org/mathematician-terence-tao-and-the-
collatz-conjecture-20191211/)

HN discussion at the time:
[https://news.ycombinator.com/item?id=21780068](https://news.ycombinator.com/item?id=21780068)

~~~
kkylin
Forgot that there's an xkcd, too:

[https://xkcd.com/710/](https://xkcd.com/710/)

------
brundolf
I'm curious, can anyone shed light on the particular significance of this
problem?

I know that many mathematical problems are more about "charting the terrain"
and don't have a particular use until long after they're discovered. But this
one seems especially arbitrary; almost like a brain-teaser. And given the
funding involved, I have to wonder if there's some usecase that's already
known- even if that usecase is just for other high-level math.

Edit: I found this [https://math.stackexchange.com/questions/2694/what-is-the-
im...](https://math.stackexchange.com/questions/2694/what-is-the-importance-
of-the-collatz-conjecture/10608#10608)

Sounds like it has something to do with the predictability of primes, which
has obvious importance

~~~
brundolf
For fun I went ahead and wrote a little javascript to calculate the sequence.
I realized that a lot of work would end up repeated as soon as you encountered
an earlier number again (it's directed-graph traversal, really), so it records
the ones that it's solved and bails out when it finds them again (denoted by
the ->). You can paste the following into your browser console to get a feel
for what it looks like.

    
    
        let memo = {}
    
        function conjecture(n) {
            let str = "";
    
            while (n !== 1) {
                str += n + " ";
    
                if (memo[n] != null) {
                    str += "->";
                    return str;
                } else {
                    if (n % 2 === 0) n = memo[n] = n / 2;
                    else n = memo[n] = n * 3 + 1;
                }
            }
    
            str += n + " ";
    
            return str;
        }
        function rangeTo(end) {
            return new Array(end).fill(null).map((_, i) => i + 1)
        }
    
        for (const n of rangeTo(1000)) {
            console.log(conjecture(n))
        }
    

A neat thing is that this terminates (at 1) for _seemingly_ every number you
try (I disabled console-logs and the process terminated for every number up to
a range of 10,000,000, which is as high as I tested). It's just the formal
proof that missing. There also seems to be a vague pattern to the results, but
that may just be cloud-pictures.

~~~
vecter
> It's just the formal proof that missing.

That's the only thing that actually matters. You've demonstrated something
analogous to the following: "Claim: there are no numbers larger than
100,000,000,000,000,000." You've then gone and checked all the numbers from 1
to 10 million, concluded that it's true, and then just say that we're missing
a formal proof. I don't mean to be rude, but from an actual mathematical point
of view, you've basically demonstrated nothing.

10 million is mindboggling tiny when it comes to all the numbers. Consider
this counterexample to Polya's conjecture:
[https://www.youtube.com/watch?v=eQCUPQdi6DY](https://www.youtube.com/watch?v=eQCUPQdi6DY)

Or so many other examples:
[https://math.stackexchange.com/questions/514/conjectures-
tha...](https://math.stackexchange.com/questions/514/conjectures-that-have-
been-disproved-with-extremely-large-counterexamples)

~~~
throwaway357920
>Claim: there are no numbers larger than 100,000,000,000,000,000.

[https://en.wikipedia.org/wiki/Ultrafinitism](https://en.wikipedia.org/wiki/Ultrafinitism)

------
bakgatviooldoos
Would it be at all useful to be able to state the rule for calculating the
coefficients (in base-3) from one odd number to the next in the Collatz
conjecture's evolution? That is, given an odd number's base-3 expansion, you
could calculate the next odd number in the sequence from its coefficients.

I've done some work on this and have an idea of this rule but haven't been
able to find anyone that is knowledgeable enough to comment on it.

~~~
bakgatviooldoos
To clarify my question above, there seems to be a general rule for calculating
the next step in any Collatz-like iterated sequence from one odd number to the
next, given the parameters (c, D) where both c and D are positive odd numbers
and c > D, using the coefficients of each step's odd number, expanded in
base-c. That is to say, 3N + 1 becomes cN + D.

The expansion's number of coefficients increases by 1 at each step until the
leading coefficient becomes 0, and then continues. Although, it must be noted
that the leading coefficient acts as a "pilot value" of sorts seeing that it
is greater than c for most of the steps, given that each of the rest of the
coefficients, call them s, are typical in that 0 ≤ s < c.

------
gautamcgoel
I recall Terence Tao made some recent progress on Collatz, I figured it might
be of interest to the HN crowd:

[https://terrytao.wordpress.com/2019/09/10/almost-all-
collatz...](https://terrytao.wordpress.com/2019/09/10/almost-all-collatz-
orbits-attain-almost-bounded-values/)

------
axilmar
Well, since 1 is added to a number, the number will eventually reach a power
of 2, even if the number is divided by 2 in between.

Once it reaches a power of 2, it can only become odd when it reaches 1, so
there you have it.

~~~
eigenket
This reasoning is faulty since the same conjecture if you replace 3n+1 with
5n+1 turns out to be false. Interestingly the problem with a general pair of
constants is undecidable.

