read `ENG.txt`: Help:=proc(): print(` ANAG(S,A) , CAT(L), CATS(SL) `): end: #ANAG(S,A) ANAG:=proc(S,A) local S1,Ss,T,B,LI: S1:=[]: for Ss in S do if nops(Ss)=A then S1:=[op(S1),sort(Ss)]: T[sort(Ss)]:=[]: fi: od: for Ss in S do if nops(Ss)=A then T[sort(Ss)]:=[op(T[sort(Ss)]),Ss]: fi: od: LI:=[]: for B from 1 to nops(S1) do if nops(T[S1[B]])>1 then LI:=[op(LI), T[S1[B]] ]: fi: od: convert(LI,set): end: #CAT(L): converts a list of letters to a word CAT:=proc(L) local B: cat(seq(L[B],B=1..nops(L))): end: CATS:=proc(SL) local B: seq(CAT(SL[B]),B=1..nops(SL)): end: