Computing the Hamming Distance of a Regular Language in Quadratic Time

Given an arbitrary (nondeterministic) finite state automaton A we consider the problem of computing the Hamming distance of the language L(A) that is accepted by the automaton. This quantity is simply the minimum Hamming distance between any pair of distinct words from the language L(A). We show an algorithm that solves the problem in time quadratic with respect to the size of the given automaton. To our knowledge, this problem has not been addressed before. Key-Words: automata, Hamming distance, regular language, shortest-path algorithm.