###################################################################### ##BET: Save this file as BET. To use it, stay in the # ##same directory, get into Maple (by typing: maple ) # ##and then type: read BET : # ##Then follow the instructions given there # ## # ##Written by Doron Zeilberger, Temple University , # #zeilberg@math.temple.edu. # ####################################################################### #Created: Dec. 29, 1997 #This version: Dec. 29, 1997 #BET: A Maple package to study The Ben Ezra Transform #Please report bugs to zeilberg@math.temple.edu print(`Created: Dec. 29, 1997.`): print(`This version: Dec. 29, 1997`): lprint(``): print(`Written by Doron Zeilberger, zeilberg@math.temple.edu`): lprint(``): print(`This is BET, to study Rabbi Abraham Ben Ezra's Transform`): print(`It accompanies the talk by Doron Zeilberger at the`): print(`special session on Difference Equations`): print(`that will take place on Jan. 10, 1997, at the AMS`): print(`Baltimore meeting and perhapsa also `): print(` a forthcoming paper by Zeilberger`): lprint(``): print(`Please report bugs to zeilberg@math.temple.edu`): lprint(``): print(`The most current version of this package and paper`): print(` are available from`): print(`http://www.math.temple.edu/~zeilberg`): print(`For a list of the procedures type ezra(), for help with`): print(`a specific procedure, type ezra(procedure_name)`): print(``): ezra:=proc() if args=NULL then print(`Contains the following procedures: IETrans, What_To_Claim`): fi: if nops([args])=1 and op(1,[args])=`IETrans` then print(`IETrans(x): Given a list of claims, x, which is`): print(`is a weakly decreasing sequence of numbers between`): print(`1 and 0, representing the claims to the inheritance`): print(`by the heirs, outputs the division according to the Ben Ezra `): print(`Transform`): fi: if nops([args])=1 and op(1,[args])=`What_To_Claim` then print(`What_To_Claim(resh,y): Given the list of claims`): print(`of the other brothers, what portion should the new brother`): print(`claim if he believes he deserves portion y of the inheritance`): fi: end: with(linalg): IETrans:=proc(x) local i,n,gu,mu,j: n:=nops(x): gu:=[]: for i from 1 to n do mu:=x[i]/i: for j from i+1 to n do mu:=mu-x[j]/j/(j-1): od: gu:=[op(gu),mu]: od: gu: end: IEmat:=proc(n) local a,i,j: a:=[seq([seq(0,j=1..i-1),1/i,seq(-1/j/(j-1),j=i+1..n)],i=1..n)]: convert(a,matrix): end: IIEmat:=proc(n) local a,i,j: inverse(IEmat(n)): end: # #What_To_Claim(resh,y): Given the list of claims #of the other brothers, what portion should the new brother #claim if he believes he deserves y What_To_Claim:=proc(resh,MAGIA) local i,resh1,magia1,magia2,y,magiay: resh1:=[1,op(resh)]: magia1:=IETrans(resh1)[1]: if MAGIA>magia1 then RETURN(1): fi: for i from 1 to nops(resh) do magia2:=IETrans([op(1..i,resh),op(i,resh),op(i+1..nops(resh),resh)])[i]: if MAGIA<=magia1 and MAGIA>=magia2 then resh1:=[op(1..i-1,resh),y,op(i..nops(resh),resh)]: magiay:=IETrans(resh1)[i]: RETURN(solve(magiay=MAGIA,y)): fi: magia1:=magia2: od: resh1:=[op(resh),y]: magiay:=IETrans(resh1)[nops(resh1)]: RETURN(solve(magiay=MAGIA,y)): end: