Imre Simon
Quinta-feira, 4 de dezembro de 2003, 14:00
Sala 266, Bloco A, IME-USP
Abstract:
We present an O(|A|(|x1|+|x2|)) algorithm to find a shortest word which divides x1 iff it does not divide x2, where x1 and x2 are words over the alphabet A. Based on the length of such a word an ultra-metric distance on A* can be defined. The algorithm can be transformed to work in time and space O(|A|+|x1|+|x2|).
Note 1: We say that a word x divides a word y if x is a subsequence of y.
Note 2: This is the second half of the "Dois algoritmos estupidamente eficientes" I began to present in August.