Deutsch   English   Français   Italiano  
<86frj8pyme.fsf@linuxsc.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups: comp.lang.c
Subject: Re: Suggested method for returning a string from a C program?
Date: Wed, 19 Mar 2025 13:13:45 -0700
Organization: A noiseless patient Spider
Lines: 44
Message-ID: <86frj8pyme.fsf@linuxsc.com>
References: <vrd77d$3nvtf$2@dont-email.me> <vre5gt$jkpr$1@dont-email.me> <vrefb3$s307$1@dont-email.me> <vrel15$12jb7$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Wed, 19 Mar 2025 21:13:46 +0100 (CET)
Injection-Info: dont-email.me; posting-host="f38801bdea7b04066d3e2a5989bc7bcf";
	logging-data="1616995"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18vjc6qMVrzKWgf9QzGhrR9yZMO92phEPM="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:Phc1LbwB1g2b3V8pc5EWYaIwBW4=
	sha1:KVYfZOjncr/XOfozPUKvq5ZwAOU=
Bytes: 2677

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.)