Я тут сбацал для нескольких простых случаев матрицу чисел и последовательности, которые получаются. Какая-то закономерность прослеживается, не могу пока сформулировать.
* 1 2 3 -------------------------------- 1| 1.000 2| 0.500 1.000 3| 0.333 0.667 1.000 -------------------------------- 1/3 (0.333), 1/2 (0.500), 2/3 (0.667), 1/1 (1.000), * 1 2 3 4 ---------------------------------------- 1| 1.000 2| 0.500 1.000 3| 0.333 0.667 1.000 4| 0.250 0.500 0.750 1.000 ---------------------------------------- 1/4 (0.250), 1/3 (0.333), 1/2 (0.500), 2/3 (0.667), 3/4 (0.750), 1/1 (1.000), * 1 2 3 4 5 ------------------------------------------------ 1| 1.000 2| 0.500 1.000 3| 0.333 0.667 1.000 4| 0.250 0.500 0.750 1.000 5| 0.200 0.400 0.600 0.800 1.000 ------------------------------------------------ 1/5 (0.200), 1/4 (0.250), 1/3 (0.333), 2/5 (0.400), 1/2 (0.500), 3/5 (0.600), 2/3 (0.667), 3/4 (0.750), 4/5 (0.800), 1/1 (1.000), * 1 2 3 4 5 6 -------------------------------------------------------- 1| 1.000 2| 0.500 1.000 3| 0.333 0.667 1.000 4| 0.250 0.500 0.750 1.000 5| 0.200 0.400 0.600 0.800 1.000 6| 0.167 0.333 0.500 0.667 0.833 1.000 -------------------------------------------------------- 1/6 (0.167), 1/5 (0.200), 1/4 (0.250), 1/3 (0.333), 2/5 (0.400), 1/2 (0.500), 3/5 (0.600), 2/3 (0.667), 3/4 (0.750), 4/5 (0.800), 5/6 (0.833), 1/1 (1.000), * 1 2 3 4 5 6 7 ---------------------------------------------------------------- 1| 1.000 2| 0.500 1.000 3| 0.333 0.667 1.000 4| 0.250 0.500 0.750 1.000 5| 0.200 0.400 0.600 0.800 1.000 6| 0.167 0.333 0.500 0.667 0.833 1.000 7| 0.143 0.286 0.429 0.571 0.714 0.857 1.000 ---------------------------------------------------------------- 1/7 (0.143), 1/6 (0.167), 1/5 (0.200), 1/4 (0.250), 2/7 (0.286), 1/3 (0.333), 2/5 (0.400), 3/7 (0.429), 1/2 (0.500), 4/7 (0.571), 3/5 (0.600), 2/3 (0.667), 5/7 (0.714), 3/4 (0.750), 4/5 (0.800), 5/6 (0.833), 6/7 (0.857), 1/1 (1.000), * 1 2 3 4 5 6 7 8 ------------------------------------------------------------------------ 1| 1.000 2| 0.500 1.000 3| 0.333 0.667 1.000 4| 0.250 0.500 0.750 1.000 5| 0.200 0.400 0.600 0.800 1.000 6| 0.167 0.333 0.500 0.667 0.833 1.000 7| 0.143 0.286 0.429 0.571 0.714 0.857 1.000 8| 0.125 0.250 0.375 0.500 0.625 0.750 0.875 1.000 ------------------------------------------------------------------------ 1/8 (0.125), 1/7 (0.143), 1/6 (0.167), 1/5 (0.200), 1/4 (0.250), 2/7 (0.286), 1/3 (0.333), 3/8 (0.375), 2/5 (0.400), 3/7 (0.429), 1/2 (0.500), 4/7 (0.571), 3/5 (0.600), 5/8 (0.625), 2/3 (0.667), 5/7 (0.714), 3/4 (0.750), 4/5 (0.800), 5/6 (0.833), 6/7 (0.857), 7/8 (0.875), 1/1 (1.000), * 1 2 3 4 5 6 7 8 9 -------------------------------------------------------------------------------- 1| 1.000 2| 0.500 1.000 3| 0.333 0.667 1.000 4| 0.250 0.500 0.750 1.000 5| 0.200 0.400 0.600 0.800 1.000 6| 0.167 0.333 0.500 0.667 0.833 1.000 7| 0.143 0.286 0.429 0.571 0.714 0.857 1.000 8| 0.125 0.250 0.375 0.500 0.625 0.750 0.875 1.000 9| 0.111 0.222 0.333 0.444 0.556 0.667 0.778 0.889 1.000 -------------------------------------------------------------------------------- 1/9 (0.111), 1/8 (0.125), 1/7 (0.143), 1/6 (0.167), 1/5 (0.200), 2/9 (0.222), 1/4 (0.250), 2/7 (0.286), 1/3 (0.333), 3/8 (0.375), 2/5 (0.400), 3/7 (0.429), 4/9 (0.444), 1/2 (0.500), 5/9 (0.556), 4/7 (0.571), 3/5 (0.600), 5/8 (0.625), 2/3 (0.667), 5/7 (0.714), 3/4 (0.750), 7/9 (0.778), 4/5 (0.800), 5/6 (0.833), 6/7 (0.857), 7/8 (0.875), 8/9 (0.889), 1/1 (1.000),
-
- если идти из левого нижнего угла вверх и сравнивать со следующим столбцом, то... bialix(248 знак., 04.09.2012 17:47)