Help:=proc(): print(` STAB(VOC,R) , TRA(L), CP1(VOC,L), ALLSQ(VOC,K), ALLSQc(VOC,L), RANCON1(VOC1,L), RANCON(VOC1,L) , MakePuz(VOC,L,K1)`): end: read `EV3.txt`: read `EV4.txt`: read `EV5.txt`: #STAB(VOC,R): The starting table of the vocubulary list VOC of length R, returns the set of prefixes followed by the table STAB:=proc(VOC,R) local S,S1,I1,T,W1: option remember: S:={seq([op(1..R,VOC[I1])],I1=1..nops(VOC))}: for S1 in S do T[S1]:={}: od: for I1 from 1 to nops(VOC) do W1:=VOC[I1]: T[[op(1..R,W1)]]:= T[[op(1..R,W1)]] union {W1}: od: S,op(T): end: TRA:=proc(L) local I1,J1: [seq([seq(L[J1][I1],J1=1..nops(L))],I1=1..nops(L[1]))]: end: #CP1(VOC,L): inputs a vocabulary VOC of words of the same length and a list of words that is promising #finds the set of promising extensions. Try #CP1(ENGLISH3,[[a,p,e]]); CP1:=proc(VOC,L) local I1,M1,L1,ST,CHILD,M: if convert(L,set) minus convert(VOC,set)<>{} then RETURN(FAIL): fi: if L=[] then {seq([VOC[I1]],I1=1..nops(VOC))}: fi: L1:=TRA(L): ST:=STAB(VOC,nops(L))[1]: if convert(L1,set) minus ST<>{} then RETURN({}): fi: ST:=STAB(VOC,nops(L)+1)[1]: CHILD:={}: for I1 from 1 to nops(VOC) do M:=[op(L),VOC[I1]]: M1:=TRA(M): if convert(M1,set) minus ST={} then CHILD:=CHILD union {M}: fi: od: CHILD: end: #ALLSQ(VOC,K): all the Word squares of size K ALLSQ:=proc(VOC,K) local S,I1,N1: S:={seq([VOC[I1]],I1=1..nops(VOC))}: for N1 from 2 to K do S:={seq(op(CP1(VOC,S[I1])),I1=1..nops(S))}: od: S: end: #ALLSQc(VOC,L): all the continuations of L ALLSQc:=proc(VOC,L) local K,N1,I1,S: K:=nops(L[1]): S:={L}: for N1 from nops(L)+1 to K do S:={seq(op(CP1(VOC,S[I1])),I1=1..nops(S))}: od: S: end: #RANCON1(VOC,L): a random contiuation of L RANCON1:=proc(VOC,L) local NEW1: NEW1:=CP1(VOC,L): if NEW1={} or NEW1=FAIL then RETURN(FAIL): fi: NEW1[rand(1..nops(NEW1))()]: end: RANCON:=proc(VOC,L) local K,L1,L2: K:=nops(VOC[1]): L1:=L: while L1<>FAIL and nops(L1)