Devon McCormick wrote:
> http://mags.acm.org/communications/200902/?pg=106
>
> The first one:
>
> Five integers with a positive sum are assigned to the vertices of a
> pentagon.  At any point you may select a negative entry (say, -x) and flip
> it to make it positive, or x, but then you must subtract x from each of
> the
> two neighboring values; thsu, the sum of the five integers remains the
> same.  For example, if the numbers are 2, 4, -3, 1, -3, you can either
> flip
> the first -3 to get 2, 1, 3, -2, -3 or the second to get -1, 4, -3, -2, 3.
>
> Now prove that no matter what numbers you start with and strategy you
> follow, all the numbers will eventually become non-negative, and thus the
> procedure terminates after finitely many steps.


SPOILER AHEAD

This was discussed in the forum a while ago.  A solution was posted at

http://www.jsoftware.com/pipermail/programming/2006-May/002352.html

Best wishes,

John



----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to