clear; alpha = [188461, 565383, 696149, 88447, 265341, 796023, 388069, 164207, 492621, 477863, 433589, 300767, 902301]; % a b d e g h i l n o s t u sent = [696318,994738,186634,937474,818450,387210,184092,377231,999091,293830,725605,893049,394922]; dict = [0,0,0,0,0,0,0,0,0,0,0,0,0]; hits = 0; maxlettercount = 1; for h = 0:4 for b = 0:4 for g = 0:4 for d = 0:4 for s = 0:4 for n = 0:4 for l = 0:4 for t = 0:4 for u = 0:4 for o = 0:4 for i = 0:4 for e = 0:4 for a = 0:4 sum = [a,b,d,e,g,h,i,l,n,o,s,t,u]*alpha'; if ismember(mod(sum,1000000),sent) hits=hits+1; dict(hits,:) = [a,b,d,e,g,h,i,l,n,o,s,t,u]; end end end end end end end end end end end end end end