ReverseComplement
Reverse, then complement.
FindStat
Mp00028via DyckPathReverseComplement(Permutation)Reverse, then complement.Typed signatures
| Type | Package | Applies |
|---|---|---|
((dyck_path) -> dyck_path) & ((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. - Defined as a COMPOSITION, applied right to left: Complement after Reverse. Each step goes through its own declared head, so every intermediate value is a properly constructed carrier.
- A thin alias over Compose(Complement, Reverse). The catalog has the name, so we keep it — but the name is not what makes it work, and nothing stops a reader writing the composition directly.
- Also takes a
DyckPath, returning aDyckPath: The path read backwards, with ups and downs swapped: its mirror image across the vertical. - FindStat's "reverse" for Dyck paths: reading the steps backwards alone would leave the word's ups and downs unbalanced, so each step is also swapped.
Examples
About
| Examples | 2 |
|---|---|
| Crosswalk | FindStat |
See also: Complement, Reverse