News for hackers. Stuff that matters.
Re:Computer scientists attempt to corner the Collatz conjecture by brundolf on Thursday August 27, 2020 @12:42AM (#24290179)
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...

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

Re:Computer scientists attempt to corner the Collatz conjecture by lacker on Friday August 28, 2020 @12:31AM (#24301375)
Now that Fermat's Last Theorem has been proven, the Collatz conjecture is the simplest unsolved math problem. That is what makes it special. There are other unsolved problems that are at the heart of some rich field of mathematics and would be more mathematically significant to solve, like the Riemann hypothesis.
Re:Computer scientists attempt to corner the Collatz conjecture by brundolf on Thursday August 27, 2020 @04:05PM (#24298022)
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.
Re:Computer scientists attempt to corner the Collatz conjecture by schoen on Friday August 28, 2020 @12:48AM (#24301453)
> the process terminated for every number up to a range of 10,000,000, which is as high as I tested

Other people have taken this experiment a bit further already:

https://en.wikipedia.org/wiki/Collatz_conjecture#Experimenta...

> As of 2020, the conjecture has been checked by computer for all starting values up to 2⁶⁸.

Re:Computer scientists attempt to corner the Collatz conjecture by vecter on Friday August 28, 2020 @04:06AM (#24302478)
> 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

Or so many other examples: https://math.stackexchange.com/questions/514/conjectures-tha...

Re:Computer scientists attempt to corner the Collatz conjecture by throwaway357920 on Friday August 28, 2020 @10:16AM (#24305098)
>Claim: there are no numbers larger than 100,000,000,000,000,000.

https://en.wikipedia.org/wiki/Ultrafinitism

Re:Computer scientists attempt to corner the Collatz conjecture by brundolf on Friday August 28, 2020 @10:40AM (#24305406)
> I don't mean to be rude

Well that's how it comes off. Obviously I didn't think I'd made some breakthrough in five minutes with some JavaScript, and obviously I know that the formal proof is the important thing. I was just poking at the phenomenon and expressing my curiosity. There's no need to be so eager to jump in and shut that down.

Re:Computer scientists attempt to corner the Collatz conjecture by thomasahle on Friday August 28, 2020 @03:30AM (#24302289)
> 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.

As well as the rest of the numbers between ten million and infinity.

And I suppose, an understanding of why.

Re:Computer scientists attempt to corner the Collatz conjecture by smabie on Friday August 28, 2020 @12:44AM (#24301441)
A recursive memorized solution would be more elegant. Or even a mutually recursive solution.
Re:Computer scientists attempt to corner the Collatz conjecture by brundolf on Friday August 28, 2020 @11:01AM (#24305695)
It would also be significantly slower and potentially limited by stack depth. Even with the memoization some of these sequences get pretty long.
Re:Computer scientists attempt to corner the Collatz conjecture by smabie on Friday August 28, 2020 @05:18PM (#24310080)
I mean, a tail recursive solution wouldn't be.
Re:Computer scientists attempt to corner the Collatz conjecture by rowanG077 on Thursday August 27, 2020 @05:42PM (#24299020)
Just to let you know the memoization technique you used is called dynamic programming.
Re:Computer scientists attempt to corner the Collatz conjecture by nickysielicki on Friday August 28, 2020 @02:08AM (#24301831)
"Dynamic programming" is such a dumb name for what it is and I hope that we can all eventually stop calling it that.
Re:Computer scientists attempt to corner the Collatz conjecture by waterhouse on Friday August 28, 2020 @02:47AM (#24302025)
Emphatically agreed. For those not aware, the person who chose the name (for what were originally called "multistage decision processes", which is far more descriptive) says he chose "dynamic" in significant part because it sounded impressive to a hard-nosed boss:

"... It also has a very interesting property as an adjective, and that is it's impossible to use the word dynamic in a pejorative sense. Try thinking of some combination that will possibly give it a pejorative meaning. It's impossible. Thus, I thought dynamic programming was a good name. It was something not even a Congressman could object to. So I used it as an umbrella for my activities." https://en.wikipedia.org/wiki/Dynamic_programming#History

Also, by the way, to the extent that "dynamic programming" has a definition (the words have little to do with what it means, so it's hard to fix the term to a specific definition), it generally refers to a superset of memoization. So memoization is the more specific term, and should be preferred.

I think we may be able to help kill usage of the term by observing that its initialization, DP, which some people are fond of using, has a much more graphic alternate meaning. Then modern puritanism may make people reluctant to say it anymore.

Re:Computer scientists attempt to corner the Collatz conjecture by WORLD_ENDS_SOON on Friday August 28, 2020 @02:42AM (#24301998)
The history behind the term is pretty interesting to me: https://en.wikipedia.org/wiki/Dynamic_programming#History The original research on the subject was published in engineering / optimization as opposed to computer science, and the term "programming" was used differently there ("linear programming" and "quadratic programming" for example). Now we think of it not as an optimization problem but as an algorithm design technique, but the name still stuck around.
Re:Computer scientists attempt to corner the Collatz conjecture by brundolf on Thursday August 27, 2020 @07:52PM (#24300007)
I'm aware, I was just commenting on it as an interesting trait of the problem. There might be an n+1 aspect, where if you can prove that each sequence will eventually reach some previous number that reduces to 1 then that higher one will too
Re:Computer scientists attempt to corner the Collatz conjecture by graycat on Friday August 28, 2020 @01:03AM (#24301516)
Yup, for the past two days, for the first time I thought about the problem!

Yup, quickly it gets to the role of prime numbers or a product of primes and some number of factors of 2.

Heck, obviously can draw a directed graph with an arc from each odd number, that is, a product of primes except 2, and the result of the 3X + 1 operation. Then have an arc from each even number to that number with one less factor of 2.

Then if could argue that given a number n, the nodes in the graph that can be reached from n are finite and if we don't enter cycles without a 1, then we are done!

Alas, as one might expect from all the effort on this problem, a gap here is the argument of finiteness, and that quickly gets to how many primes there are or are not! And as we know, where all the primes are is a tough problem.

Long ago in math, I decided not to spend effort on big questions about prime numbers!

So, I gave up, decided to use easier problems to think about when going to sleep!

Re:Computer scientists attempt to corner the Collatz conjecture by 7373737373 on Friday August 28, 2020 @03:02AM (#24302123)
I wonder what https://en.m.wikipedia.org/wiki/Spectral_graph_theory can tell about this graph
Re:Computer scientists attempt to corner the Collatz conjecture by bananabiscuit on Thursday August 27, 2020 @02:40PM (#24297059)
The collate conjecture gets a pass from me because I think there’s an even more funded problem that is even more useless: calculating pi to more and more digits. I doubt any practical application needs more than 10 digits.
Re:Computer scientists attempt to corner the Collatz conjecture by heavenlyblue on Friday August 28, 2020 @01:34AM (#24301662)
It’s proven that Pi is transcendent, while it isn’t proven Collatz always finishes
Re:Computer scientists attempt to corner the Collatz conjecture by DreadY2K on Friday August 28, 2020 @12:43AM (#24301439)
But what if I want to show off to my friends how smart I am by rattling off a gazillion digits of pi off of the top of my head? I need more than 10 digits to do that...

/s