iterator? way of generating all possible combinations?
tjreedy at udel.edu
Sat May 27 07:55:54 CEST 2006
<akameswaran at gmail.com> wrote in message
news:1148705122.317512.294540 at i40g2000cwc.googlegroups.com...
> Ok, this is really irritating me. I'm sure there are different ways of
> doing this - I'm interested in the algo, not the practical solution,
> I'm more trying to play with iterators and recursion. I want to create
> a program that generates every possible combination of a set of a n
> dice, with s sides.
Are the dice identical or distinguishable (marked). In other words, with 2
dice, is 1,2 the same as 2,1 or different? Note that in most dice games,
such as craps, the dice are not distinguished, but probability calculations
must treast them as if they were to get the elementary events.
Terry Jan Reedy
More information about the Python-list