Sujet : Re: Suggested method for returning a string from a C program?
De : tr.17687 (at) *nospam* z991.linuxsc.com (Tim Rentsch)
Groupes : comp.lang.cDate : 19. Mar 2025, 21:13:45
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <86frj8pyme.fsf@linuxsc.com>
References : 1 2 3 4
User-Agent : Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Muttley@DastardlyHQ.org writes:
On Wed, 19 Mar 2025 09:03:33 -0400
DFS <nospam@dfs.com> wibbled:
>
On 3/19/2025 6:15 AM, bart wrote:
>
On 19/03/2025 01:38, DFS wrote:
>
I'm doing these algorithm problems at
https://cses.fi/problemset/list/
>
For instance: Weird Algorithm
https://cses.fi/problemset/task/1068
>
This is related to the Collatz Conjecture. What's weird is not
mentioning it.
>
I wouldn't have known it was a famous math conjecture, but no
doubt the author of the problem did.
>
Reading wikipedia it looks like one of those dull problems
mathematicians think up when they've got too much free time on
their hands.
The 3n+1 problem, as it is sometimes called, is interesting
because it is easy to state and easy to understand, even without
any mathematical training beyond grade school, and yet has
resisted the efforts of many of the best mathematicians in the
world to try to prove it. It seems like it should be easy, but
it is in fact incredibly difficult, based on almost 100 years of
experience.
If you try looking at it and see if you can make some sort of
dent in the problem you may find it more interesting than your
initial impression suggests.
Related problem: consider a class of analogous problems, where
instead of 3n+1 we use 3n+k, for k positive and odd. Question:
for which values of k does the 3n+k algorithm have multiple loops
rather than just one?
(I acknowledge the above posting to be off topic, and ask the
group for forgiveness for this transgression.)