Permutation Distances Explorer
This explorer lets you compare permutations using multiple distance metrics (Hamming, Kendall tau, Spearman footrule, Cayley, Euclidean L1/L2). Select permutation length and distance metrics, then select permutations to compare. This tool is inspired by the permutohedron demo, but works for any array length. Use it to understand how different metrics capture similarity between rankings, as in CliftonStrengths or other domains.
Configuration
false
Load Permutations JSON
No file loaded
Educational Notes
Permutations Grid
4
Permutation Length
24
Permutations
24
Permutations Shown
0
Selected
Available Permutations
Click to select arrays for comparison (max 120)A01[01,02,03,04]
A02[01,02,04,03]
A03[01,03,02,04]
A04[01,03,04,02]
A05[01,04,02,03]
A06[01,04,03,02]
A07[02,01,03,04]
A08[02,01,04,03]
A09[02,03,01,04]
A10[02,03,04,01]
A11[02,04,01,03]
A12[02,04,03,01]
A13[03,01,02,04]
A14[03,01,04,02]
A15[03,02,01,04]
A16[03,02,04,01]
A17[03,04,01,02]
A18[03,04,02,01]
A19[04,01,02,03]
A20[04,01,03,02]
A21[04,02,01,03]
A22[04,02,03,01]
A23[04,03,01,02]
A24[04,03,02,01]
Distance Matrices
NearFar
(Color = distance)
View and compare pairwise distance matrices for your selected permutations using the chosen metrics. Each matrix cell shows the distance between two permutations. Export matrices as SVG for further analysis or sharing.
Kendall Tau Distance(min: Infinity, max: -Infinity)
Select at least two permutations to compare Kendall Tau distances.
Spearman Footrule Distance(min: Infinity, max: -Infinity)
Select at least two permutations to compare Spearman Footrule distances.
Euclidean (L2) Distance(min: Infinity, max: -Infinity)
Select at least two permutations to compare Euclidean (L2) distances.
Distance Metric Results and Descriptions
All pairs: 276 distances
Hover any bin to see its range, count, percent, and [Max count] for the most frequent bin.
Hamming: Number of positions where elements differmin 2 max 4
min 2 max 4
Select 2+ arrays to see calculations
Kendall Tau: Number of pairwise disagreements (inversions)min 1 max 6
min 1 max 6
Select 2+ arrays to see calculations
Spearman Footrule: Sum of absolute differences in positions. Equivalent to Manhattan (L1) distance for permutations.min 2 max 8
min 2 max 8
Select 2+ arrays to see calculations
Cayley: Minimum number of transpositions to convert a to bmin 1 max 3
min 1 max 3
Select 2+ arrays to see calculations
Euclidean (L2): Euclidean (L2) distance between permutationsmin 1.41 max 4.47
min 1.41 max 4.47
Select 2+ arrays to see calculations
Positional Weighted Kendall Tau: Weighted sum of discordant pairs, each weighted by |i-j|min 2 max 20
min 2 max 20
Select 2+ arrays to see calculations