Longest common factor of two words

  • Maxime Crochemore
Session CAAP 1 Algorithms
Part of the Lecture Notes in Computer Science book series (LNCS, volume 249)


The LCF of two words u and v is the maximal length of a common factor of u and v. A linear time algorithm to compute LCF is given, based on a linear time algorithm to build the minimal suffix automaton of a word. The algorithm naturally turns into a real-time string-matching algorithm.


Terminal State Linear Time Algorithm Suffix Tree Finite State Automaton Free Monoid 

Main References

  1. [Be 79]
    J. BERSTEL, Transductions and context-free languages, Teubner, 1979.Google Scholar
  2. [BBEHCS 85]
    A. BLUMER, J. EHRENFEUCHT, D. HAUSSLER, M.T. CHEN & J. SEIFEIRAS, The smallest automaton recognizing the subwords of a text, Theor. Comput. Sci. 40, 1 (1985) 31–56.CrossRefGoogle Scholar
  3. [Ch 83]
    C. CHOFFRUT, On some combinatorial properties of metrics over the free monoid, in: [Combinatorics on words, Cumming ed., Academic Press, 1983].Google Scholar
  4. [Cr 86]
    M. CROCHEMORE, Transducers and repetitions, Theor. Comput. Sci. (1986) to appear.Google Scholar
  5. [KMP 77]
    D.E. KNUTH, J.H. MORRIS & V.R. PRATT, Fast pattern-matching in strings, SIAM J. Compt. 6, 2 (1977) 323–350.CrossRefGoogle Scholar
  6. [Sl 83]
    A.O. SLISENKO, Detection of periodicities and string-matching in real time, J. of Soviet Mathematics 22, 3 (1983) 1316–1387.CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1987

Authors and Affiliations

  • Maxime Crochemore
    • 1
  1. 1.LITP — Rouen et CSP — Université de Paris-NordVilletaneuse

Personalised recommendations