pysiglib.lyndon_words_of_length#
Added in version v1.1.0.
- lyndon_words_of_length(alphabet_size, length)[source]#
Returns all Lyndon words of a given length.
- Parameters:
alphabet_size (int) – Size of the alphabet.
length (int) – Length of words.
- Returns:
All Lyndon words of the given length.
- Return type:
list[tuple[int, …]]
Example:#
import pysiglib # All Lyndon words of length 3 over alphabet {0, 1} w = pysiglib.lyndon_words_of_length(2, 3) print(w) # [(0, 0, 1), (0, 1, 1)]
Citation#
If you found this library useful in your research, please consider citing the paper:
@article{shmelev2025pysiglib,
title={pySigLib-Fast Signature-Based Computations on CPU and GPU},
author={Shmelev, Daniil and Salvi, Cristopher},
journal={arXiv preprint arXiv:2509.10613},
year={2025}
}