# Reconstructing the results of a 6-team soccer tournament

6 teams played in a "round-robin" soccer tournament, in which each team played each other team once. Each game had 3 possible outcomes: team 1 won, draw, or team 2 won. The winning team received 3 points, while the losing team received 0 points. In case of a draw, both teams received 1 point. At the end of the tournament each team obtained a different number of points and that number was prime. The team that came last drew with the team that came second. Based on this information, can you reconstruct the result of each game? A solution exists and it is unique.

Bonus question: what happens if we remove the sentence about the last team? Do more solutions appear and can you find them?

Here is a similar question: Reconstructing the results of a 5-team soccer tournament

Good luck!

First:

A game yields a total of 3 points if decisive and 2 points if drawn. In a 6-team round-robin tournament there are 15 games in all, so a total of between 30 and 45 points -- except that we know there was at least one draw, so between 30 and 44 points inclusive.

Now:

The total, whatever it is, has to be the sum of 6 distinct prime numbers. The sum of the first six primes is 2+3+5+7+11+13 = 41 and the next-smallest possible sum comes from taking 17 instead of 13, which would yield 45 which as already remarked is too big. So the teams' scores are 2,3,5,7,11,13. In what follows, I'll name the teams after their scores.

Next:

Team 2 clearly drew two games and lost all their others. "The team that came last drew with the team that came second", so Team 2 drew with Team 11 and one other. I claim that the other team they drew with was either Team 3 or Team 5, because otherwise Team 3 got all their 3 points from beating Team 2 and therefore lost to Team 5, and if Team 5 beat both Team 2 and Team 3 then they got too many points. At the other end of the final results table, Team 13 clearly drew one game and won all their others; we know Team 11 drew one game (with Team 2), so they got 10 points from their other 4 games, which can only be 3331. (Four wins would be 12 points which is too many; two would be at most 8 points which is too few.) So 11,13 both went undefeated, and therefore drew when they played one another.

Now

let's return to the other teams. We know that 7 lost to 11 and 13 (because we've found that 13 drew with 11 and won everything else, and 11 drew with 2,11 and won everything else). So from their games against 2,3,5 they got 7 points, which can only be two wins and a draw. We know that 5 lost to 11 and 13, so from their games against 2,3,7 they got 5 points, which can only be one win and two draws. Neither of these teams can have lost to the other, therefore; so they drew; so against 2,3 we now know that 7 got two wins and 5 got one win and one draw.

We're nearly there. Let's draw up a table. Entries are scores for the team on the left when they played against the team on the top.

.. .2 .3 .5 .7 11 13
.2 -- ?? ??  0  1  0   blanks are 0,1 in some order
.3 ?? -- ??  0  0  0   blanks are 0,3 in some order
.5 ?? ?? --  1  0  0   blanks are 1,3 in some order
.7  3  3  1 --  0  0
11  1  3  3  3 --  1
13  3  3  3  3  1 --

And

2 against 3 can't be a draw because 3 has no draws; 2 can't win because 2 has no wins. So 3 beats 2 and therefore loses to 5; therefore 5 draws with 2.

So we're done, and here is the final table which you can readily check has all the required properties:

.. .2 .3 .5 .7 11 13
.2 --  0  1  0  1  0
.3  3 --  0  0  0  0
.5  1  3 --  1  0  0
.7  3  3  1 --  0  0
11  1  3  3  3 --  1
13  3  3  3  3  1 --

• Wow that was way too fast! Well done. Now what happens if I remove the sentence "The team that came last drew with the team that came second"? Is it still uniquely solvable or does it lead to another possibility? Commented Dec 16, 2019 at 2:04
• Yeah, I wondered briefly about that, but not enough to make me actually do the necessary calculations :-). My expectation is that there is at least one other possibility; I wouldn't be surprised by two but would be a little surprised by three. Commented Dec 16, 2019 at 2:09
• @GarethMcCaughan I think you are right about there only being 2 possibilities, and it is based on who the first, fourth and last teams must beat or draw with. Commented Dec 16, 2019 at 11:34
• Step 1+2 can be concluded even easier, knowing that scores must be unique and there are only 6 primes between 0 and 15 (theoretical min and max score per team) Commented Dec 16, 2019 at 13:13
• Yes, I realised this after doing it the slightly harder way :-) but preferred to leave my reasoning as it was since that's the way I actually did it. Commented Dec 16, 2019 at 13:14

