MathCAD

       

Fig. 6.24. Mathcad program for solving the Fishermen's Problem (6_22_fisherman.mcd)


In Fig. 6.24 the result of calling the function Answer are shown for various input values: 50, 24, -3 and even -30 fish. The English physicist and early quantum theorist Paul Dirac postulated not only antiparticles but "antifish". In one version of a well-known story[1], he is remembered as saying that 25 fish was an incorrect solution to this problem, and that the correct answer is -2 fish (or two antifish). If we start with two antifish, throwing away one away gives three antifish; we take our share of one antifish, leaving two antifish .. and so on indefinitely. Our computer solution of the problem shows that even Dirac was mistaken: "Paul, you are not right!" The conditions of the problem are fulfilled by an infinity of numbers – we'll call it a Dirac of fish – with a step of 27 (i.e. -2, 25, 52, etc).

To avoid being an ultra-pedant[2], it's possible to insert at the end of the for loop in Fig. 6.24 a statement break if Divided = "no" to interrupt the loop's operation even before all the fishermen have taken their share. If there aren't three fishermen but more (for example, thirty-three – a task for the reader), this device essentially speeds up the program's operation (see the heading "Optimization of Mathcad programs"). The task can be complicated even more, generalizing to any number of fisherman sharing, or discarding, any number of fish.

The Fishermen's Problem can be solved in another way, by reversing it. Rather than making an initial guess for the catch, we can assume that the last fisherman leaves two fish (it can't be fewer) and increment that number by one until the conditions of the task can be fulfilled. This will solve the problem faster, and we won't ever get solutions of -2 or -29 fish (the paradigm "Keep it simple, stupid!" applies here). It's psychologically difficult for humans to appreciate negative solutions, but the machine does it quietly, without any prejudices. A more thought-out analytical solution of this task – the search for integer roots of one equation with two unknowns – doesn't give the negative answer.

[1]In another version, the story involves shipwrecked sailors dividing a heap of coconuts, the spare coconuts being thrown to a monkey. As the 'Monkey and Coconut Problem', this has been analysed in detail using the number theory of Diophantine equations. For five sailors, the minimum positive number of coconuts is 15621 (Martin Gardner comments that with a Dirac-type solution of four anticoconuts, the monkey benefits most from the process, as it receives a positive coconut at each stage of the division).

[2]There's a Russian word «çàíóäà», meaning "boringly pedantic to the point of irrationality".



Ñîäåðæàíèå ðàçäåëà