[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

590.0. "Problem from Int'l Mathematics Olympiad" by CLT::GILBERT (eager like a child) Sat Sep 27 1986 17:27

Newsgroups: net.math
Path: decwrl!amdcad!amd!intelca!qantel!lll-lcc!lll-crg!seismo!columbia!sylvester.columbia.edu!ari
Subject: for all you math wizzes out there (Berkeley included), a problem....
Posted: 25 Sep 86 22:09:24 GMT
Organization: Columbia University CS Department
Keywords: x,y,z
Summary: halting problem
 
Here's a cute problem (to which I do not as yet have a solution). It was
asked at the Int'l Mathematics Olympiad for high school students. 
 
      A regular pentagon has its vertices labelled A,B,C,D,E. Each vertex,
A-E, is then assigned an integer value. The integer value assigned to
any given vertex can be positive, zero, or negative but the sum of the integers
assigned to vertices A-E must be greater than zero. We have an operator
that can be applied to any 3 adjacent vertices, say D,E, and A, to modify
the integer values at these vertices (this can also be thought of as a 
rewrite rule on a string). The operator is applied as follows : If the 3
adjacent vertices in question have the values x, y, and z and y<0, then
the operator reassigns to the respective vertices the values x+y, -y, and
z+y. For example, if the operator is applied to the vertices D, E, and A,
whose respective values are 10, -10, and 5, then the values that are
reassigned are 0, +10, -5, respectively. (Note that the sum does not
change.) Assuming that this operator must be applied (with no
particular order of application assumed if there are multiple possibilities)
whenever possible, is the computation guaranteed to eventually halt on all
allowable inputs ?
 
Ari David Gross
Computer Science Dept.
Columbia University
ari@columbia-20.arpa
T.RTitleUserPersonal
Name
DateLines
590.1A ProofCHOVAX::YOUNGI think we're all bozos on this BUS.Tue Sep 30 1986 03:3864
    Consider the sum of the squares of the differences of of the values
    of all non-touching nodes:
    
    	For:		       _A_
    			      E   B
                              \   /
    			       D-C
    	We would have:
                             2      2      2      2      2
    			(A-C) +(C-E) +(E-B) +(B-D) +(D-A) 
    
    	Call the value the Wumpus (or whatever...) of the Order pentagonal
    set S = <A,B,C,D,E>.
    
                                 2      2      2      2      2
     Thus we can say W(S) = (A-C) +(C-E) +(E-B) +(B-D) +(D-A) 
    
    Now this reduces to:   2  2  2  2  2
    		       2((A +B +C +D +E )-(AC+CE+EB+BD+DA)
    
    Now:
    	1) If there are no negative values in S then we halt.  Case
    closed.
    
    	2) If there is some negative value in S (say its B) then we
    could apply the operator to it:
    
    		A  -->  A+B
    		B  -->  -B
    		C  -->  C+B
    
    	The Wumpus of S1 is now:
                         2   2   2   2   2
    		       2A +2B +2C +2D +2E -2AC-2CE-2EB-2BD-2DA
    		      +4AB    +4CB        -2AB-2BE+4EB+4BD-2DB
                         2       2        -2CB
                      +2B     +2B            2
                                          -2B                 
   
     	Subtracting W(S) and reducing we find:
                 2
    dW (S) = 2 (B + AB + CB + EB + BD)
    
    	   = B * 2(A + B + C + D + E)
    
    	Now it is given that (A+B+C+D+E) is positive, and we choose
    B because it was negative so dW must always be negative.
    
    	Thus W(S1) < W(S) for all valid S.
    
    	Clearly the wumpus of any set MUST be a positive integer, or
    zero.  
    
    	Since W(S) is some finite positive integer, and W(S+n) will
    be ever decreasing, and since W(S+n) must still always be positive,
    then S --> S1 --> S2 --> ... cannot continue infintely.
    
    	Therefore it must halt.
    
    
    The flak may now ensue.  B^)
    
    -- Barry
    