An undefeated team would have scored a total of 15 points. Since all point totals were unique prime numbers, the final standings must have been:

 A 13 (4-0-1)
B 11 (3-0-2)
C  7 (2-2-1)
D  5 (1-2-2)
E  3 (1-4-0)
F  2 (0-3-2)

The results of each game can be determined thusly:

Neither A nor B had a loss, so the result of their game was a draw and A defeated each of the other four teams. Given that B's other draw was with F, B defeated C, D and E. D's two draws must have been with C and F. The other decisive games saw C defeating E and F, D defeating E, and E defeating F.

In summary:

A draw B, def C, D, E, F
B def C, D, E, draw F
C draw D, def E, F
D def E, draw F
E def F

• How do you know that E had 1 win, instead of 3 draws in the first table? Commented Dec 16, 2019 at 2:43
• @Dmitry 41 total points requires 11 decisive games and 4 drawn games: 11*3+4*2=41 Commented Dec 16, 2019 at 4:46

So, the main question has already been answered, but I will go for the bonus question

We know that the scores are 2, 3, 5, 7, 11 and 13, totaling 41. We know that with 15 games played, we need 11 decisive games and 4 draws (11*3 + 4*2 = 41, this detail comes from Daniel Mathias' comment on his own answer)

More:

We have only 4 draws, so 8 draw candidates. This means 2 has 2 draws, 5 has 2 draws, 7 has 1, 11 has 2 and 13 has 1. We also know for sure that team 13 drew against team 11, since team 11 has no losses. We also know for sure that team 2 and 5 drew, as they both have two draws.

More:

In the wins department we need a bit more extra information. We know 3 had 1 win so 5 losses and 2 had no wins, so must be the win for 3. Therefore we also know 5 won against 3 (as well as all the other teams, but that is less relevant). This means 5 drew against 7 or 11 and lost against the other. The same goes for 2. This means that these are interchangeable.

Conclusion:

There are exactly two solutions if we do not have the sentence about the last team (2) losing against the second team (11)

It was shown by Gareth that

There is one unique solution given that the teams coming in place 2 and 6 draw their game

Here, I denote the teams as A through F, depending on their final position (A wins the competition)

Let's consider the situation where B and F explicitly DON'T draw.

Let's look at the total number of draws.
We know that the final scores for teams A-F are: 13,11,7,5,3,2 (the only unique primes between the minimum possible score 0, and the maximum 15).
This means that the total score of the competition is 41.
Since every Win/Lose (W/L) game result in a total score of 3 points in the competition, and every D/D results in 2, we must have:
4 drawing games.

We already know a few:
A plays 4W, 1D, 0L
B plays 3W, 2D, 0L
C plays either 2W,1D,2L or 1W,4D,0L
D plays 0W,5D,0L or 1W,2D,2L
E plays 0W,3D,2L or 1W,0D,4L
F plays 0W,2D,3L

But we know more:

Since B and F DO NOT draw, their draws must come from different games. This already adds up to 4 draws.
So, every drawing game must have either B or F playing, but not both.
We also know, that any other team can have at most 2 draws, because that can draw against B and F, but not any other team.
This means that the teams must play:
A plays 4W, 1D, 0L
B plays 3W, 2D, 0L
C plays 2W,1D,2L D plays 1W,2D,2L
E plays 1W,0D,4L
F plays 0W,2D,3L
So the drawing games are:
B versus A or C
B versus D
F versus A or C
F versus D

But wait, if A draws against F, it must then win against B. This is impossible because B does not lose. So the drawing games are:
B versus A
B versus D
F versus C
F versus D

We can now fill out the table

After filling out the draws, we know that all non-drawing games of A and B must win and E and F must lose.
After that we are only left with one empty field, (C-D). This must be won by C to reach the correct total point for both teams.

. A B C D E F | +
A x 1 3 3 3 3 | 13
B 1 x 3 1 3 3 | 11
C 0 0 x 3 3 1 | 7
D 0 1 0 x 3 1 | 5
E 0 0 0 0 x 3 | 3
F 0 0 1 1 0 x | 2

In summary,

There are no degrees of freedom after determingin the draws and filliong out the table.
So, when B and F DO NOT draw, there is one additional solution compared to when they DO draw.