AI Glossary / Statistics and probability / Intermediate
Permutations
Definition
Permutations are ordered arrangements of objects. For n distinct objects arranged without replacement in all n positions, there are n factorial possible permutations. Selecting and ordering only k of those objects gives n!/(n minus k)! arrangements. In mathematics, a permutation can also be viewed as a one-to-one rearrangement of a set onto itself.
What it means
Order is the key distinction. Assigning three people to first, second, and third place creates an ordered arrangement; choosing the same three people for an unranked committee creates a combination.
Before counting, decide what makes objects distinct, whether objects may be reused, and whether every position matters. The same visible labels can represent either different underlying objects or indistinguishable categories, producing different counts.
How it works
For a full arrangement of n distinct objects, there are n choices for the first position, n minus one for the next, and so on. Multiplying gives n!. The convention 0! = 1 reflects the single empty arrangement.
For an ordered selection of k distinct objects without replacement, stop the product after k factors. There are n choices, then n minus one, continuing through n minus k plus one. This equals n!/(n minus k)! for integer 0 ≤ k ≤ n.
If order does not matter, each selected group of k objects has k! internal arrangements. Divide the ordered count by k! to obtain the combination count n!/[k!(n minus k)!].
If repetition is allowed independently in each of k positions, the count is n to the power k instead. This is an ordered sequence with replacement, rather than the no-replacement permutation count.
For a full arrangement containing repeated indistinguishable labels, divide n! by the factorial of each label multiplicity. This removes the invisible exchanges among copies of the same label.
Restrictions require additional reasoning. Circular arrangements, forbidden positions, precedence constraints, and objects that must stay together cannot automatically use the unconstrained formula. Specify whether rotations or reflections count as equivalent before counting circular layouts.
In software, a permutation generator may distinguish input items by their positions. If the input contains repeated values, it can therefore emit identical-looking output tuples more than once. Decide whether you want permutations of individual records or unique visible arrangements.
Factorial growth quickly makes exhaustive enumeration expensive. Counting can be much cheaper than listing every arrangement. Randomly sampling arrangements also requires an appropriate algorithm if equal probability is intended; an arbitrary sequence of swaps need not produce a uniform sample.
Three practical examples
- Experiment design: a team considers different orders for presenting tasks to participants.
- AI evaluation: researchers generate permissible label arrangements for a permutation reference distribution.
- Operations: planners count possible assignments of distinct jobs to an ordered sequence of processing slots.
Think of it this way
Think of three podium positions. The same three competitors can occupy the podium in six different orders. If the task is merely choosing which three competitors receive invitations, those six orders represent only one selected group.
Worked example
Suppose five distinct demonstrations are available, but an event has three ordered presentation slots. There are 5 choices for the first slot, 4 for the second, and 3 for the third, giving 5 × 4 × 3 = 60 possible schedules without repetition.
If only the set of demonstrations matters, each selected set appears in 3! = 6 schedules. Therefore, there are 60/6 = 10 unordered selections.
Now consider arranging the four labels A, A, B, and C. Treating the two A copies as indistinguishable gives 4!/2! = 12 distinct visible arrangements. Six begin with A: after fixing the first A, the remaining A, B, and C have 3! = 6 arrangements. Under a uniform choice among the 12 unique arrangements, the probability that the first label is A is 6/12 = 1/2.
A position-based generator sees four underlying items and emits 24 full permutations, with each visible arrangement appearing twice. Deduplicating changes the output count to 12 without changing the mathematical definition of the individual-item permutations.
Illustrative case study
Fictional case: Birch Training rotates demonstrations across workshop sessions. The coordinator first counts 60 possible three-slot schedules, then removes those that violate a prerequisite rule. The team records the restriction and randomizes among the remaining valid schedules instead of assuming all 60 remain feasible. It separately checks whether the resulting presentation balance meets the study's needs.
Common misconceptions and mistakes
Do not use permutation formulas when order is irrelevant. Do not use n! for a selection that fills fewer than n slots without checking the intended arrangement.
Repeated values need explicit treatment: distinct records with identical labels are not necessarily interchangeable for the task.
Counting arrangements does not show that every arrangement has equal probability in the real process.
The word permutation in a statistical test refers to allowed rearrangements under a design or null model. Not every mathematical rearrangement is a valid statistical permutation.
Business use
Permutations help organizations understand scheduling complexity, design balanced evaluations, and reason about rearrangement-based analyses. The main practical value is clarifying constraints before committing to exhaustive search. For large problems, use the count to assess feasibility and then select an appropriate optimization or sampling approach.
People also ask
Are ABC and BAC different permutations?
Yes, when position matters.
Can identical-looking outputs be valid separate software permutations?
Yes, if the generator treats input positions as distinct.
Does a factorial count prove that exhaustive evaluation is necessary?
No. Structure, constraints, optimization, or sampling may make enumeration unnecessary.
Check your understanding
Why are there 60 schedules but only 10 selections in the example?
Answer: Each selected group has six internal orders.
Why divide 4! by 2! for AABC?
Answer: Swapping the two indistinguishable A copies does not create a new visible arrangement.
Related terms
- Combinations
- Permutation test
- Cartesian Product
- combination
- factorial
- ordered selection
- sampling without replacement
- randomization
- combinatorial optimization
Learn next
Learn next how constraints alter counting, how uniform shuffling differs from arbitrary swapping, and how permutation tests select only rearrangements justified by their statistical design.
More in Statistics and probability
- Percentage of agreement - Percentage of agreement is the percentage of comparable observations for which two or more assessments match, under an explicitly stated agreement rule.
- Percentile - A percentile is a value marking a specified cumulative position in a distribution. The 75th percentile, for example, corresponds to cumulative probability 0.75.
- Permutational analysis of variance - Permutational analysis of variance commonly refers to PERMANOVA, or permutational multivariate analysis of variance.
- Persistent failure model - A persistent failure model represents a fault as a state that continues across time, rather than treating each faulty observation as an unrelated accident.
- Phase dispersion minimization - Phase dispersion minimization, usually abbreviated PDM, is a method for finding candidate periods in time-series data.
- Phillips - Perron test - The Phillips - Perron test is a time-series test whose null hypothesis is that a series has a unit root.
Sources
Sources: Python documentation, itertools.permutations, https://docs.python.org/3/library/itertools.html ; Howell, Statistical Methods for Psychology glossary, https://www.uvm.edu/~statdhtx/methods8/Glossary/Glossary.html . These primary developer and author references support ordered-arrangement terminology and software behavior. Counts and repeated-label arrangements were independently enumerated for the original example.
Previous: Permutational analysis of variance Next: Permuterm index