#C24.txt, #[FirstNameLastName, Rank,FirstPubDate,NumberOfPublication,NumberOfCitaions,hIndex] Help:=proc() print(`RMP(x,d,K) , RT(x,d,K,n1,n2), RMC(x,d,K,L), EvalMC(L,x,x0)`): print(`Jac(T,x,n1)`): end: Help23:=proc(): print( ` EvalC(L,x,x0)`): print(`RP(x,d,K), RC(x,d,K,n) , EvalCD(L,x,x0) `): end: #RP(x,d,K): a random poly in x of degree k with coefficients from 1 to K do RP:=proc(x,d,K) local ra,i: ra:=rand(1..K): add(ra()*x^i,i=0..d): end: #RC(x,d,K,n): a random chain of length n of poly in x of degree k with coefficients from 1 to K do RC:=proc(x,d,K,n) local i: [seq(RP(x,d,K),i=1..n)]: end: #[x0->x1->x2-> ... ->xn] #EvalC(L,x,x0): inputs a listL of expressions in the variable x and a number x0 #outputs L[n](L[n-1](.... L[1](x0))))))))) mod K: #x0->L[1](x0)->L[2](L[1](x0))-.... EvalC:=proc(L,x,x0) local a,i: a:=x0: for i from 1 to nops(L) do a:=subs(x=a,L[i]): od: a: end: #EvalCD(L,x,x0): inputs a listL of expressions in the variable x and a number x0 #outputs L[n](L[n-1](.... L[1](x0))))))))) followed by the derivative of the composition #at x0: #x0->L[1](x0)->L[2](L[1](x0))-.... #f(g(x))'= f'(g(x))*g'(x) . (F[i](Previous(x)))'(x0)= F[i]'(Previoius(x)|x=x0)* (Previous'(x)|x=x0) EvalCD:=proc(L,x,x0) local a,b,i: a:=x0: b:=1: for i from 1 to nops(L) do b:=b*subs(x=a,diff(L[i],x)) : a:=subs(x=a,L[i]): od: a,b: end: ###end of all stuff #RMP(x,d,K): a random poly in the list of #variables x of degree d with coefficients from 1 to K do RMP:=proc(x,d,K) local i,x1,ra: #ra:=rand(1..K): if nops(x)=1 then RETURN(RP(x[1],d,K)): else x1:=[op(1..nops(x)-1,x)]: RETURN(expand(add(x[nops(x)]^i*RMP(x1,d,K),i=0..d))): fi: end: #RT(x,d,K,n1,n2): inputs a LETTER x, integers d and K and pos. integers n1, n2 #outputs a RANDOM POLYNOMIAL TRANSORMATIONM from R^n1 to R^n2 of degree d #using the variables x[1], .., x[n1] RT:=proc(x,d,K,n1,n2) local i,j: [seq(RMP([seq(x[i],i=1..n1)],d,K),j=1..n2)]: end: #RMC(x,d,K,L): a random chain of poly transformations of length n of #of degree k with coefficients from 1 to K starting at L[1]-dim space #and ending at L[n+1] dimensional space RMC:=proc(x,d,K,L) local i,n: n:=nops(L)-1: [seq(RT(x,d,K,L[i],L[i+1]),i=1..n)]: end: #EvalMC(L,x,x0): inputs a vector x0 and a chain of transformations L and #a letter x (indicationg that our variables are x[1],x[2], ...) #outputs the output of the chain EvalMC:=proc(L,x,x0) local y0,i1,i2,i3: y0:=x0: for i1 from 1 to nops(L) do y0:=subs({seq(x[i2]=y0[i2],i2=1..nops(y0))},L[i1]): od: y0: end: #Jac(T,x,n1),inputs a transformation T from R^n1 to R^nops(T) outputs #the Jacobian the n1 by nops(T) matrix (symbolically) in terms of x[1], ... Jac:=proc(T,x,n1) local i,j: [seq([seq(diff(T[i],x[j]),j=1..n1)],i=1..nops(T))]: end: #Comp(T1,T2,n1,x): inputs transformations T1 from n1-dim space to nops(T1)-dim space #and T2 from nops(T1)-dim space to nops(T2)-dim space, outputs the Jacobian #of the composition Comp:=proc(T1,T2,n1,n2,n3) end: