Re: need help on divide and conquer algo



urvi said:

> below is the task for me to solve.. can anybody help me?

I can help you with the general case. I don't quite see how a power of 2
leads to any significant improvement. Perhaps others here will enlighten us
both.

>
> You are to organize a tournament involving n teams. Each team must play
> each possible opponent exactly once. Moreover, each team must play
> exactly one game per day.

We note, then, that n must be even (otherwise, the constraint makes the
assignment impossible).

Let the syntax

ABCDE
FGHIJ

mean that A plays F, B plays G, C plays H, etc.

Let's take an example with, say, n = 12.

ABCDEF
GHIJKL

gives you the first round. To get the second round, make a hole by removing
G:

ABCDEF
HIJKL

Move A down into the hole, leaving its previous space as a hole instead:

BCDEF
AHIJKL

Slide the top row across:

BCDEF
AHIJKL

leaving the hole at the end of the top row. Lift L into that hole:

BCDEFL
AHIJK

Slide the bottom row across:

BCDEFL
AHIJK

Replace G:

BCDEFL
GAHIJK

This gives you the next round. Iterate. After 11 goes, you're back where you
started.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/2005
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
.



Relevant Pages

  • RSG Cincinnati Host Recap
    ... Mark Koenig for being the semi-official scorekeeper. ... Thor, Bret Douglas, and Mark Koenig for being the Rules Committee. ... The highlight of the round, though, was busting ... preparations) and I ended up DQing myself on hole #9 after not going ...
    (rec.sport.golf)
  • Re: Trade I have been offered.
    ... this got me curious...i took a brief look at his scoring plays & most ... but overall i expect the touches between taylor & ... is probably picking last in the 2nd round in most leagues. ...
    (rec.sport.football.fantasy)
  • Re: Survey: Do You Leave a Toolholder in the Spindle Overnight?
    ... If you need to hold center point location, and/or if the hole has to "round" ... The outer race will deform and bust the bearing in a ... > point boring compared to interpolating or plunging; ...
    (alt.machines.cnc)
  • Re: A Dennis Kucinich Round of Golf
    ... the round when exiting the 18th hole, ... said "if that is what that round of golf was, then you got the crappy score ... A Princess Diana – shouldn’t have taken the driver ... A Britney Spears - I don't care how you hit it, that ball is OB ...
    (rec.sport.golf)
  • Re: Rules situations are RSG Cincinnati
    ...  15 Clubs found in bag. ... put his 8-iron into Bill's bag during the previous round. ... score for Hole #1, taking him from double Bogey to Quad ... We addressed the penalty by adding two strokes to the score on hole ...
    (rec.sport.golf)