Borders and Finite Automata

  • Martin Šimůnek
  • Bořivoj Melichar
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4094)


A border of a string is a prefix of the string that is simultaneously its suffix. It is one of the basic stringology keystones used as a part of many algorithms in pattern matching, molecular biology, computer-assisted music analysis and others. The paper discusses automata-theoretical background of Iliopoulos’s ALL_BORDERS algorithm that finds all borders of a string with don’t care symbols. We show that ALL_BORDERS algorithm is a simulator of a finite automaton together with explaining the function of the automaton. We show that the simulated automaton accepts intersection of sets of prefixes and suffixes (and thus a set of borders) of the input string. Last but not least we define approximate borders. Based on the knowledge of the automata background of ALL_BORDERS algorithm we offer an automata-based algorithm that finds approximate borders with Hamming distance. We discuss conditions under which the same principle can be used for other distance measures for which an approximate searching automaton can be constructed.


Distance Measure Pattern Match Finite Automaton String Match Transition Diagram 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [FP74]
    Fischer, M.J., Paterson, M.S.: String matching and other products. In: Karp, R.M. (ed.) Complexity of Computation. SIAM AMS Proceedings, vol. 7, pp. 113–125. American Mathematical Society, Providence (1974)Google Scholar
  2. [Hol00]
    Holub, J.: Simulation of Nondeterministic Finite Automata in Pattern Matching. PhD thesis, Czech Technical University in Prague (February 2000)Google Scholar
  3. [IMM+03]
    Iliopoulos, C.S., Mohamed, M., Mouchard, L., Perdikuri, K., Smyth, W.F., Tsakalidis, A.: String regularities with don’t cares. Nordic Journal of Computing 10(1), 40–51 (2003)zbMATHMathSciNetGoogle Scholar
  4. [MHP05]
    Melichar, B., Holub, J., Polcar, T.: Text Searching Algorithms, vol. I (2005),
  5. [MP70]
    Morris, J.H., Pratt, V.R.: A Linear Pattern Matching Algorithm. Technical Report 40, Computing Center, University of California, Berkeley (1970)Google Scholar
  6. [ŠM06]
    Šimůnek, M., Melichar, B.: Borders and finite automata. In: Proceedings of Workshop 2006. Czech Technical University, Prague (2006)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Martin Šimůnek
    • 1
  • Bořivoj Melichar
    • 1
  1. 1.Department of Computer Science and EngineeringCzech Technical University in PraguePraha 2Czech Republic

Personalised recommendations