fixed permutation
Calculates the number of permutations of \e n objects with \e m fixed.
Controller: CodeCogs
Dependents
Interface
C++
Excel
Fixed Permutation
intfixed_permutation( | int | n | |
int | m | ) |
References:
SUBSET, a C++ library of combinatorial routines, http://www.csit.fsu.edu/~burkardt/cpp_src/subset/subset.htmlExample 1
#include <codecogs/maths/combinatorics/sequences/fixed_permutation.h> #include <iostream> int main() { std::cout << "The number of permutations of 10 elements with 5 fixed is: "; std::cout << Maths::Combinatorics::Sequences::fixed_permutation(10, 5) << std::endl; return 0; }
Output
The number of permutations of 10 elements with 5 fixed is: 11088
Parameters
n the size of the permutation m the number of fixed objects
Returns
- the number of permutations of n items with m fixed
Authors
- Lucian Bentea (August 2005)
Source Code
Source code is available when you agree to a GP Licence or buy a Commercial Licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.