| Author |
Comment/Response |
Michael
|
11/15/12 8:01pm
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....
URL: , |
|