Upper bound for the number of closed and privileged words Abstract   A nonempty word w is a border of the word u if      w        u      and w is both a prefix and a suffix of u. A word u with the border w is closed if u has exactly two occurrences of w. A word u is privileged if      u    xe2x89xa4  1    or if u contains a privileged border w that appears exactly twice in u.  Peltomaki (2016) presented the following open problem: xe2x80x9cGive a nontrivial upper bound for    B  (  n  )   xe2x80x9d, where    B  (  n  )    denotes the number of privileged words of length n. Let    D  (  n  )    denote the number of closed words of length n. Let    q  u003e  1    be the size of the alphabet. We show that there is a positive real constant c such that     D  (  n  )  xe2x89xa4  c  ln  xe2x81xa1  n      q    n        n      ,    wherexc2xa0  n  u003e  1  .       Privileged words are a subset of closed words, hence we show also an upper bound for the number of privileged words.

Complexity of SuffixFree Regular Languages A sequence ((L_k,L_k1 dots )) of regular languages in some class (mathcal C), where n is the state complexity of (L_n), is called a stream. A stream is most complex in class (mathcal C) if its languages together with their dialects (that is, languages that differ only very slightly from the languages in the stream) meet the state complexity bounds for boolean operations, product (concatenation), star, and reversal, have the largest syntactic semigroups, and have the maximal numbers of atoms, each of which has maximal state complexity. It is known that there exist such most complex streams in the class of regular languages, and also in the classes of right, left, and twosided ideals. In contrast to this, we prove that there does not exist a most complex stream in the class of suffixfree regular languages. However, we do exhibit one ternary suffixfree stream that meets the bound for product and whose restrictions to binary alphabets meet the bounds for star and boolean operations. We also exhibit a quinary stream that meets the bounds for boolean operations, reversal, size of syntactic semigroup, and atom complexities. Moreover, we solve an open problem about the bound for the product of two languages of state complexities m and n in the binary case by showing that it can be met for infinitely many m and n.