, Volume 54, Issue 2, pp 119–125 | Cite as

Fast string matching algorithms for run-length coded strings

  • K. -L. Chung


Given a run-length coded text of length 2n and a run-length coded pattern of length 2m,m≪n commonly, this paper first presents anO(n+m) time sequential algorithm for string matching, then presents anO(1) time parallel algorithm on a two-dimensionalm×n mesh with a reconfigurable bus system.

AMS Subject Classifications

68Q20 90C39 65F 

Key words

Knuth-Morris-Pratt algorithm mesh with a reconfigurable bus system parallel algorithm run-length coding sequential algorithm string matching 

Schnelle Algorithmen zum Auffinden runlängen-codierter Zeichenketten


Gegeben seien ein runlängen-codierter Text der Länge 2n sowie ein runlängen-codiertes Muster der Länge 2m, wobei üblicherweisem≪n gilt. Wir geben zuerst einen zeit-sequentiellenO(n+m)-Suchalgorithmus an und dann einen parallelenO(1)-Algorithmus. Dieser läuft auf einemm×n-Gitter mit rekonfigurierbarem Bus-System.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    Aho, A. V., Corasick, M. J.: Efficient string matching: an aid to bibliographic search. Comm. ACM.18, 333–340 (1975).Google Scholar
  2. [2]
    Bell, T. C., Cleary, J. G., Witten, I. H.: Text compression. Englewood Cliffs: Prentice Hall 1990.Google Scholar
  3. [3]
    Bunke, H., Csirik, J.: An algorithm for matching run-length coded strings. Computing50, 297–314 (1993).Google Scholar
  4. [4]
    Boyer, R. S., Moore, J. S.: A fast string searching algorithm. Comm. ACM.20, 762–772 (1977).Google Scholar
  5. [5]
    Chen, G. H.: AnO(1) time algorithm for string matching. Int. J. Comput. Math.42, 185–191 (1992).Google Scholar
  6. [6]
    Chung, K. L.: An improvedO(1) time algorithm for string matching. Research Report, Dept. of Information Mgmt., National Taiwan Institute of Technology, Dec. 1993.Google Scholar
  7. [7]
    Galil, Z.: Optimal parallel algorithms for string matching. Inf. Control67, 144–157 (1985).Google Scholar
  8. [8]
    Karp, R. M., Rabin, M. O.: Efficient randomized pattern-matching algorithms. IBM J. Res. Dev.31, 249–260 (1987).Google Scholar
  9. [9]
    Knuth, D. E., Morris, J. H., Pratt, V. R.: Fast pattern matching in string. SIAM J. Comput.6, 323–350 (1977).Google Scholar
  10. [10]
    Miller, R., Prasanna-Kumar, V. K., Reisis, D. I., Stout, Q. F.: Parallel computations on reconfigurable meshes. IEEE Trans. Comput.42, 678–692 (1993).Google Scholar
  11. [11]
    Rothstein, J.: Bus automata, brains, and mental models. IEEE Trans. Systems Man Cybernet.18, 522–531 (1988).Google Scholar
  12. [12]
    Vishkin, U.: Optimal parallel pattern matching in strings. Inf. Control67, 91–113 (1985).Google Scholar

Copyright information

© Springer-Verlag 1995

Authors and Affiliations

  • K. -L. Chung
    • 1
  1. 1.Department of Information ManagementNational Taiwan Institute of TechnologyTaipeiTaiwan Republic of China

Personalised recommendations