lexicographic order

views updated

lexicographic order The order of words in a dictionary, given the order of letters in the alphabet. In general, let a set S be well-ordered by relation <, and for n > 0 let T be a set of n-tuples (x1,x2,…,xn)

of elements xj in S. Then the ordering relation < over such n-tuples can be defined so that (x1,…,xn) < (y1,…,yn)

iff x1 < y1 or there is some k, 1 ← k n, for which xi = yi for 1 ← i < k xk < yk

The set T is in lexicographic order if the n-tuples are sorted with respect to this relation. The concept can be extended to strings whose lengths may be different. The order would then be that in which words are placed in a dictionary.