We need to do the basketball team classification.
For reference the procedure is here:
D.1 Procedure
Teams shall be classified according to their win-loss records, namely two (2) points
for each game won, one (1) point for each game lost (including lost by default) and
zero (0) points for a game lost by forfeit.
D.1.1 If there are two (2) teams in the classification with equal points, the result(s) of the
game(s) between the two (2) teams involved will be used to determine the placing.
D.1.2 If the points and the goal average in the games between the two (2) teams are still
the same, the classification will be determined by the goal average of all the games
played in the group by each team.
D.1.3 If there are more than two (2) teams in the classification with equal points, a second
classification will be established, taking into account only the results of the games
between the involved teams.
D.1.4 If at any stage of this procedure the number of teams with equal points is reduced
to only two (2) teams, the procedure in D.1.1 and D.1.2 above will be applied.
D.1.5 If in the second classification there are still teams with equal points, the goal
average will be used to determine the placing, taking into account only the results
of the games between the involved teams.
D.1.6 If there are still more than two (2) teams with the same goal average, the placing
will be determined using the goal average from the results of all their games played
in the group.
D.1.7 If at any stage of this procedure the number of teams with equal points is reduced
to a tie still involving more than two (2) teams, the procedure, beginning with D.1.3
above, is repeated.
D.1.8 Goal average will always be calculated by division.
The question is how to approach the D.1.3 section, which says: If there are more than two (2) teams in the classification with equal points, a second how to model the second classification and how to make the decision based on the results of the games between them?
classification will be established, taking into account only the results of the games
between the involved teams.
For k teams with equal points, construct a smaller “league table”, of size k, which will be populated with points and goals based only on the games between these teams.
Activate the ranking procedure recursively on this smaller table.
Halt if there is no team was reduced between 2 recursive calls [the teams are completely equal] or when a full ranking was established. If list consists of two teams only with same points: secondary criteria applies.