For a word over a totally ordered alphabet, an inversion of a word is a pair of positions with . Equal symbols contribute no inversion of a word. In
baba, with , the pairs are , so the word inversion number is three. Counting these pairs records distance from sorted order even when letters repeat; replacing the letters by distinct ordered labels gives the inversion of a permutation case.The number of inversions of a word: pairs of positions with . Unlike an inversion of a permutation, this definition permits repeated letters in the word.
Articles by others on the same topic
There are currently no matching articles.