Abstract
Pattern Matching with Properties (Property Matching, for short), involves a string matching between the pattern and the text, and the requirement that the text part satisfies some property.
It is straightforward to do sequential matching in a text with properties. However, indexing in a text with properties becomes difficult if we desire the time to be output dependent. We present an algorithm for indexing a text with properties in O(nlog|Σ|+n loglogn) time for preprocessing and O(|P|log|Σ|+tocc π ) per query, where n is the length of the text, P is the sought pattern, Σ is the alphabet, and tocc π is the number of occurrences of the pattern that satisfy some property π.
As a practical use of Property Matching we show how to solve Weighted Matching problems using techniques from Property Matching. Weighted sequences have been introduced as a tool to handle a set of sequences that are not identical but have many local similarities. The weighted sequence is a “statistical image” of this set, where we are given the probability of every symbol’s occurrence at every text location. Weighted matching problems are pattern matching problems where the given text is weighted.
We present a reduction from Weighted Matching to Property Matching that allows off-the-shelf solutions to numerous weighted matching problems including indexing, swapped matching, parameterized matching, approximate matching, and many more. Assuming that one seeks the occurrence of pattern P with probability ε in weighted text T of length n, we reduce the problem to a property matching problem of pattern P in text T′ of length \(O(n(\frac{1}{\epsilon})^2 \log \frac{1}{\epsilon})\).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Amir, A., Keselman, D., Landau, G., Lewenstein, M., Lewenstein, N., Rodeh, M.: Indexing and dictionary matching with one error. Journal of Algorithms 37, 309–325 (2000); Preliminary version appeared in Dehne, F., Gupta, A., Sack, J.-R., Tamassia, R. (eds.) WADS 1999. LNCS, vol. 1663, pp. 181–192. Springer, Heidelberg (1999)
Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 2nd edn. MIT Press and McGraw-Hill (2001)
Farach, M., Muthukrishnan, S.: Perfect hashing for strings: Formalization and algorithms. In: Proc. 7th Combinatorial Pattern Matching Conference (CPM), pp. 130–140 (1996)
Iliopoulos, C.S., Mouchard, L., Perdikuri, K., Tsakalidis, A.: Computing the repetitions in a weighted sequence. In: Proceeding of the Prague Stringology Conference, pp. 91–98 (2003)
Thompson, J.D., Higgins, D.G., Gibson, T.J.: Clustal w: Improving the sensitivity of progressive multiple sequence alignment through sequence weighting, position-specific gap penalties and weight matrix choice. Nucleic Acids Research 22, 4673–4680 (1994)
Weiner, P.: Linear pattern matching algorithm. In: Proc. 14 IEEE Symposium on Switching and Automata Theory, pp. 1–11 (1973)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Amir, A., Chencinski, E., Iliopoulos, C., Kopelowitz, T., Zhang, H. (2006). Property Matching and Weighted Matching. In: Lewenstein, M., Valiente, G. (eds) Combinatorial Pattern Matching. CPM 2006. Lecture Notes in Computer Science, vol 4009. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11780441_18
Download citation
DOI: https://doi.org/10.1007/11780441_18
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-35455-0
Online ISBN: 978-3-540-35461-1
eBook Packages: Computer ScienceComputer Science (R0)