# Reconstructing Euro results

In the group stage of this year's UEFA European Football Championship, teams compete within six groups of four teams each. Each group plays a round-robin tournament, in which each team plays three matches, one against each other team in the same group. This means that a total of six matches are played within a group. Points are used to rank the teams within a group; the top two teams advance further, as well as some of the third-place teams (not relevant to this question). Three points are awarded for a win, one for a draw, and none for a loss. The scoring table for a group also includes the total number of goals scored for and against a given team in its three matches. (There are also usually columns for wins, draws, losses, and goal difference.)

Play in UEFA Euro 2024 Group B took place from 15 to 24 June 2024. Spain won the group, and advanced to the second round, along with Italy. Croatia and Albania failed to advance. The final standings were as follows:

Team Goals for Goals against Points Qualification
Spain 5 0 9 Advance to knockout stage
Italy 3 3 4 Advance to knockout stage
Croatia 3 6 2 eliminated
Albania 3 5 1 eliminated

What were the scores of the six individual matches?

• The solution turns out to be unique even if you relax the clues to "at most" the given number of points per team. But if you instead relax to "at least" the given number of points, there are exactly two solutions. Commented Jun 26 at 20:14

First, let's figure out who won each match...

Spain has 9 points, so they won all 3 matches.
Italy has 4 points and lost to Spain, so they went 1-1-1. Not sure who they beat yet.
Croatia has 2 points and lost to Spain, so they went 0-1-2. So Croatia played to a draw against both Italy and Albania. This means Italy beat Albania.
So the 6 matches were:
Spain (W) - Italy
Spain (W) - Croatia
Spain (W) - Albania
Italy (W) - Albania
Italy (D) - Croatia
Croatia (D) - Albania

Now that we know the outcomes of each match, it's time to figure out the scores. It turns out that Spain is again relatively easy...

Croatia's goal differential is -3 and they played 2 draws, so they lost to Spain by 3 goals. Since Spain didn't allow a goal, we have our first score:
Spain 3 - Croatia 0
Spain scored a total of 5 goals, meaning their other matches were both won 1-0:
Spain 1 - Italy 0
Spain 1 - Albania 0

Now for the other 3 matches, it is simple enough to use the goals and figure out which possibilities work for all 3 teams...

Note: When calculating, I am using the fact that each team scored 3 goals. Then I will use the goals against to check if it's possible.
Croatia's 2 draws involved 3 goals for each side. So they either played
3 - 3 and 0 - 0 or
2 - 2 and 1 - 1

Let's assume it's 3-3/0-0. Italy only allowed 2 goals (excluding Spain), so they would have to be the 0-0 game. That makes the 3 games:
Croatia 0 - Italy 0 / Croatia 3 - Albania 3 / Italy 3 - Albania 0.
Goals against for Italy (2) shows this is incorrect.

So Croatia's games are 2-2 and 1-1, we just need to figure out which is which.
First guess, the 2-2 game is Italy:
Croatia 2 - Italy 2 / Croatia 1 - Albania 1 / Italy 1 - Albania 2.
Italy didn't lose, so this is incorrect.

Final guess, the 2-2 game is Albania:
Croatia 2 - Albania 2 / Croatia 1 - Italy 1 / Italy 2 - Albania 1.
Everything checks out now.

TLDR:

Spain 3 - Croatia 0
Spain 1 - Italy 0
Spain 1 - Albania 0
Italy 1 - Croatia 1
Italy 2 - Albania 1
Croatia 2 - Albania 2

I solved it the following way:

1. Determine wins and losses:
Spain won all the games to zero
-> 3 * 3 = 9 points

Now we have 3 games left to conclude:
Italy won one game and drew the other: 1 * 3 + 1 * 1 = 4
Croatia drew both games: 2 * 1 = 2
Albania drew one and lost the other: 1 * 1 = 1

2. Which games were wins, which were losses?
Both Croatia games were draws. So for Italy and Albania, the result of the other games were the ones still missing, which leads to:

Croatia vs. Albania: Draw
Croatia vs. Italy: Draw
Italy vs. Albania: Italy wins

3. Find out one result and deduct the rest:
The easiest here is to look at the two draws, i.e. Croatia vs. Albania and Croatia vs. Italy, as they are dependent on the total goals Croatia shot (the sum of goals has to be 3).
Lets look at Croatia vs. Albania and Croatia vs. Italy.

a) If Croatia vs. Albania = 0:0, then Croatia vs. Italy = 3:3
b) If Croatia vs. Albania = 1:1, then Croatia vs. Italy = 2:2
c) If Croatia vs. Albania = 2:2, then Croatia vs. Italy = 1:1
d) If Croatia vs. Albania = 3:3, then Croatia vs. Italy = 0:0

