471,092 Members | 1,020 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,092 software developers and data experts.

Help on permutation and combination.

Need coding for a program where given positive integers n and r, to find the number of r-permutations when repetition is allowed and r-combinations when repetition is allowed of the ser with n-element. the program should accept user's input and list down the r-permutations and r-combinations in lexicographic order.
...really desperate for help..thanks!
Oct 16 '06 #1
1 4333
293 100+
Some formulas may help.

nPr or P(n,r) = n! / (n-r)!

nCr or C(n,r) = n! / r!(n-r)!

In other words, (nCr * r!) = nPr.
Oct 17 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

20 posts views Thread by drs | last post: by
10 posts views Thread by Talin | last post: by
2 posts views Thread by lucotuslim | last post: by
1 post views Thread by user | last post: by
27 posts views Thread by onkar | last post: by
20 posts views Thread by sophia | last post: by
reply views Thread by viza | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.