>>>>> "John" == John Toohey <j...@parspro.com> writes:

John> What I needed to do was from a sequence of say, 0 to: 4, produce #(0 0)#(1
John> 1)#(2 2)#(3 3)#(4 4)#(1 0)#(2 1)#(3 2)#(4 3)#(0 4)#(2 0)#(3 1)#(4 2)#(0
John> 3)#(1 4)#(3 0)#(4 1)#(0 2)#(1 3)#(2 4)#(4 0)#(0 1)#(1 2)#(2 3)#(3
John> 4). Basically, I wanted to generate all possible scores for a soccer 
match,
John> hence the 1-1, 0-0, etc.

That's what I did.

You want X, Y for all possible values of X from 0 to 4 and Y from 0 to 4,
right?

That's *not* permutations.

That's *not* combinations.

That's "combinations with replacement/repetition".

... http://en.wikipedia.org/wiki/Combination

I hate it when people use the words permutation or combination without
realizing they have specific math meanings.  But that's not your fault,
but I hope you never do it again. :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<mer...@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion

_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to