Reconstructing the results of a 4-team soccer tournament

4 teams play in a "round-robin" soccer tournament, in which each team plays each other team once.

Each game has 3 possible outcomes: team 1 wins, draw, or team 2 wins. The winning team receives 3 points, while the losing team receives 0 points. In case of a draw, both teams receive 1 point.

There was at least one goal scored in each game. At the end of the tournament the leaderboard looks like so:

Team GoalsScored GoalsConceeded Points
A    4           2              7
B    5           3              6
C    4           6              2
D    6           8              1


Can you find the exact outcome, with goals scored by each side, for every match played?

• Now that I've gone through the entire solution, I came back to post it and found your very important edit. :) May 24, 2020 at 4:31
• Sorry mate. I didn't realise that it wasn't unique until Daniel pointed it out below, so I had to change it. May 24, 2020 at 4:37
• You need "at least one goal scored in each game" instead of the constraint you added. By @DanielMathias May 24, 2020 at 5:11
• Agree. I fixed it. Again. May 24, 2020 at 7:23
• I think "at least one goal was scored in the game between A and C" is a strong enough constraint: see my answer. May 25, 2020 at 3:16

The first thing to notice is that since each team played 3 games,

the only way to get 7 points is 2 wins and 1 draw, the only way to get 6 points is 2 wins and 1 loss, the only way to get 2 points is 2 draws and 1 loss, and the only way to get 1 point is 1 draw and 2 losses

So we have

A: 2 wins 1 draw
B: 2 wins 1 loss
C: 2 draws 1 loss
D: 1 draw 2 losses

Since the only teams with wins are

A and B, each of them must have defeated D. B can't have lost to itself, so A must have defeated B, and B defeated C.

That leaves the draws:

A drew C, and C drew D.

Summary of win-loss-draw:

A def. B
A drew C
A def. D
B def. C
B def. D
C drew D

For the goals scored, notice that

D has 1 draw and 2 losses but a goal differential of only -2, so each of D's losses must be by 1 goal, to A and to B. A has 2 wins and 1 draw, but a goal differential of only +2, so each of A's wins must be by 1 goal, over B and over D. C has 2 draws and 1 loss, but a goal differential of -2, so C's loss must be by 2 goals, to B. So B defeated D by 1 goal, lost to A by 1 goal, and defeated C by 2 goals.

Then we know

D scored 6 goals, but the opponents of A and B together scored only 5, and at least 1 of B's opponents' goals was scored by A, so C-D must be at least 2-2, but no more than 4-4. A-B and A-D can be 1-0, 2-1, or 3-2 because A's opponents scored 2 total. B-D can be 1-0, 2-1, or 3-2. It can't be 4-3 because B's opponents scored a total of 3, and B lost 1 game. B-C can be 2-0, 3-1, or 4-2. C scored 4 goals, at least 2 of them against D, so A-C is 0-0, 1-1, or 2-2.

Looking at D's games,

we know C-D was 2-2, 3-3, or 4-4; A-D was 1-0, 2-1, or 3-2; and B-D was also 1-0, 2-1, or 3-2. Also, D's total goals scored was 6 and conceded was 8.

This gives the following possibilities:

    C-D  A-D  B-D
---  ---  ---
2-2  1-0  5-4  xxx
2-2  2-1  4-3  xxx
2-2  3-2  3-2
3-3  1-0  4-3  xxx
3-3  2-1  3-2
3-3  3-2  2-1
4-4  1-0  3-2
4-4  2-1  2-1
4-4  3-2  1-0


Considering the above combinations that are still possible, look at A's games

and consider A-B, which is 1-0, 2-1, or 3-2, but A's goal totals are only 4 scored and 2 conceded.

C-D  A-D  B-D  A-B
---  ---  ---  ---
2-2  3-2  3-2  1-0
3-3  2-1  3-2  1-0
3-3  2-1  3-2  2-1
3-3  3-2  2-1  1-0
4-4  1-0  3-2  1-0
4-4  1-0  3-2  2-1
4-4  1-0  3-2  3-2
4-4  2-1  2-1  1-0
4-4  2-1  2-1  2-1
4-4  3-2  1-0  1-0


Now consider B's games

recalling that B-C can be 2-0, 3-1, or 4-2, while B's goal totals are 5 scored and 3 conceded.

This gives the following possibilities:

C-D  A-D  B-D  A-B  B-C
---  ---  ---  ---  ---
2-2  3-2  3-2  1-0  2-0
3-3  2-1  3-2  1-0  2-0
3-3  2-1  3-2  2-1  xxx
3-3  3-2  2-1  1-0  3-1
4-4  1-0  3-2  1-0  2-0
4-4  1-0  3-2  2-1  xxx
4-4  1-0  3-2  3-2  xxx
4-4  2-1  2-1  1-0  3-2
4-4  2-1  2-1  2-1  2-0
4-4  3-2  1-0  1-0  4-2


This leaves for the last game and goal totals:

C-D  A-D  B-D  A-B  B-C  A-C  goals: A-x  B-x  C-x  D-x
---  ---  ---  ---  ---  ---         ---  ---  ---  ---
2-2  3-2  3-2  1-0  2-0  0-0         4-2  5-3  2-4  xxx
3-3  2-1  3-2  1-0  2-0  1-1         4-2  5-3  4-6  6-8 <==
3-3  3-2  2-1  1-0  3-1  0-0         4-2  5-3  4-6  6-8 <==
4-4  1-0  3-2  1-0  2-0  2-2         4-2  5-3  6-8  xxx
4-4  2-1  2-1  1-0  3-1  1-1         4-2  5-3  6-8  xxx
4-4  2-1  2-1  2-1  2-0  0-0         4-2  5-3  4-6  6-8 <==
4-4  3-2  1-0  1-0  4-2  0-0         4-2  5-3  6-8  xxx


