When is round-robin scheduling possible and with in minimal time? Suppose that you have six teams $x_0, x_1, x_2, x_3, x_4, x_5$. Can you schedule round-robin games between them so that if one game is played each day, the series of games can be completed in five weeks?

A naive attempt fails:

$$(x_0,x_1), (x_2, x_3), (x_4, x_5)$$
$$(x_0,x_2), (x_1, x_3) .. oops$$ 

Some care is needed to get this to work. A solution:

$$(x_0,x_3), (x_1, x_5), (x_2, x_4)$$
$$(x_1,x_4), (x_2, x_0), (x_3, x_5)$$
$$(x_2,x_5), (x_3, x_1), (x_4, x_6)$$
$$(x_0,x_1), (x_2, x_3), (x_4, x_5)$$
$$(x_0,x_5), (x_2, x_1), (x_4, x_3)$$

This solution certainly is not easy to generalize. Questions:


Is this in fact always possible for an even number of teams?
Is there a convenient algorithm for producing the schedule?
Can this problem be easily expressed in terms of graph theory, combinatorics, or abstract algebra?
Here's an easy way for $2n \geq 6$.

Construct the regular polygon with $2n$ vertices. Label the vertices $x_1$ to $x_{2n}$. Take any edge that is not of the form $x_i, x_{i+n}$. Consider all edges that are parallel to it, and label them as 1 day of games. Rotate around the polygon and you are done.



For odd number of teams $2n+1 \geq5 $, show that you need $2n+1$ days. Repeat the above construction, taking note that you miss out 1 team each day.



If you read Ross's answer, you will see that this expresses the same idea.
Let me explain the algorithm with 6 teams. You start

x1 vs x2

x3 vs x4

x5 vs x6

Then you keep x1 fixed and move the other teams (counter-)clockwise

x1 vs x4

x2 vs x6

x3 vs x5

and proceed doing this until every team has played against each other. For an odd number of teams you define x1 to be the bye.

x1 vs x6

x4 vs x5

x2 vs x3

then

x1 vs x5

x6 vs x3

x4 vs x2

and finally

x1 vs x3

x5 vs x2

x6 vs x4