[Tutor] Creating lists with definite (n) items without repetitions
Mark Lawrence
breamoreboy at yahoo.co.uk
Sun Sep 6 00:28:49 CEST 2015
On 05/09/2015 10:09, Peter Otten wrote:
> marcus lütolf wrote:
>
>> Hello Peter, hello Martin,
>> many thanks for your very quick response !!!
>>
>> As for Peter's advice:
>>
>> the 5 lists above do not match my task insofar as every of the 5 lists
>> contains 'a' and 'b' which should occur only once, hence my count of a
>> maximum of 301 lists, which might nor be correct 100%. My be one could put
>> it in Python as follows:
>>> ('a', 'b', 'c') = True
>>> ('a', 'b', 'd')= False
>>> ('a', 'b', 'e')= False
>>> ('a', 'b', 'f')= False
>>> ('a', 'b', 'g')= False
So for completeness it follows that:-
('a', 'c', 'd') == False
('b', 'c', 'd') == False
yes?
>> 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.
>
> It's probably a good idea to ask your question in a mathematics forum --
> this problem looks common enough to have a name and some brain power spent
> on it.
>
To me this is clearly an example of a Steiner Triple system
associated with Balanced Incomplete Block Design. Which means I found
this http://mathforum.org/library/drmath/view/52263.html which got me to
https://en.wikipedia.org/wiki/Steiner_system and also
http://oeis.org/A137348/a137348.txt. Just one minor little question, am
I actually correct?
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
More information about the Tutor
mailing list