MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Ten chess-players...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99296] Re: [mg99269] Ten chess-players...
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Sat, 2 May 2009 05:58:12 -0400 (EDT)
  • References: <36a5dba2-11b9-45df-84c3-9e712e47fec9@q33g2000pra.googlegroups.com> <49F94E90.2090003@gmail.com> <200905010924.FAA01163@smc.vnet.net>
  • Reply-to: drmajorbob at bigfoot.com

Here's an online schedule generator:

http://www.teamopolis.com/tools/round-robin-generator.aspx

WikiPedia has an algorithm:

http://en.wikipedia.org/wiki/Round-robin_tournament

and here is (I think) an implementation:

Clear[schedule]
schedule[players_?EvenQ, round_] /; round < players :=
  Transpose@{Take[#, players/2], Reverse@Drop[#, players/2]} &@
   Flatten@{1, RotateRight[Range[2, players], round - 1]}

Bobby

On Fri, 01 May 2009 04:24:17 -0500, Dr. Bruno Campanini <cmpbrn at gmail.com>  
wrote:

> Given 10 (1 to 10) chess-players, in one day they play 5 games (1-2,
> 6-10, 5-7, 4-8, 3-9).
> Then they need 8 more days to complete the championship (one gamer
> must play one time against any other player):
> 1-3, 2-10, 6-7, 5-8, 4-9
> 1-4, 2-3, 7-10, 6-8, 5-9
> 1-5, 2-4, 3-10, 7-8, 6-9
> 1-6, 2-5, 3-4, 7-9, 8-10
> 1-7, 2-6, 3-5, 4-10, 8-9
> 1-8, 2-7, 3-6, 4-5, 9-10
> 1-9, 2-8, 3-7, 4-6, 5-10
> 1-10, 2-9, 3-8, 4-7, 5-6
>
> How can I get the 10*(10-1)/2 = 45 pairs distributed in the 9x5 matrix?
> What's about any other even number of players?
>
> I do know how to get the matrix with a simple Visual Basic routine
> (some 30 lines of code).
> I was wondering if there is a shorter Mathematica simple formula
> for the same job.
>
> Bruno
>



-- 
DrMajorBob at bigfoot.com


  • Prev by Date: Re: Differential Equation, pendulum, change of variable plot
  • Next by Date: Re: mathematica newbie trouble
  • Previous by thread: Re: Differential Equation, pendulum, change of variable plot
  • Next by thread: Re: Ten chess-players...