Inside the Binary Reflected Gray Code: Flip-Swap Languages in 2-Gray Code Order

05/08/2021
by   Joe Sawada, et al.
0

A flip-swap language is a set S of binary strings of length n such that S ∪ 0^n is closed under two operations (when applicable): (1) Flip the leftmost 1; and (2) Swap the leftmost 1 with the bit to its right. Flip-swap languages model many combinatorial objects including necklaces, Lyndon words, prefix normal words, left factors of k-ary Dyck words, and feasible solutions to 0-1 knapsack problems. We prove that any flip-swap language forms a cyclic 2-Gray code when listed in binary reflected Gray code (BRGC) order. Furthermore, a generic successor rule computes the next string when provided with a membership tester. The rule generates each string in the aforementioned flip-swap languages in O(n)-amortized per string, except for prefix normal words of length n which require O(n^1.864)-amortized per string. Our work generalizes results on necklaces and Lyndon words by Vajnovski [Inf. Process. Lett. 106(3):96-99, 2008].

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/05/2020

Generating a Gray code for prefix normal words in amortized polylogarithmic time per word

A prefix normal word is a binary word with the property that no substrin...
research
12/15/2017

Bubble-Flip---A New Generation Algorithm for Prefix Normal Words

We present a new recursive generation algorithm for prefix normal words....
research
05/31/2018

On Prefix Normal Words

We present a new class of binary words: the prefix normal words. They ar...
research
08/17/2018

An Automata-based Abstract Semantics for String Manipulation Languages

In recent years, dynamic languages, such as JavaScript or Python, have f...
research
11/25/2021

On formally undecidable propositions in nondeterministic languages

Any class of languages 𝐋 accepted in time 𝐓 has a counterpart 𝐍𝐋 accepte...
research
04/16/2023

Density Devolution for Ordering Synthetic Channels

Constructing a polar code is all about selecting a subset of rows from a...
research
03/06/2017

Word forms - not just their lengths- are optimized for efficient communication

The inverse relationship between the length of a word and the frequency ...

Please sign up or login with your details

Forgot password? Click here to reset