mod@masscomp.ccur.com (2915) (10/24/90)
Given a list of the names of the players in a tournament (such as golf or chess) I'd like sources to a program which calculates the number of rounds required and the pairs of players scheduled to play during each round. CONDITIONS: - Every player must play every other player exactly once. - Every player must have an opponent during every round. A "phantom" player may be created in case there is an odd number of players, and the phantom is scheduled during every round just like any other player. Of course, the "real" player paired with the phantom during any particular round is actually idle during that round. The "real" player would probably win that round... So, if the program were called "roundRobin" and you had the names of the players in the file "playerList" you'd say something like: # cat playerList Moe Larry Curly Agnes Velma Gertrude # roundRobin <playerList ROUND 01: Curly plays Agnes Larry plays Velma Moe plays Gertrude ROUND 02: Larry plays Agnes Moe plays Velma Curly plays Gertrude ROUND 03: Larry plays Curly Moe plays Agnes Velma plays Gertrude ROUND 04: Moe plays Curly Agnes plays Velma Larry plays Gertrude ROUND 05: Moe plays Larry Curly plays Velma Agnes plays Gertrude If there is enough interest, I'll post results. Thanks, ---------------------------------------------------------------------------- Michael O'Donnell (508)392-2915 home(508)251-7576 fax(508)692-8307 ___________ / ________/__ ...!{harvard,uunet,petsd}!masscomp!mod /__/_______/ / mod@westford.ccur.com Concurrent /__________/ Computer Corporation 1 Technology Way Westford, MA 01886 DISCLAIMER: My opinions only coincidentally resemble those of my employer. ----------------------------------------------------------------------------