| Original Message (ID '129924') By Michael: |
| Try this:
Module[{cnt},
Select[Tuples[Range[6],
5], (Do[cnt[i] = 0, {i, 6}]; cnt[#]++ & /@ #;
Sort[Table[cnt[i], {i, 6}]] === {0, 0, 0, 1, 2,
2}) &]]
There may be a faster way. I can't think how to incorporate the built-in pattern matching.... |
|