Skip to content

BinaryBracelets ​

Binary strings of length nn up to rotation AND reflection — the dihedral-group orbits of {0,1}n\{0,1\}^n, a lazy indexed family.

BinaryBracelets(n)the bracelets of nn black-or-white beads on a necklace that can flip.
Typed signatures
TypePackageApplies
(integer<0..>) -> indexed_collection<binary_word>combinatoricsalways

Domain: Collections

Details
  • A lazy indexed collection; the count follows Burnside's lemma over the dihedral group DnD_n — a rotation sum shared with binary necklaces, plus a reflection sum that splits on the parity of nn (OEIS A000029). See Totient, used in the rotation sum.
  • Each element is the lexicographically-least word in its rotation-and-reflection orbit; that canonical word's 1-count is an invariant of the whole orbit.
  • AtAt unranks over these canonical words in ascending lexicographic order.

Statistics

On BinaryWord, called as CombinatorialStat(x, "Name").

Maps

Into and out of BinaryWord, called as CombinatorialMap(x, "Name"). Properties are the laws we state and what FindStat records.

From BinaryWord

  • AlternatingComplementBinaryWord → BinaryWordinvolutionBijectionGraded mapInvolutionMp00158Every second letter swapped for the other, starting with the second.
  • CodeCompositionBinaryWord → IntegerCompositionInjectionGraded mapMp00178The composition whose code is the word with a 1 put in front: each 1 opens a part, of 1 plus the zeros after it.
  • ComplementBinaryWord → BinaryWordinvolutionBijectionGraded mapInvolutionMp00105Each letter swapped for the other: 0 for 1 and 1 for 0.
  • CyclicShiftBinaryWord → BinaryWordinverseBijectionGraded mapMp00135Rotate the word one place to the left: the first letter moves to the end.
  • FinsetBinaryWord → FinsetinverseThe subset of 1..m a binary word of length m marks: the positions holding 1.
  • FlagZerosToZerosBinaryWord → BinaryWordbijectioninverseBijectionGraded mapMp00269The word with as many zeros as this one, prepended with its reverse complement, has occurrences of 10.
  • FoataInversionsToMajorBinaryWord → BinaryWordbijectioninverseBijectionGraded mapMp00316The inverse of Foata's bijection on words: peel off the last letter, rotate the blocks of the rest back.
  • FoataMajorToInversionsBinaryWord → BinaryWordbijectioninverseBijectionGraded mapMp00096Foata's bijection on words: each letter is put on the end of the image so far, which is cut into blocks, and every block is rotated one place right.
  • GrayNextBinaryWord → BinaryWordbijectioninverseBijectionGraded mapMp00272The next word in the Gray code: flip the first letter when the ones are even in number, else the letter after the first one.
  • GrayPreviousBinaryWord → BinaryWordinverseBijectionMp00273The previous word in the Gray code: flip the first letter when the ones are odd in number, else the letter after the first one.
  • IntegerCompositionBinaryWord → IntegerCompositioninverseThe composition of m + 1 a binary word of length m cuts out.
  • InverseCyclicShiftBinaryWord → BinaryWordinverseBijectionGraded mapMp00136Rotate the word one place to the right: the last letter moves to the front.
  • PathRowmotionBinaryWord → BinaryWordbijectionBijectionGraded mapMp00280Rowmotion of the word as a lattice path: the path whose peaks are the original's valleys with an up step appended.
  • ReverseBinaryWord → BinaryWordinvolutionBijectionGraded mapInvolutionMp00104The word read backwards.
  • RowmotionBinaryWord → BinaryWordbijectionBijectionGraded mapMp00278Rowmotion of the word as an order ideal of a product of two chains: the stretches between valleys reversed, each valley written 10.
  • RunCompositionBinaryWord → IntegerCompositionsurjectionSurjectionGraded mapMp00097The lengths of the maximal runs of equal letters, left to right.
  • RunSortBinaryWord → BinaryWordidempotentIdempotentGraded mapMp00224The word with its weakly increasing runs sorted lexicographically.
  • StandardPermutationBinaryWord → PermutationGraded mapMp00336The permutation ranking the letters of the word, equal letters from left to right.
  • TwistBinaryWord → BinaryWordinvolutionBijectionGraded mapInvolutionMp00200The first letter swapped for the other.
  • ValleysToPeaksBinaryWord → BinaryWordGraded mapMp00234Every valley 01 swapped for a peak 10, and a trailing 0 made a 1.
  • ZerosToFlagZerosBinaryWord → BinaryWordbijectioninverseBijectionGraded mapMp00268The word whose reverse complement, prepended, has as many occurrences of 10 as this has zeros.

