Permutation (nPr) and Combination (nCr) calculator uses total number of objects `n` and sample size `r`, `r\leq n`, and calculates permutations or combinations of a number of objects `r`, are taken from a given set `n`. It is an online math tool which determines the number of combinations and permutations that result when we choose `r` objects from a set of `n` objects. It is necessary to follow the next steps:
The field of mathematics which studies different possibilities for the arrangement of objects is called combinatorics. For example, if we buy three different books in a different order, how many elements would the corresponding sample space have? Denoting them $1, 2,$ and $3,$ the sample space is
$$\Omega =\{123,132,213,231,312,321\}$$
What is Permutation?
The permutation or shorter nPr is the number of ways in which we can choose `r (r\leq n)` different objects out of a set containing `n` different objects, where the order of the elements is important. In our example, there are $6$ possible permutations of $3$ different objects. The symbol $P(n, r)$ denotes the number of permutations of `n` objects taken all at once. The symbol $P(n, r)$ denotes the number of permutations of `n` objects taken `r` at a time.
What is Combination?
The combination or shorter nCr it is the number of ways in which we can choose `r` objects out of a set containing `n` different objects such that (unlike permutations) the order of selection does not matter. The symbol $C(n, r)$ denotes the number of combinations of `n` objects taken `r` at a time.
For example, Ann has five coins in his bag and pulls out three at one time. How many different amounts can she get?
Permutation: If we choose the $n^{th}$ object out of a set containing `n` different objects, then it can be choose in any of `n` positions in any of the permutations of $(n-1)$ objects. Further, if we choose the $(n-1)^{th}$ object out of a set containing $(n-1)$ different objects, then it can be choose in any of $(n-1)$ positions in any of the permutations of $(n-2)$ objects, etc. Therefore there are $$n\times(n-1)\times(n-2)\ldots\times 2\times 1=n!$$ possible permutations of `n` objects. $n!$ is read "`n` factorial" ant it is the standard notation for this product. According to the agreement is $0! = 1.$ If we want to choose `r` different objects out of an ordered list of `n` objects, and the order in which we choose the objects matters, then for the first object we have `n` possibilities, and no matter which object we chose, for the second one there are $n-1$ possibilities, for the third there are $n-2$ possibilities, and so on, with $n-(r-1)$ possibilities for the $r^{th}$. Hence, there are $P(n,r)$ ways to choose the `r` objects.
The users may refer the below table for quick reference to check what are all the permutations and combinations for n distinct objects taken r at a time. To verify the calculation, use the above nPr and nCk calculator.
Objects | nPr |
---|---|
2P1 | 2 |
2P2 | 2 |
3P1 | 3 |
3P2 | 6 |
3P3 | 6 |
4P1 | 4 |
4P2 | 12 |
4P3 | 24 |
4P4 | 24 |
5P1 | 5 |
5P2 | 20 |
5P3 | 60 |
5P4 | 120 |
5P5 | 120 |
6P1 | 6 |
6P2 | 30 |
6P3 | 120 |
6P4 | 360 |
6P5 | 720 |
6P6 | 720 |
n-CHOOSE-k | nCk |
---|---|
2 choose 1 | 2 |
2 choose 2 | 1 |
3 choose 1 | 3 |
3 choose 2 | 3 |
3 choose 3 | 1 |
4 choose 1 | 4 |
4 choose 2 | 6 |
4 choose 3 | 4 |
4 choose 4 | 1 |
5 choose 1 | 5 |
5 choose 2 | 10 |
5 choose 3 | 10 |
5 choose 4 | 5 |
5 choose 5 | 1 |
6 choose 1 | 6 |
6 choose 2 | 15 |
6 choose 3 | 20 |
6 choose 4 | 15 |
6 choose 5 | 6 |
6 choose 6 | 1 |
The below solved example problem may useful to understand how the values are being used in permutations P(n,r) & combinations C(n,r) calculation by using the above formulas.
Example Problem 1
Find the number of different permutations nPr & combinations nCr of a box containing 6 distinct colour balls taken 3 at a time?
Solution
Data given
n = 6
r = 3
Step by step calculation
formula to find permutation nPr = n!/(n-r)!
n! = 6! = 6 x 5 x 4 x 3 x 2 x 1
n! = 720
(n - r)! = 3! = 3 x 2 x 1
(n - r)! = 6
r! = 3! = 3 x 2 x 1
r! = 6
substitute the values
= 720/6
nPr = 120
formula to find combination nCr = n!/(r!(n-r)!)
substitute the above values
= 720/(6 x 6)
nCr = 20
Example Problem 2
How to solve 5 choose 2?
Solution:
Data given
n = 5 and r = 2
nCr = n!/(r!(n-r)!) = 5!/(2! x 3!)
= (4 x 5)/(1 x 2) = 10
Hence, 5 choose 2 is 10.
Example Problem 3
How many 4 digit numbers can be formed using 4 digits?
24 different numbers can be obtained from 4 single digit numbers.
4 x 3 x 2 x 1 = 24
The use of permutations and combinations in mathematics and computer science is huge. Especially, they are often mentioned in graph theory, probability, geometry, etc. Discrete mathematics is one of the most important field in computer science. There are so many applications to graph theory, for example, Facebook uses many concepts of graph theory. nPr and nCk are used frequently to solve simple probability and geometry problems. For example, how many lines are determined by $15$ points, such that $4$ of them are collinear? Permutations and combinations are also useful in Bank Locker Safe, Door locks and Passwords.
Practice Problem 1 : The board of directors of some company is composed of
$10$ members. In how many ways can they select a chairperson, vice-chairperson and secretary, if one person cannot hold more than one office?
Practice Problem 2 : At a school, there are $15$ names on the ballot for handball team. Six will be selected to form a team. How many different teams of 6 can be formed?
The permutation and combination calculator, formula, example calculation (work with steps), real world problems and practice problems would be very useful for grade school students (K-12 education) to understand the main concept of combinatorics. This concept can be of significance in many fields of science and real life.