bc=Tuples[{False,True},10]; Length[bc]
LF=Function[{x1,x2,x3,x4,x5,x6,x7,x8,x9,x10},
f1=((x1||(! x2))&&(x3||(!x4))); f2=((x3||(!x4))&&(x5||(!x6)));
f3=((x5||(!x6))&&(x7||(!x8))); f4=((x7||(! x8))&&(x9||(! x10)));
f1&&f2&&f3&&f4];
LFvalues=Table[Apply[LF,bc[[i]]],{i,Range[1,Length[bc],1]}];
Count[LFvalues,True]
1024
243
No comments:
Post a Comment