Complement
Each entry replaced by n + 1 minus itself.
Wikipedia
Complement (set theory)MathWorldComplementationWikidataQ242767Britannicatopic/complement-set-theoryFindStatMp00105via BinaryWordMp00039via IntegerCompositionMp00069via PermutationMp00289via SetCompositionMp00112via SetPartitionMp00188via SignedPermutationComplement(Permutation)Each entry replaced by n + 1 minus itself.Typed signatures
| Type | Package | Applies |
|---|---|---|
((binary_word) -> binary_word) & ((composition) -> composition) & ((permutation) -> permutation) & ((set_composition) -> set_composition) & ((set_partition) -> set_partition) & ((signed_permutation) -> signed_permutation) | combinatoricsreplaces compute-engine | always |
(set<any>+) -> set | compute-engine | always |
Details
- Takes a
Permutationand returns aPermutation— a typed map, so a wrong carrier is a type error rather than a wrong answer. - Also takes a
SignedPermutation, returning aSignedPermutation: Each entry ±i replaced by ±(n + 1 − i), its sign kept. - FindStat's Mp00188.
- Also takes a
SetPartition, returning aSetPartition: Each element i replaced by n + 1 - i: the set partition seen from the other end. - Also takes a
SetComposition, returning aSetComposition: Each element i replaced by n + 1 - i, the blocks staying in their order. - FindStat's Mp00289.
- Also takes a
IntegerComposition, returning aIntegerComposition: The composition cut exactly where this one is not: its cut set complemented. - Reverse then complement is TransposeComposition, and reversing commutes with complementing.
- Also takes a
BinaryWord, returning aBinaryWord: Each letter swapped for the other: 0 for 1 and 1 for 0.
Examples
About
| Examples | 6 |
|---|---|
| Crosswalk | WikipediaMathWorldWikidataBritannicaFindStat ×6 |