From each of these games we can deduct the result of Italy vs. Albania, as we have to only fill up the goals shot and received by both teams.

a) Then Italy vs. Albania = 0:3. This cannot be, because Italy has to win this game
d) Then Italy vs. Albania = 3:0. This cannot be, because then Albania got 6 goals shot against, which is wrong
b) Then Italy vs. Albania needed to be 1:3. This cannot be, because Italy has to win this game.
c) Then Italy vs. Albania = 2:1 => This works so far.

4. We have to fill up the Spain games with the goals left, that were shot against each team.

Spain vs. Italy: 1:0
Spain vs. Croatia: 3:0
Spain vs. Albania: 1:0

5. To sum it up:

Spain vs. Italy: 1:0
Spain vs. Croatia: 3:0
Spain vs. Albania: 1:0
Croatia vs. Albania: 2:2
Croatia vs. Italy 1:1
Italy vs. Albania: 2:1

I am going to set up a system of linear equations. Of course, this means I have to solve for what that system is before I can solve the system by algebra, and therein line the trick.

I will use the notation $$x_{ij}$$ for the goals scored by Team $$i$$ against Team $$j$$. The numbers will be the rankings of the teams, thus Spain = 1, Italy = 2, Croatia = 3 and Albania = 4.

Spain was massive on defense so we force $$x_{21}=x_{31}=x_{41}=0$$. We drop those from the system and now seek nine equations for the other nine variables.

From the goals for and goals against values given in the rable we may render Eqs. (1)-(7):

$$x_{12}+x_{13}+x_{14}=5\tag{1}$$ $$x_{23}+x_{24}=3\tag{2}$$ $$x_{12}+x_{32}+x_{42}=3\tag{3}$$

We do not assume that each the terms in Eq. (3) is one goal because Italy won a game (can't otherwise have four points) and may have pitched a shutout in that game.

$$x_{32}+x_{34}=3\tag{4}$$ $$x_{13}+x_{23}+x_{43}=6\tag{5}$$ $$x_{42}+x_{43}=3\tag{6}$$ $$x_{14}+x_{24}+x_{34}=5\tag{7}$$

Now Croatia gained two points and must have lost to Spain, so it drew against the other two teams and we now have, ostensibly, the two missing equations: $$x_{23}-x_{32}=0\tag{8}$$ $$x_{24}-x_{42}=0\tag{9}$$

We have our nine equations for the nine unknowns and are ready to go ... until we check the determinant of the coefficient matrix: $$0$$! Our intended nine equations fail to be linearly independent!

Suppose we label the coefficient matrix from the above equation $$M$$, the identity matrix $$I$$, and a small scalar $$\epsilon$$. Plugging in various values of $$\epsilon$$ we find that with $$\epsilon$$ indeed small in absolute value, the determinant of $$M-\epsilon I$$ tends to proportionality with $$\epsilon^2$$. This indicates two zero eigenvalues, thus $$9-2=7$$ of the above nine equations are actually linearly independent. Using principal minors we find that one such set of seven equations is (2) through (8). We therefore drop Eqs. (1) and (9) and must replace them with equations that are independent of the remaining seven.

Albania must have suffered some heartbreakers. They never won but their goal differential was merely -2, so they must have taken two losses by one goal plus their draw. With Spain shutting out everyone else, this forces $$x_{14}=1\tag{10}$$

Now we look at Albania versus Italy. If that were a draw, then Italy would have had to win over Spain (but Spain won all three of its matches) or against Croatia (which was proved earlier to have drawn except against Spain). The contradiction forces us to accept that Albania lost to Italy, by one goal (and drew against Croatia): $$x_{24}-x_{42}=1\tag{11}$$

We now have Eqs. (2) through (8) and now also (10) and (11). This time the coefficient matrix has a nonzero determinant and the system with those nine equations can be solved. The solution, with implied scores, is as follows (pardon the multiple paragraphs; there were formatting issues in my original display):

$$x_{12}=1\implies$$ Spain 1, Italy 0

$$x_{13}=3\implies$$ Spain 3, Croatia 0

$$x_{14}=1\implies$$ Spain 1, Albania 0

$$x_{23}=1,x_{32}=1\implies$$ Italy 1, Croatia 1

$$x_{24}=2,x_{42}=1\implies$$ Italy 2, Albania 1

$$x_{34}=2,x_{43}=2\implies$$ Croatia 2, Albania 2