[Tutor] Creating lists with definite (n) items without repetitions

Steven D'Aprano steve at pearwood.info
Mon Sep 7 04:40:14 CEST 2015


Hello Marcus,

On Fri, Sep 04, 2015 at 04:28:10PM +0200, marcus lütolf wrote:

[...]
> I should probably tell you the real task are a series (maximum ~ 301) 
> lists in which real names of people are assigned to the items/letters 
> for 2 people(golfers) can be in the same list(flight) only once for an 
> extended period of time. The next step would be to assign compatible 
> and noncompatible attributes to the items/letters which will reduce 
> the maximum of possible lists(flights)

Sorry, that description doesn't help me understand your problem.

Perhaps you could show how to generate the pairs you want given (say) a 
small list of names. Let us call them A, B, C, D and E (five people), 
taken three at a time?

(1) Can you write out all the possible lists for n=3 (the maximum)?

Assuming order does not matter, I get ten lists:

A B C
A B D
A B E
A C D
A C E
A D E
B C D
B C E
B D E
C D E


(2) Can you show what you mean by "compatible and noncompatible 
attributes", and use them to "reduce the maximum of possible lists"? How 
do you decide which of the ten above are allowed and which are not?


-- 
Steve


More information about the Tutor mailing list