In mathematics, a lattice word, or lattice permutation, is a string composed of positive integers in which every prefix contains at least as many integers i as integers i + 1.
A reverse lattice word, or Yamanouchi word (named after Takahiko Yamanouchi), is a string whose reversal is a lattice word.
For example, 11122121 is a lattice word, so its reversal 12122111 is a Yamanouchi word. However, 12122111 is not a lattice word since the prefix 12122 contains more 2s than 1s.