Enumerating all 3-tuples (Posting On Python-List Prohibited)

Ben Bacarisse ben.usenet at bsb.me.uk
Thu Mar 15 07:20:30 EDT 2018


Lawrence D’Oliveiro <lawrencedo99 at gmail.com> writes:

> On Thursday, March 15, 2018 at 2:56:24 PM UTC+13, Ben Bacarisse wrote:
>>
>> Lawrence D’Oliveiro writes:
>> 
>>> On Wednesday, March 14, 2018 at 2:18:24 PM UTC+13, Ben Bacarisse wrote:
>>>
>>>> Lawrence D’Oliveiro writes:
>>>> 
>>>> The original problem -- triples of natural numbers -- is
>>>> not particularly hard, but the general problem -- enumerating n-tuples
>>>> of some sequence -- is more interesting because it is a bit harder.
>>>
>>> It’s not harder--it’s exactly the same difficulty. You iterate the
>>> naturals, then interpose a function mapping them onto the set that you
>>> really want to use.
>> 
>> Yes, I said exactly that a couple of messages ago.
>
> I see. So you said it is a bit harder, and you also said it’s not
> harder at all. Got it.

Yes, I was not clear.  It was the point about mapping from a solution
that uses the natural numbers that's I mentioned before.  The "bit
harder" comes from generalising to n-tuples.

(I get the feeling I should apologise for something because I think I
have annoyed or irritated you.  I'm sure I don't always get the right
tone but I really hope I've not been rude.  I'm sorry if I have been.)

-- 
Ben.



More information about the Python-list mailing list