590.2BEING::POSTPISCHILAlways mount a scratch monkey.Tue Sep 30 1986 12:2910
    Re .1:
    
    That looks good to me.  I think you should add a brief statement that
    the operator does not change the sum of the values (you use that lemma
    implicitly in your proof) and then submit your proof to USENET, so the
    person who posed the problem can see the answer.  Send me mail if you
    don't know how to submit to net.math. 
    
    
    				-- edp 
590.3CLT::GILBERTeager like a childSat Oct 04 1986 02:1345
Newsgroups: net.math
Path: decwrl!glacier!navajo!avg
Subject: Re: for all you math wizzes out there (Berkeley included), a problem....
Posted: 3 Oct 86 07:45:13 GMT
Organization: Stanford University
Keywords: x,y,z
 
A lunchtime group of Stanford CS faculty and grads kicked this puzzle around
for an hour.  I suggested looking for a function of the vertex values
that the operation drives toward zero, something like the
sum of the squares, except that the sum of squares does not work.
But after a few minutes, Ramsey Haddad thought of the following function,
	A^2+...+E^2 + (A+B)^2 + (B+C)^2 + (C+D)^2 + (D+E)^2 + (E+A)^2
which DOES work.
If the operation is applied to C (which must be negative), the change
in the above function is 2C(A+B+C+D+E), which must be negative.
 
A nice feature of this is that it generalizes to larger polygons.
Don Knuth suggested looking at longer consecutive sums,
and later I worked out the following.
 
If n is odd, say 25, the function to look at is
	A^2+ B^2 + ... + Y^2  +
	(A+B)^2 + (B+C)^2 + ... + (Y+A)^2  +
	(A+B+C)^2 + (B+C+D)^2 ... + (Y+A+B)^2  +
	...  +
	(A+...+L)^2 + (B+...+M)^2 + ... + (Y+A+...+K)^2
i.e., all sums of 1 through (n-1)/2 consecutive values are
squared and summed.  The operation applied to M produces a change
of 2C(A+...+Y).
 
If n is even, say 26, a slight variation is needed, as follows:
	2 (A^2+ B^2 + ... + Z^2)  +
	(A+B)^2 + (B+C)^2 + ... + (Z+A)^2  +
	(A+B+C)^2 + (B+C+D)^2 ... + (Z+A+B)^2  +
	...  +
	(A+...+X)^2 + (B+...+Y)^2 + ... + (Z+A+...+W)^2
i.e., all sums of 2 through (n-2) consecutive values are
squared and summed, and twice the sum of individual squares is added.
The operation applied to M produces a change of 4M(A+...+Z).
 
Some students had already looked at the problem and developed
a termination proof along different lines.  Also note that if the
sum of values is allowed to be 0, then 0 1 -1 1 -1  does not terminate.
My open question is, suppose the sum of the weights is negative?
590.4CLT::GILBERTeager like a childSat Oct 04 1986 02:279
Suspecting that there is considerable latitude in chosing a W(S),
suppose that the transformation of x,y,z (where y is negative) is:

	x+ay, y-(a+b)y, z+by

where a and b are arbitrary values (which may change for different
applications of the transformation) such that 0 < a,b <= 1.

Is Barry's W(S) still a decreasing function?
590.5Late again...CHOVAX::YOUNGI think we're all bozos on this BUS.Sat Oct 04 1986 03:3818
    Re .3
    
    Well looks like I procrastinted too long on edp's suggestion.  I'm
    still trying to figure out how to modify my original note.  Oh well
    you know what they say: "Lucky at love, lousy at Notes."  Or something
    like that.
    
    Re .4
    
    Good question, but its too late for thinking right now, maybe
    tommorrow.  Or maybe some larger brains can kick it around.  What
    does Don Knuth have to say?  ;^)
    
    -- Barry
    
    ps.  Anybody who knows how, feel free to submit any/all of my replies
    to the Usenet, if thats appropiate.