So the final solution is

that there are three solutions.

    A    B    C    D
A   \   1-0  1-1  2-1
B  0-1   \   2-0  3-2
C  1-1  0-2   \   3-3
D  1-2  2-3  3-3   \
----------------------
A    B    C    D
A   \   1-0  0-0  3-2
B  0-1   \   3-1  2-1
C  0-0  1-3   \   3-3
D  2-3  1-2  3-3   \
----------------------
A    B    C    D
A   \   2-1  0-0  2-1
B  1-2   \   2-0  2-1
C  0-0  0-2   \   4-4
D  1-2  1-2  4-4   \


The restriction of no team scored more than 3 that was edited in late reduces this to one:

    A    B    C    D
A   \   1-0  1-1  2-1
B  0-1   \   2-0  3-2
C  1-1  0-2   \   3-3
D  1-2  2-3  3-3   \

• Apologies, I can't get code to work with spoiler tags. What's the secret? May 24, 2020 at 4:41
• Wow excellent work! I feel that even after my edit there are still two possibilities from your three possible... May 24, 2020 at 4:45
• Use <pre> tags. Click 'edit' on my answer to see source. May 24, 2020 at 4:58
• @Dmitry Yes, there are still two solutions. You need "at least one goal scored in each game" instead of the constraint you added. May 24, 2020 at 5:04

First, we note that team C and team D did not win any matches. Team C lost once and draw twice, while team D lost twice and draw once. Also as each team played $$3$$ matches, we can conclude the following:

        Wins  Loses  Draws
Team A  2     0      1
Team B  2     1      0
Team C  0     1      2
Team D  0     2      1


Next,

So as Team B did not draw, and Team A did not lose, so Team A won when competing against Team B.
Therefore Team B won when competing against Team C and Team D.
This means Team C drew when competing against Team A and Team D.
So Team A won against Team D.

       Team A  Team B  Team C  Team D
Team A ------  Win     Draw    Win
Team B Lose    ------  Win     Win
Team C Draw    Lose    ------  Draw
Team D Lose    Lose    Draw    ------


Ok, let us look at the scores.

For convenience, we define the function $$f(X,Y)$$ be the number of goals scored by Team X minus the number of goals conceded during the match with Team Y.
We know that $$f(X,Y)=-f(Y,X)$$
As Team D lost twice, $$f(D,A)=f(D,B)=-1$$ and $$f(D,C)=0$$
Also we know that $$f(C,B)=4-6=-2$$
So $$f(B,A)=2-2-1=-1$$ Draws implies the value of the function be zero.

The following is the number of net goals against each team.

       Team A  Team B  Team C  Team D
Team A ------  1       0       1
Team B -1      ------  2       1
Team C 0       -2      ------  0
Team D -1      -1      0       ------


So we can use trial and error and get the following solution:

       Team A  Team B  Team C  Team D
Team A ------  1-0     1-1     2-1
Team B 0-1     ------  2-0     3-2
Team C 1-1     0-2     ------  3-3
Team D 1-2     2-3     3-3     ------


• @DanielMathias I have edited it! Is this correct? May 24, 2020 at 4:26

Solution is not unique:

 A 2-1 B  ||  A 1-0 B
A 0-0 C  ||  A 1-1 C
A 2-1 D  ||  A 2-1 D
B 2-0 C  ||  B 2-0 C
B 2-1 D  ||  B 3-2 D
C 4-4 D  ||  C 3-3 D

• Great job and thank you for noticing this! I will fix it now. May 24, 2020 at 3:57

Here's an answer that uses a tiny amount of algebra to get there a bit more quickly. I also think it's enough just to know that the game between A and C had at least one goal (rather than all games having at least one goal).

As other answers have noted from the points for each team:

A lost no games.
B drew no games.
C drew 2 games and lost the other.
From the last two, we know C drew with A and D, and lost to B.

Denote by $$XY$$ the total number of goals scored in the game between $$X$$ and $$Y$$.

Considering the total number of goals in the games for each team, we have $$AB+AC+AD = 6$$ $$AB+BC+BD = 8$$ $$AC+BC+CD = 10$$ $$AD+BD+CD = 14$$ Note that taking the sum of any two of these, and subtracting the sum of the other two, gives the difference in the number of goals scored between two games. It seems intuitive that the most extreme comparison would be the most informative: $$(AC+BC+CD)+(AD+BD+CD)-(AB+AC+AD)-(AB+BC+BD)=10+14-6-8$$ $$CD-AB=5$$

This means at least

five goals were scored in the game between C and D, and since it was a draw, C scored at least 3 goals in that game.

On the other hand,

since the game between A and C had at least one goal, and it was a draw, C scored at least one goal in the game with A.
Since C scored a total of four goals, the game between C and D must have ended 3-3, and the game between A and C 1-1.
Also, since the game between C and D finished 3-3, $$CD=6$$, and so from the above $$AB=1$$, i.e. the game between A and B finished 1-0.
Since A lost no games, A beat B 1-0.

Note that once you know the score in two games from any one team, it's straightforward to find the score in their third game. We know:

A 1-0 B
A 1-1 C
Since A scored a total of 4 goals and conceded 2, we must also have
A 2-1 D

Similarly, we know

A 1-1 C
C 3-3 D
Since C scored 4 and conceded 6, we have
B 2-0 C

There's only one game remaining:

B vs D
which we can get in a couple of ways, e.g.
A 1-0 B
B 2-0 C
Since B scored 5 and conceded 3, we must have
B 3-2 D