Words in lexicographic order (wilo)¶
The function wilo can be used to iterate through words in lexicographic
order in some range.
- wilo(n: int, upper_bound: int, first: List[int], last: List[int]) Iterator¶
Returns an iterator to words in lexicographic order (wilo).
- Parameters
- Returns
An iterator to words in lexicographic order over an alphabet with
nletters of length at mostupper_boundin the range[first, last).
>>> from libsemigroups_pybind11 import wilo >>> list(wilo(2, 3, [0], [1, 1, 1])) [[0], [0, 0], [0, 1], [1], [1, 0], [1, 1]]