[math-fun] Never Go Down
Hello Math-Fun, the "Never Go Down" constraint takes you for a walk on a checkerboard, stepping over integers that have one digit per square. The rule is simple: start on the smallest digit and chose the shorter path to visit all of them, never going down. Example: +---+---+---+---+---+ | 1 | 0 | 2 | 1 | 0 | +---+---+---+---+---+ The shorter path will start on the yellow 0, then lead you to the other 0 (3 steps), then to the blue 1 (1 step), to the next 1 (3 steps) and to the final 2 (1 step). The total length of the path is 8. (Please note that the longest legal path has length 11.) We want now to complete this table: Smallest number Biggest number minimal path minimal path +---+---+---+---+---+---+---+---+---+---+---+ Path lenght 1 | | | | 1 | 0 | | | | | 9 | 9 | +---+---+---+---+---+---+---+---+---+---+---+ Path lenght 2 | | | 1 | 0 | 0 | | | | 9 | 9 | 9 | +---+---+---+---+---+---+---+---+---+---+---+ Path lenght 3 | | | 1 | 0 | 1 | | | | 9 | 8 | 9 | +---+---+---+---+---+---+---+---+---+---+---+ Path lenght 4 | | 1 | 0 | 1 | 1 | | | 9 | 9 | 8 | 9 | +---+---+---+---+---+---+---+---+---+---+---+ Path lenght 5 | | 1 | 0 | 0 | 1 | | | 9 | 8 | 8 | 9 | +---+---+---+---+---+---+---+---+---+---+---+ Path lenght 6 | | 1 | 3 | 2 | 0 | | | | | | | +---+---+---+---+---+---+---+---+---+---+---+ Path lenght 7 | | 1 | 3 | 0 | 2 | | | | | | | +---+---+---+---+---+---+---+---+---+---+---+ Path lenght 8 | | | | | | | | | | | | +---+---+---+---+---+---+---+---+---+---+---+ Path lenght 9 | | | | | | | | | | | | +---+---+---+---+---+---+---+---+---+---+---+ ... | | | | | | | | | | | | +---+---+---+---+---+---+---+---+---+---+---+ ... | | | | | | | | | | | | We could ask for two more columns: "Smallest number/maximal path" and "Biggest term/maximal path". But enough for today! à+ É. Catapulté de mon aPhone
participants (1)
-
Éric Angelini