A finite word is closed if it contains a factor that occurs both as a prefix and
as a suffix but does not have internal occurrences, otherwise it is open. We are
interested in the oc-sequence of a word, which is the binary sequence whose
*n*-th …
A finite word is closed if it contains a factor that occurs both as a prefix and
as a suffix but does not have internal occurrences, otherwise it is open. We are
interested in the oc-sequence of a word, which is the binary sequence whose
*n*-th …
In this paper, we give some new characterizations of words which are finite
factors of Sturmian words. An enumeration formula for primitive finite Sturmian
words is given. Moreover, we provide two linear-time algorithms to recognize
whether a …