t = {{1, 1, 1, 1}, {0, 0, 0, 0}, {1, 1, 1, 0}, {0, 0, 0, 1}, {1, 1, 0, 1}, {0,<BR> 0, 1, 0}, {1, 0, 1, 1}, {0, 1, 0, 0}, {1, 0, 1, 0}, {0, 1, 0, 1}};<BR>tt = {{1, 0, 0, 0}, {1, 0, 1, 0}, {1, 1, 0, 0}, {1, 0, 0, 1}};<BR>tb = {1, 1, 1, 1};<BR>te = {0, 0, 0, 0};<BR>p = {};<BR>tx = tb;<BR>AppendTo[p, tb];<BR>For[j = 1, j <= 10, j++,<BR> For[i = 1, i <= 4, i++,<BR> tx = tb;<BR> tx = tx + tt[];<BR> For[k = 1, k <= 4, k++,<BR> If[tx[[k]] == 2, tx[[k]] = 0]];<BR> If[MemberQ[t, tx] && (! MemberQ[p, tx]), Print[tt[]]; tb = tx; <BR> AppendTo[p, tb]] ];<BR> <BR> If[tb == te, Break[]] |