(* complete dictionary of words, one per row, number of rows is (alpha^word), using words of length "word" and an alphabet of "alpha" number of characters *)

alpha = 4; word = 3; dict =.;

dict = Partition[Flatten[Tuples[Reverse[IdentityMatrix[alpha]], word]], (alpha*word)];

PseudoInverse[dict] == ((Transpose[dict])*((alpha)^-(word - 1))) - ((word - 1)/(alpha^word)/word)

Output = True

An equation editor format is here if you can't read Mathematica:

http://www.youvan.com/Examples/Example_18._Rapid_PseudoInverse_for_Scroll_Matrices.html

More Douglas C Youvan's questions See All
Similar questions and discussions