Scaled matching refers to the problem of finding all locations in the text where the pattern, proportionally enlarged according to an arbitrary integral scale, appears. Scaled matching is an important problem that was...
详细信息
Scaled matching refers to the problem of finding all locations in the text where the pattern, proportionally enlarged according to an arbitrary integral scale, appears. Scaled matching is an important problem that was originally inspired by problems in Vision. However, in real life, a more natural model of scaled matching is the real scaled matching model. Real scaled matching is an extended version of the scaled matching problem allowing arbitrary real-sized scales, approximated by some function, e.g., truncation. It has been shown that the scaled matching problem can be solved in linear time. However, even though there has been follow-up work on the problem, it remained an open question whether real scaled matching could be solved faster than the simple solution of O(nm) time, where n is the text size and m is the pattern size. Using a new approach we show how to solve the real scaled matching problem in linear time. (C) 1999 Elsevier Science B.V. All rights reserved.
Let a text string T of n symbols and a pattern string P of m symbols from alphabet Sigma be given. A swapped version T' of T is a length n string derived from T by a series of local swaps (i.e., t(iota)' <-...
详细信息
Let a text string T of n symbols and a pattern string P of m symbols from alphabet Sigma be given. A swapped version T' of T is a length n string derived from T by a series of local swaps (i.e., t(iota)' <-- t(iota+1) and t(iota+1)' <--t(iota)) where each element can participate in no more than one swap. The Pattern Matching with Swaps problem is that of finding all locations i for which there exists a swapped version T' of T where there is an exact matching of P at location i of T'. It was recently shown that the Pattern Matching with Swaps problem has a solution in time O(nm(1/3) log m log(2) sigma), where sigma = min(\Sigma\, m). We consider some interesting special cases of patterns, namely, patterns where there is no length-one run, i.e., there are no a, b, c epsilon Sigma where b not equal a and b not equal c and where the substring abe appears in the pattern. We show that for such patterns the Pattern Matching with Swaps problem can be solved in time O(n log(2) m). (C) 1998 Published by Elsevier Science B.V. All rights reserved.
We consider the problem of finding the repetitive structures of a given string x. The period u of the string x grasps the repetitiveness of x, since x is a prefix of a string constructed by concatenations of u. We gen...
详细信息
We consider the problem of finding the repetitive structures of a given string x. The period u of the string x grasps the repetitiveness of x, since x is a prefix of a string constructed by concatenations of u. We generalize the concept of repetitiveness as follows: A string w covers a string I if there is a superstring of x which is constructed by concatenations and superpositions of Lu. A substring w of x is called a seed of x if w covers x. we present an O (n log n)-time algorithm for finding all the seeds of a given string of length n.
A string w is primitive if it is not a power of another string (i.e., writing w = v(k) implies k = 1. Conversely, w is a square if w = vv, with v a primitive string. A string x is square-free if it has no nonempty sub...
详细信息
A string w is primitive if it is not a power of another string (i.e., writing w = v(k) implies k = 1. Conversely, w is a square if w = vv, with v a primitive string. A string x is square-free if it has no nonempty substring of the form ww. It is shown that the square-freedom of a string of n symbols over an arbitrary alphabet can be tested by a CRCW PRAM with n processors in O(log n) time and linear auxiliary space. If the cardinality of the input alphabet is bounded by a constant independent of the input size, then the number of processors can be reduced to n/log n without affecting the time complexity of this strategy. The fastest sequential algorithms solve this problem O(n log n) or O(n) time, depending on whether the cardinality of the input alphabet is unbounded or bounded, and either performance is known to be optimal within its class. More elaborate constructions lead to a CRCW PRAM algorithm for detecting, within the same n-processors bounds, all positioned squares in x in time O(log n) and using linear auxiliary space. The fastest sequential algorithms solve this problem in O(n log n) time, and such a performance is known to be optimal.
暂无评论