# R is list of integers colored red\ # B is list of integers colored blue\ # c is for k+c on the w variable in\ # x + y + kz = (k+c)w\ print(`Version of 2/19/07`): lprint(``): print(`Written by Aaron Robertson.`) lprint(``): print(`This is FVR, A Maple package accompanying `): print(`a paper written by Aaron Robertson and Kellen Myers.`): lprint(``): print(`Please report all bugs to: aaron@math.colgate.edu .`): lprint(``): print(`The only procedure is sp(k,c,R,B).`): print(`where the equation under consideration is x+y+kz=(k+c)w.`): print(`R is a list of red integers, B a list of blue.`): print(`The output is a set of values for k for which a`): print(`monochromatic solution exists in the coloring.`): lprint(``): sp:=proc(k,c,R,B) local ans,m,i,j,S1,S2,T1,T2,soln: S1:={}: S2:={}: T1:={}: T2:={}: soln:={}: for i from 1 to nops(R) do for j from 1 to nops(R) do for m from 1 to nops(R) do S1:=S1 union {R[i]+R[j]+k*R[m]}: od: od: od: for i from 1 to nops(R) do S2:=S2 union {(k+c)*R[i]}: od: for i from 1 to nops(S2) do for j from 1 to nops(S1) do ans:=solve(S2[i]=S1[j]): if ans=k or (ans>0 and type(ans,integer)) then soln:=soln union {ans}: fi: od: od: for i from 1 to nops(B) do for j from 1 to nops(B) do for m from 1 to nops(B) do T1:=T1 union {B[i]+B[j]+k*B[m]}: od: od: od: for i from 1 to nops(B) do T2:=T2 union {(k+c)*B[i]}: od: for i from 1 to nops(T2) do for j from 1 to nops(T1) do ans:=solve(T2[i]=T1[j]): if ans=k or (ans>0 and type(ans,integer)) then soln:=soln union {ans}: fi: od: od: soln; end: