CodeComposition
The composition whose code is the word with a 1 put in front: each 1 opens a part, of 1 plus the zeros after it.
FindStat
Mp00178via BinaryWordCodeComposition(BinaryWord)The composition whose code is the word with a 1 put in front: each 1 opens a part, of 1 plus the zeros after it.Typed signatures
| Type | Package | Applies |
|---|---|---|
(binary_word) -> composition | combinatorics | always |
Details
- Takes a
BinaryWordand returns aIntegerComposition— a typed map, so a wrong carrier is a type error rather than a wrong answer. - FindStat's Mp00178, Sage's from_code. An injection one size up (the empty composition has no preimage); the inverse of CodeWord on the words that start with 1. Not IntegerComposition, whose word marks the cuts.
Examples
About
| Examples | 1 |
|---|---|
| Crosswalk | FindStat |