Results 1 - 10
of
11
Tighter Lower Bounds on the Exact Complexity of String Matching
, 2002
"... The paper considers the exact number of character comparisons needed to find all occurrences of a pattern of length m in a text of length n using on-line and general algorithms. For on-line algorithms, a lower bound of about (1 + ) n character comparisons is obtained. For general algorithms, a lower ..."
Abstract
-
Cited by 16 (4 self)
- Add to MetaCart
The paper considers the exact number of character comparisons needed to find all occurrences of a pattern of length m in a text of length n using on-line and general algorithms. For on-line algorithms, a lower bound of about (1 + ) n character comparisons is obtained. For general algorithms, a lower bound of about ) n character comparisons is obtained. These lower bounds complement an on-line upper bound of about (1 + ) n comparisons obtained recently by Cole and Hariharan. The lower bounds are obtained by finding patterns with interesting combinatorial properties. It is also shown that for some patterns off-line algorithms can be more efficient than on-line algorithms.
Tight Comparison Bounds for the String Prefix-Matching Problem
, 1993
"... In the string prefix-matching problem one is interested in finding the longest prefix of a pattern string of length m that occurs starting at each position of a text string of length n. This is a natural generalization of the string matching problem where only occurrences of the whole pattern are so ..."
Abstract
-
Cited by 12 (2 self)
- Add to MetaCart
In the string prefix-matching problem one is interested in finding the longest prefix of a pattern string of length m that occurs starting at each position of a text string of length n. This is a natural generalization of the string matching problem where only occurrences of the whole pattern are sought. The Knuth-Morris-Pratt string matching algorithm can be easily adapted to solve the string prefix-matching problem without making additional comparisons. In this paper we study the exact complexity of the string prefix-matching problem in the deterministic sequential comparison model. Our bounds do not account for comparisons made in a pattern preprocessing step. The following results are presented: 1. A family of linear-time string prefix-matching algorithms that make at most b 2m\Gamma1 m nc comparisons. 2. A tight lower bound of b 2m\Gamma1 m nc comparisons for any string prefix-matching algorithm. We also consider the special case when the pattern and the text strings are th...
Saving Comparisons in the Crochemore-Perrin String Matching Algorithm
- IN PROC. OF 1ST EUROPEAN SYMP. ON ALGORITHMS
, 1992
"... Crochemore and Perrin discovered an elegant linear-time constant-space string matching algorithm that makes at most 2n \Gamma m symbol comparison. This paper shows how to modify their algorithm to use fewer comparisons. Given any fixed ffl ? 0, the modified algorithm takes linear time, uses constant ..."
Abstract
-
Cited by 8 (1 self)
- Add to MetaCart
Crochemore and Perrin discovered an elegant linear-time constant-space string matching algorithm that makes at most 2n \Gamma m symbol comparison. This paper shows how to modify their algorithm to use fewer comparisons. Given any fixed ffl ? 0, the modified algorithm takes linear time, uses constant space and makes at most n+ b 1+ffl 2 (n \Gamma m)c comparisons. If O(log m) space is available, then the algorithm makes at most n + b 1 2 (n \Gamma m)c comparisons. The pattern preprocessing step also takes linear time and uses constant space. These are the first string matching algorithms that make fewer than 2n \Gamma m comparisons and use sub-linear space.
Constant-Space String Matching with Smaller Number of Comparisons: Sequential Sampling
, 1995
"... A new string-matching algorithm working in constant space and linear time is presented. It is based on a powerful idea of sampling, originally introduced in parallel computations. The algorithm uses a sample S which consists of two positions inside the pattern P . First the positions of the sample S ..."
Abstract
-
Cited by 6 (3 self)
- Add to MetaCart
A new string-matching algorithm working in constant space and linear time is presented. It is based on a powerful idea of sampling, originally introduced in parallel computations. The algorithm uses a sample S which consists of two positions inside the pattern P . First the positions of the sample S are tested against the corresponding positions of the text T , then a version of Knuth-Morris-Pratt algorithm is applied. This gives the simplest known string-matching algorithm which works in constant space and linear time and which does not use any linear order of the alphabet. A rened version of the algorithm gives the fastest (in the sense of number of comparisons) known algorithm for string-matching in constant space. It makes (1 + ")n +O( n m ) symbol comparisons. This improves substantially the result of [3], where a ( 3 2 + ")n comparisons constant space algorithm was designed. 1 Introduction Assume we are given two strings: a pattern P of length m and a text T of length n. The ...
On the Comparison Complexity of the String Prefix-Matching Problem
- In Proc. 2nd European Symposium on Algorithms, number 855 in Lecture Notes in Computer Science
, 1995
"... In this paper we study the exact comparison complexity of the string prefix-matching problem in the deterministic sequential comparison model with equality tests. We derive almost tight lower and upper bounds on the number of symbol comparisons required in the worst case by on-line prefix-matchi ..."
Abstract
-
Cited by 6 (0 self)
- Add to MetaCart
In this paper we study the exact comparison complexity of the string prefix-matching problem in the deterministic sequential comparison model with equality tests. We derive almost tight lower and upper bounds on the number of symbol comparisons required in the worst case by on-line prefix-matching algorithms for any fixed pattern and variable text. Unlike previous results on the comparison complexity of string-matching and prefix-matching algorithms, our bounds are almost tight for any particular pattern. We also consider the special case where the pattern and the text are the same string. This problem, which we call the string self-prefix problem, is similar to the pattern preprocessing step of the Knuth-Morris-Pratt stringmatching algorithm that is used in several comparison efficient stringmatching and prefix-matching algorithms, including in our new algorithm. We obtain roughly tight lower and upper bounds on the number of symbol comparisons required in the worst case...
Pattern Matching in Strings
- Algorithms and Theory of Computation Handbook, chapter 11
, 1998
"... This paper also proves that this is optimal among algorithms processing the text with a one-symbol buffer. The bound becomes ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
This paper also proves that this is optimal among algorithms processing the text with a one-symbol buffer. The bound becomes
Tighter upper bounds on the exact complexity of string matching
- SIAM Journal on Computing
, 1997
"... Abstract. This paper considers how many character comparisons are needed to find all occurrences of a pattern of length m in a text of length n. The main contribution is to show an upper bound of the form of n + O(n/m) character comparisons, following preprocessing. Specifically, we 8 show an upper ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
Abstract. This paper considers how many character comparisons are needed to find all occurrences of a pattern of length m in a text of length n. The main contribution is to show an upper bound of the form of n + O(n/m) character comparisons, following preprocessing. Specifically, we 8 show an upper bound of n + (n − m) character comparisons. This bound is achieved by an 3(m+1) online algorithm which performs O(n) work in total and requires O(m) space and O(m2) time for preprocessing. The current best lower bound for online algorithms is n + 16 (n − m) character 7m+27 comparisons for m =16k+ 19, for any integer k ≥ 1, and for general algorithms is n + 2 (n − m) m+3 character comparisons, for m =2k+ 1, for any integer k ≥ 1.
On the Complexity of Determining the Period of a String
, 2000
"... . We study the complexity of a classical combinatorial problem of computing the period of a string. We investigate both the average- and the worst-case complexity of the problem. We deliver almost tight bounds for the average-case. We show that every algorithm computing the period must examine ..."
Abstract
- Add to MetaCart
. We study the complexity of a classical combinatorial problem of computing the period of a string. We investigate both the average- and the worst-case complexity of the problem. We deliver almost tight bounds for the average-case. We show that every algorithm computing the period must examine ( p m) symbols of an input string of length m. On the other hand we present an algorithm that computes the period by examining on average O q m log jj m symbols, where jj 2 stands for the input alphabet. We also present a deterministic algorithm that computes the period of a string using m+O(m 3=4 ) comparisons. This is the first algorithm that have the worstcase complexity m+ o(m). 1 Introduction The studies on string periodicity remain a central topic in combinatorial pattern matching due to important applications of periodicity in string searching algorithms, algebra, and in formal language theory (see, e.g., [1, 26, 36, 38, 39]). Let S =< S[1]; S[2]; : : : ; S[m...
Looking for MUM and DAD: text-text comparisons do help
"... . It is known that about 4n 3 comparisons are needed, in the worst case, to find all the occurrences of the string aba in a text of length n if only pattern--text comparisons are allowed. We show that if text--text comparisons can be used then only about 5n 4 comparisons are required. This g ..."
Abstract
- Add to MetaCart
. It is known that about 4n 3 comparisons are needed, in the worst case, to find all the occurrences of the string aba in a text of length n if only pattern--text comparisons are allowed. We show that if text--text comparisons can be used then only about 5n 4 comparisons are required. This gives the first example in which text--text comparisons provably help. 1 Introduction We consider one of the simplest possible string matching problems: what is the number of comparisons needed, in the worst case, to find all the occurrences of the pattern aba in a text of length n. Surprisingly, the exact answer to this question is not yet known. There has been much recent research analysing the exact complexity of algorithms on strings. Particular attention has been given to comparison-based string matching algorithms. The only operations such algorithms are allowed to perform on the pattern and text characters are pairwise comparisons. To each such comparison the algorithm gets a `yes'...

