Recursive and iterative approaches to generate rotation Gray codes for stamp foldings and semi-meanders

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Liu, Bowie, Wong, Dennis, Lam, Chan-Tong, Im, Marcus
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866913574375391232
author Liu, Bowie
Wong, Dennis
Lam, Chan-Tong
Im, Marcus
author_facet Liu, Bowie
Wong, Dennis
Lam, Chan-Tong
Im, Marcus
contents We first present a simple recursive algorithm that generates cyclic rotation Gray codes for stamp foldings and semi-meanders, where consecutive strings differ by a stamp rotation. These are the first known Gray codes for stamp foldings and semi-meanders, and we thus solve an open problem posted by Sawada and Li in [Electron. J. Comb. 19(2), 2012]. We then introduce an iterative algorithm that generates the same rotation Gray codes for stamp foldings and semi-meanders. Both the recursive and iterative algorithms generate stamp foldings and semi-meanders in constant amortized time and $O(n)$-amortized time per string respectively, using a linear amount of memory.
format Preprint
id arxiv_https___arxiv_org_abs_2411_05458
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Recursive and iterative approaches to generate rotation Gray codes for stamp foldings and semi-meanders
Liu, Bowie
Wong, Dennis
Lam, Chan-Tong
Im, Marcus
Data Structures and Algorithms
We first present a simple recursive algorithm that generates cyclic rotation Gray codes for stamp foldings and semi-meanders, where consecutive strings differ by a stamp rotation. These are the first known Gray codes for stamp foldings and semi-meanders, and we thus solve an open problem posted by Sawada and Li in [Electron. J. Comb. 19(2), 2012]. We then introduce an iterative algorithm that generates the same rotation Gray codes for stamp foldings and semi-meanders. Both the recursive and iterative algorithms generate stamp foldings and semi-meanders in constant amortized time and $O(n)$-amortized time per string respectively, using a linear amount of memory.
title Recursive and iterative approaches to generate rotation Gray codes for stamp foldings and semi-meanders
topic Data Structures and Algorithms
url https://arxiv.org/abs/2411.05458