[Tutor] problem solving with lists

Dennis Lee Bieber wlfraed at ix.netcom.com
Tue Mar 22 12:20:00 EDT 2022


On Tue, 22 Mar 2022 10:54:28 +1300, dn <PythonList at DancesWithMice.info>
declaimed the following:

>Another point-of-difference is that I perhaps (mis-)understood that the
>specs included a requirement that every player play every other player,
>at some stage during the league/tournament.
>

	That IS the desired result, but the based upon the research papers and
Wikipedia, the real SGP merely determines IF a schedule exists that meets

	All players play each week (no player plays twice in the week)
	Every possible pairing of players occurs zero or one time over the
specified number of weeks. (No pairing occurs two or more times)

Obviously, for short (less than maximal) weeks, there will be a lot of
"zero" pairings.


	Including an 18-line "docstring", and the output formatting logic, mine
run 84 LoC. WHOOPS... Correction (just realized I have a leftover unused
function from previous code): Now down to 68 LoC. The core computation
takes just 18 LoC.


-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
	wlfraed at ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/



More information about the Tutor mailing list