Number of permutations calculator A(n,r)
🎲 Factorials, permutations and combinations
💡 Instructions for use
- If only n is filled in and r is not filled in, only the factorial is output; if both are filled in, the number of permutations and combinations will be given at the same time, which is suitable for checking together.
- The input is calculated precisely with large integers: the factorial of 1000 has over two thousand digits, without scientific notation or loss of precision.
- The result area will automatically check two identities: the factorial of the combination number multiplied by r is equal to the permutation number; C(n,r) is equal to C(n,n-r).
- r must not be greater than n, otherwise the input error will be prompted; when n is 0, the factorial is 1, which conforms to mathematical conventions.
The number of permutations calculator specifically calculates A(n,r): the number of options that take r elements from n and arrange them in order. Different results are calculated in different orders.
Direct multiplication is a more trouble-free algorithm
A(n,r) is equal to the multiplication of r consecutive integers starting from n. For example, A(5,2) is equal to 5 times 4 which is equal to 20. It is equivalent to n! divided by (n-r)!, but the direct multiplication avoids calculating two large factorials first, and the intermediate value is much smaller and less error-prone. The tool will simultaneously provide n!, (n-r)! and A(n,r) in the result area, making it easy to compare the two ways of writing the formula.
The relationship between arrangement and combination
- A(n,r) is equal to C(n,r) times the factorial of r, that is, choose first and then queue.
- When r equals n, it is a total permutation, and the number of species is the factorial of n.
- When r equals 1 the number of permutations is the same as n because there is only one permutation for each element.
The number of permutations focuses on "how to arrange", and different results will be calculated in different orders. Queuing, seating arrangements, and password bit combinations are all permutation problems, and their values must not be less than the number of combinations of the same parameters.
The relationship between the two is: the number of permutations is equal to the number of combinations multiplied by all permutations of the selected objects. Remember this relationship, and you can figure it out by yourself even if you forget the formula.
Queuing and seating arrangements are permutations. Different orders are considered different results, so the number of results must not be less than the corresponding number of combinations.
The relation check line will verify "whether the factorial of the combination number multiplied by r is equal to the permutation number."
📖 Glossary
- factorial
- The continuous product from 1 to n, written n!, stipulates that 0! is equal to 1.
- arrange
- Take r elements from n different elements and arrange them in a column in order. Different results will be calculated in different orders.
- combination
- Select r elements from n different elements, only looking at which ones are selected, not the order.
- Number of permutations A(n,r)
- The number of permutations is equal to the factorial of n divided by the factorial of (n-r), which can also be written as the multiplication of r consecutive numbers starting from n.
- Number of combinations C(n,r)
- The number of combinations is equal to the factorial of n divided by the factorial of r and the factorial of (n-r), often written as a binomial coefficient.
- Symmetry
- The number of combinations satisfies C(n,r) = C(n,n-r): there is a one-to-one correspondence between selecting r and leaving n-r.
- recursion formula
- C(n,r) = C(n-1,r-1) + C(n-1,r), which is the generation rule of Yang Hui's triangle.
- Yang Hui triangle
- A triangular number table obtained by arranging the combination numbers in n rows. The two ends of each row are 1, and the middle is the sum of the two numbers above.
- Full arrangement
- The arrangement when r is equal to n, the number of species is the factorial of n, represents the number of options to queue all elements.
- large integer
- An integer outside the range of ordinary floating point precision. The factorial grows extremely fast, and starting from n 21 is beyond the range that can be accurately represented by double precision.
🔗 All keywords and tutorials
❓ FAQ
- What is A(5,2)?
- 20 equals 5 × 4. If you only look at the selection method and not the order, it is C(5,2) = 10, and the difference between the two is 2! times.
- How to calculate the full arrangement?
- Just fill in r with the same value as n, and the result is the factorial of n; you can also just fill in n to view the factorial value.