Path: csiph.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: Suggested method for returning a string from a C program? Date: Fri, 21 Mar 2025 00:05:02 -0700 Organization: A noiseless patient Spider Lines: 38 Message-ID: <86bjtun9sx.fsf@linuxsc.com> References: <20250319123647.000035ed@yahoo.com> <86msdfoq3b.fsf@linuxsc.com> <87zfhfsedy.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Fri, 21 Mar 2025 08:05:03 +0100 (CET) Injection-Info: dont-email.me; posting-host="9bc70e960ad448c1d41587328c2ae099"; logging-data="1068691"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX193sF9yMF1hAHEWkj7gEcNRDGS0J8Nrj5o=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:GsBjtp5U0S/BpCGr/gy0h4bF8NI= sha1:EVdodtiHASH4A2vL2zMKiY0GCm0= Xref: csiph.com comp.lang.c:391466 Keith Thompson writes: > Tim Rentsch writes: > >> Michael S writes: >> >>> On Tue, 18 Mar 2025 21:38:55 -0400 >>> DFS wrote: >>> >>>> I'm doing these algorithm problems at >>>> https://cses.fi/problemset/list/ >>>> >>>> For instance: Weird Algorithm >>>> https://cses.fi/problemset/task/1068 >>> >>> It is not an interesting programming exercise. But it looks to me >>> as a challenging math exercise. I mean, how could we give a not >>> too pessimistic estimate for upper bound of length of the sequence >>> that starts at given n without running a full sequence? Or >>> estimate for maximal value in the sequence? So far, I found no >>> answers. >> >> You may console yourself with the knowledge that no one else >> has either, even some of the most brilliant mathematicians >> of the last hundred years. In fact it isn't even known that >> all starting points eventually terminate; as far as what has >> been proven goes, some starting points might just keep going >> up forever. > > I think someone has mentioned that this is called the Collatz > Conjecture. According to Wikipedia, it's been shown to hold for > all positive integers up to 2.95e20 (which is just under 2**68). Yes it is sometimes called the Collatz Conjecture, and sometimes called the 3n+1 problem, and also is known by several other names. I first heard the problem in the early 1980s (at that time it was known as the (3n+1)/2 problem), and worked on it on and off for ten years or so. I would be astonished if anyone disproved it.