Sawada and Williams in [SODA 2018] and [ACM Trans. Alg. 2020] gave algorithms for constructing Hamiltonian paths and cycles in the Sigma-Tau graph, thereby solving a problem of Nijenhuis and Wilf that had been open for over 40 years. The Sigma-Tau graph is the di- rected graph whose vertex set consists of all permutations of n, and there is a directed edge from π to π′ if π′ can be obtained from π either by a cyclic left-shift (sigma) or by exchanging the first two entries (tau). We improve the existing algorithms from O(n) time per permutation to O(1) time per permutation. Moreover, our algorithms require only O(1) extra space. The result is the first combinatorial generation algorithm for n-permutations that is optimal in both time and space, and which lists the objects in a Gray code order using only two types of changes.

Constant Time and Space Updates for the Sigma-Tau Problem

Zsuzsanna Liptak;Francesco Masillo;
2023-01-01

Abstract

Sawada and Williams in [SODA 2018] and [ACM Trans. Alg. 2020] gave algorithms for constructing Hamiltonian paths and cycles in the Sigma-Tau graph, thereby solving a problem of Nijenhuis and Wilf that had been open for over 40 years. The Sigma-Tau graph is the di- rected graph whose vertex set consists of all permutations of n, and there is a directed edge from π to π′ if π′ can be obtained from π either by a cyclic left-shift (sigma) or by exchanging the first two entries (tau). We improve the existing algorithms from O(n) time per permutation to O(1) time per permutation. Moreover, our algorithms require only O(1) extra space. The result is the first combinatorial generation algorithm for n-permutations that is optimal in both time and space, and which lists the objects in a Gray code order using only two types of changes.
2023
Inglese
STAMPA
Comitato scientifico
14240
30th International Symposium on String Processing and Information Retrieval (SPIRE 2023)
Pisa, Italy
Sept. 26-28, 2023
Internazionale
Proc. of the 30th International Symposium on String Processing and Information Retrieval (SPIRE 2023)
Springer
978-3-031-43979-7
323
330
8
26
permutations, sigma-tau problem, dynamic data structures, combinatorial generation, combinatorial Gray codes
restricted
Liptak, Zsuzsanna; Masillo, Francesco; Navarro, Gonzalo; Williams, Aaron
4
04 Contributo in atti di convegno::04.01 Contributo in atti di convegno
273
info:eu-repo/semantics/conferenceObject
File in questo prodotto:
File Dimensione Formato  
978-3-031-43980-3_26.pdf

solo utenti autorizzati

Tipologia: Versione dell'editore
Licenza: Copyright dell'editore
Dimensione 396.61 kB
Formato Adobe PDF
396.61 kB Adobe PDF   Visualizza/Apri   Richiedi una copia

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11562/1105806
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 4
  • ???jsp.display-item.citation.isi??? 2
social impact