function DFSA = shuf2dfsa(str,alf) DFSA.ALF = alf; DFSA.Q = 1:length(str)+1; DFSA.q0 = 1; DFSA.F = [DFSA.Q(end)]; DFSA = init_ddelta(DFSA); for i=1:length(str) q1 = i; q2 = i+1; s = str(i); DFSA = set_ddelta(DFSA,q1,s,q2); for t=setdiff(DFSA.ALF,s) DFSA = set_ddelta(DFSA,q1,t,q1); end end q = length(str)+1; for t=DFSA.ALF DFSA = set_ddelta(DFSA,q,t,q); end return