## Le Monde puzzle [#1127] A permutation challenge as Le weekly Monde current mathematical puzzle:

When considering all games between 20 teams, of which 3 games have not yet been played, wins bring 3 points, losses 0 points, and draws 1 point (each). If the sum of all points over all teams and all games is 516, was is the largest possible number of teams with no draw in every game they played?

The run of a brute force R simulation of 187 purely random games did not produce enough acceptable tables in a reasonable time. So I instead considered that a sum of 516 over 187 games means solving 3a+2b=516 and a+b=187, leading to 142 3’s to allocate and 45 1’s. Meaning for instance this realisation of an acceptable table of game results

```games=matrix(1,20,20);diag(games)=0
while(sum(games*t(games))!=374){
games=matrix(1,20,20);diag(games)=0
games[sample((1:20^2)[games==1],3)]=0}
games=games*t(games)
games[lower.tri(games)&games]=games[lower.tri(games)&games]*
sample(c(rep(1,45),rep(3,142)))* #1's and 3'
(1-2*(runif(20*19/2-3)<.5)) #sign
games[upper.tri(games)]=-games[lower.tri(games)]
games[games==-3]=0;games=abs(games)
```

Running 10⁶ random realisations of such matrices with no constraint whatsoever provided a solution with] 915,524 tables with no no-draws, 81,851 tables with 19 teams with some draws, 2592 tables with 18 with some draws and 3 tables with 17 with some draws. However, given that 10*9=90 it seems to me that the maximum number should be 10 by allocating all 90 draw points to the same 10 teams, and 143 3’s at random in the remaining games, and I reran a simulated annealing version (what else?!), reaching a maximum 6 teams with no draws. Nowhere near 10, though!

### 4 Responses to “Le Monde puzzle [#1127]”

1. Stephen Miller Says:

Hi! I saw ths on R-bloggers. I agree the maximum is 10: You can achieve 45 draws by having 10 teams all draw with each other (10 C 2 = 45).

Why don’t your random realisations get there? There are 190 C 45 ~= 10^44 ways to randomly allocate 45 draws. And only 20 C 10 = 184756 ways to allocate them all to 10 teams. So the probability of finding the solution in a random realisation is 2 X 10^-39.

That’s why I’m alwasys sceptical of simulation when a mathematical solution exists.

• xi'an Says:

Thanks Stephen. I am not advocating simulation as a way to bypass mathematics but write these entries as a simulation or programming challenge for my readers, incl. my students. Sometimes it works and sometimes it doesn’t.

2. Le Monde puzzle [#1127] | R-bloggers Says:

[…] article was first published on R – Xi'an's Og, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) […]