A Le Monde mathematical puzzle from after the competition:
*A sequence of five integers can only be modified by subtracting an integer N from two neighbours of an entry and adding 2N to the entry. Given the configuration below, what is the minimal number of steps to reach non-negative entries everywhere? Is this feasible for any configuration? *
As I quickly found a solution by hand in four steps, but missed the mathematical principle behind!, I was not very enthusiastic in trying a simulated annealing version by selecting the place to change inversely proportional to its value, but I eventually tried and also obtained the same solution:
The second part of the question is more interesting, but again without a clear mathematical lead, I could only attempt a large number of configurations and check whether all admitted “solutions”. So far none failed.
Related