RunSort
The permutation with its increasing runs sorted lexicographically.
RunSort(Permutation)The permutation with its increasing runs sorted lexicographically.Typed signatures
| Type | Package | Applies |
|---|---|---|
((binary_word) -> binary_word) & ((permutation) -> permutation) | combinatorics | always |
Details
- Takes a
Permutationand returns aPermutation— 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 aBinaryWord: 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
About
| Examples | 2 |
|---|---|
| Crosswalk | FindStat ×2 |