GrayPrevious
The previous word in the Gray code: flip the first letter when the ones are odd in number, else the letter after the first one.
FindStat
Mp00273via BinaryWordGrayPrevious(BinaryWord)The previous word in the Gray code: flip the first letter when the ones are odd in number, else the letter after the first one.Typed signatures
| Type | Package | Applies |
|---|---|---|
(binary_word) -> binary_word | combinatorics | always |
Details
- Takes a
BinaryWordand returns aBinaryWord— a typed map, so a wrong carrier is a type error rather than a wrong answer. - FindStat's Mp00273, the inverse of GrayNext. The zero word gets its last letter flipped.
Examples
About
| Examples | 1 |
|---|---|
| Crosswalk | FindStat |