%0 Journal Article %A Burcsi, Peter %A Fici, Gabriele %A Liptak, Zsuzsanna %A Raman, Rajeev %A Sawada, Joe %D 2020 %T Generating a Gray code for prefix normal words in amortized polylogarithmic time per word %U https://figshare.le.ac.uk/articles/journal_contribution/Generating_a_Gray_code_for_prefix_normal_words_in_amortized_polylogarithmic_time_per_word/12543377 %2 https://figshare.le.ac.uk/ndownloader/files/23325074 %K prefix normal words %K binary languages %K combinatorial Gray code %K combinatorial generation %K jumbled pattern matching %X A prefix normal word is a binary word with the property that no substring has more 1s than the prefix of the same length. By proving that the set of prefix normal words is a bubble language, we can exhaustively list all prefix normal words of length nas a combinatorial Gray code, where successive strings differ by at most two swaps or bit flips. This Gray code can be generated in O (log2n) amortized time per word, while the best generation algorithm hither to has O (n) running time per word. We also present a membership tester for prefix normal words, as well as a novel characterization of bubble languages. %I University of Leicester