# Copyright 1999 by Aaron Robertson # ISSAI is a short Maple package used to find lower bounds and exact values # for small Issai numbers. # n is from the coloring [1,n]. We are looking at the Issai number # S(k,l) # note only 2 colors handled here # this runs through all 2^n colorings of [1,n] to determine if # [1,n] can be colored avoiding monochromatic Schur k and l tuples # colors are 0 and 1 Issai:=proc(n,k,l) local i,j,C,R,B,a,b,c,X,Y,s,x,t1,t2,flag,y: with(combinat): R:=[]: B:=[]: C:=Allcolors(n): for i from 1 to nops(C) do a:=C[i][1]: b:=C[i][2]: R:=[seq(op(a),j=1..k-1)]: B:=[seq(op(b),j=1..l-1)]: # we want to see if all possible colorings either have a # red Schur k-tuple or a blue Schur l-tuple # if a coloring is found that has neither, then it is # returned, and hence we have found a lower bound. # for efficiency, once a monochromatic k or l-tuple is found # we move onto the next coloring X:=choose(R,k-1): Y:=choose(B,l-1): flag:=0: t1:=0: for j from 1 to nops(X) do x:=X[j]: s:=convert(x,`+`); if member(s,a) then j:=nops(X):flag:=1: else t1:=t1+1 fi: od: t2:=0: if flag=0 then for j from 1 to nops(Y) do y:=Y[j]: s:=convert(y,`+`); if member(s,b) then j:=nops(Y): else t2:=t2+1: fi: od: fi: if t1=nops(X) and t2=nops(Y) then RETURN(C[i], `avoids monochromatic Schur k and l-tuples`): elif i=nops(C) then RETURN(`S(k,l) <= `,n): fi: od: end: # returns a list of all 2 coloring of [1,n] as a list of lists of the # form [[red],[blue]] Allcolors:=proc(n) local i,S,A,t1,t2: option remember: if n=1 then RETURN([ [[1],[]], [[],[1]]]): else S:=[]: A:=Allcolors(n-1): for i from 1 to nops(A) do t1:=A[i][1]: t2:=A[i][2]: S:=[op(S),[t1,[op(t2),n]],[[op(t1),n],t2]]: od: S: fi: end: