A permutation is an
arrangement of a
set of objects, or specifically an arrangement of a
subset of a certain
size of some set of objects. For instance, there are 20 permutations of two letters from the set {A, B, C, D, E}, namely AB, AC, AD, AE, BA, BC, BD, BE, CA, CB, CD, CE, DA, DB, DC, DE, EA, EB, EC, and ED. There are 5 ways to choose the first letter, and for each first letter, four ways to choose a second letter.
The number of permutations of r objects from a set of n objects is often written as P(n,r) or nPr, and can be calculated as n!/(n-r)! where ! represents the factorial function.
Permutations are closely related to combinations.