To BinaryWord

  • BinaryWordDyckPath → BinaryWordInjectionGraded mapMp00093The Dyck word as a binary word: 1 for an up step, 0 for a down step.
  • BinaryWordIntegerPartition → BinaryWordInjectionMp00095The shape's boundary read from the first row down: 1 for a step down, 0 for a step left.
  • BinaryWordFinset → BinaryWordinverseA subset of 1..n as its characteristic word: letter i is 1 when i is a member.
  • CodeWordIntegerComposition → BinaryWordInjectionGraded mapMp00094The word that writes each part i as a one followed by i - 1 zeros.
  • ConnectivityWordPermutation → BinaryWordsurjectionSurjectionGraded mapMp00114Letter i is 1 when the first i entries are all smaller than the rest: the connectivity set as a binary word.
  • CutWordIntegerComposition → BinaryWordinverseA composition of n as the binary word of length n - 1 marking where it is cut.
  • DescentBottomWordPermutation → BinaryWordsurjectionSurjectionGraded mapMp00131Letter v is 1 when value v is a descent bottom: some larger value immediately precedes it.
  • DescentTopWordPermutation → BinaryWordsurjectionSurjectionGraded mapMp00130Letter v - 1 is 1 when value v is a descent top: some smaller value immediately follows it.
  • DescentWordPermutation → BinaryWordsurjectionSurjectionGraded mapMp00109Letter i is 1 when the word falls between positions i and i + 1: the descent set as a binary word.
  • OddPartsWordIntegerPartition → BinaryWordSurjectionMp00317The binary word marking which parts are odd, the parts taken largest first.
  • SignWordSignedPermutation → BinaryWordsurjectionSurjectionGraded mapMp00267The signs as a binary word: letter i is 1 when entry i is negative.
  • TableauDescentWordStandardTableau → BinaryWordsurjectionSurjectionGraded mapMp00134Letter i is 1 when entry i + 1 sits in a lower row than entry i.
2 more in FindStat, not implemented here
  • Mp00261BinaryWord → BinaryWordGraded mapBurrows-Wheeler
  • Mp00262BinaryWord → Posetsposet of factors

Enumeration

Examples

1 more kept as data, checked against the oracles
Basic #

Count(BinaryBracelets(6))=13Count(BinaryBracelets(6)) = 13, A000029

live ↗
InCount(BinaryBracelets(6))\mathrm{Count}(\mathrm{BinaryBracelets}(6))Out1313
Scope #

Exact past 2532^{53}: binary bracelets of 64 beads

live ↗
InCount(BinaryBracelets(64))\mathrm{Count}(\mathrm{BinaryBracelets}(64))Out144 115 191 330 636 810144\,115\,191\,330\,636\,810

Known value · OEIS A000029 b-file

Properties #

The binary bracelets of nn beads, n=0…19n = 0 \dots 19

live ↗
InMap(n↦Count(BinaryBracelets(n)),0..1..19)\mathrm{Map}(n↦\mathrm{Count}(\mathrm{BinaryBracelets}(n)), 0..1..19)Out[1,2,3,4,6,8,13,18,30,46,78,126,224,380,687,1 224,2 250,4 112,7 685,14 310]\bigl\lbrack1, 2, 3, 4, 6, 8, 13, 18, 30, 46, 78, 126, 224, 380, 687, 1\,224, 2\,250, 4\,112, 7\,685, 14\,310\bigr\rbrack

Known value · OEIS A000029

About
Examples4
CrosswalkOEISSymPy

See also: KBracelets, Totient, Count, At