Skip to content

RunSort ​

The permutation with its increasing runs sorted lexicographically.

RunSort(Permutation)The permutation with its increasing runs sorted lexicographically.
Typed signatures
TypePackageApplies
((binary_word) -> binary_word) & ((permutation) -> permutation)combinatoricsalways

Domain: Combinatorial maps

Details
  • Takes a Permutation and returns a Permutation — a typed map, so a wrong carrier is a type error rather than a wrong answer.
  • FindStat's Mp00223. Lossy: the runs' order is forgotten.
  • Also takes a BinaryWord, returning a BinaryWord: The word with its weakly increasing runs sorted lexicographically.
  • FindStat's Mp00224. Lossy: the runs' order is forgotten. The runs are the maximal stretches 0...01...1.

Examples

Basic #

the one-line word 231231

live ↗
InRunSort(Permutation⁡([2,3,1]))\mathrm{RunSort}({\operatorname{Permutation}}([2, 3, 1]))OutPermutation⁡([1,2,3]){\operatorname{Permutation}}([1, 2, 3])

the binary word 0110001100

live ↗
InRunSort(BinaryWord⁡([0,1,1,0,0]))\mathrm{RunSort}({\operatorname{BinaryWord}}([0, 1, 1, 0, 0]))OutBinaryWord⁡([0,0,0,1,1]){\operatorname{BinaryWord}}([0, 0, 0, 1, 1])
About
Examples2
CrosswalkFindStat ×2