Combinations and permutations: Difference between revisions
Content deleted Content added
m →{{header|Tcl}}: Some notes |
m tidy up description |
||
Line 1:
{{draft task|Probability and statistics}}{{draft task|Discrete math}}
{{wikipedia|Combination}} {{wikipedia|Permutation}}
Implement the [[wp:Combination|combination]] (<sup>n</sup>C<sub>k</sub>) and [[wp:Permutation|permutation]] (<sup>n</sup>P<sub>k</sub>)
* <math> ^nC_k =\binom nk = \frac{n(n-1)\ldots(n-k+1)}{k(k-1)\dots1} </math>
* <math>^nP_k = n\cdot(n-1)\cdot(n-2)\cdots(n-k+1)</math>
* Permutations from 1 to 12 and Combinations from 10 to 60 using exact Integer arithmetic.
* Permutations from 5 to 15000 and Combinations from 100 to 1000 using approximate Floating point arithmetic.
=={{header|ALGOL 68}}==
|