Peter Kupfer wrote:

> So, if combin() is nCr, can you check and see if =permute is nPr?

I can't check right this minute. But if it isn't, we've got a problem.  :-)

Try to verify that permute(a;b) == a! / (a-b)!

For example:

permute(5;1) = 5
permute(6;1) = 6
permute(a;1) = a  <<--- all positive integers 'a'.

permute(5;5) = 5! = 5 * 4 * 3 * 2 * 1
permute(a;a) = a! <<--- all positive integers 'a'.

permute(2;2) =   2
permute(3;3) =   6
permute(4;4) =  24
permute(5;5) = 120
permute(6;6) = 720

Cheers,
-- 
Daniel Carrera          | I don't want it perfect,
Join OOoAuthors today!  | I want it Tuesday.
http://oooauthors.org   | 

Reply via email to