enigma1373.txt (c) 2006 by Charles Petzold "From Point to Corner" by Richard England, New Scientist, 7 January 2006, page 42 This is an exercise in a form of "taxicab geometry" where points on the plane are described conventionally as number pairs (x, y) but only integers are allowed, and where the distance between two points is restricted to only horizontal or vertical movements, like a taxicab in Manhattan. In taxicab geometry, lines ("the shortest distance between two points") are not unique. It can easily be demonstrated that the number of lines between point (0, 0) and point (x, y) is equal to the number of lines between (0, 0) and (x-1, y) plus the number of lines between (0, 0) and (x, y-1). The following chart shows the number of lines between two points based on delta-x and delta-y: Delta-X Delta-Y 0 1 2 3 4 5 6 7 ------- - - - - - - - - 0 - 1 1 1 1 1 1 1 1 1 2 3 4 5 6 7 8 2 1 3 6 10 15 21 28 36 3 1 4 10 20 35 56 84 120 4 1 5 15 35 70 126 210 330 5 1 6 21 56 126 252 462 792 and so forth. Notice that each cell is the sum of the cell above and the cell to the left. The problem involves four adjoining points A = (xA, yA), B = (xA + 1, yA), C = (xA + 1, yA + 1), D = (xA, yA + 1): A B D C Another point P can be assumed to be the origin. From P to C can be drawn four times as many lines as from P to A. From P to D are twice as many lines as from P to B. We are looking for a pattern in the table like this: A B 2B 4A That pattern is found for A = (5, 2). The problem requests the number of lines from P to A, and from P to B, which are 21 and 28.