A Fast Pattern Matching Algorithm with Two Sliding Windows (TSW)
Amjad Hudaib, Rola Al-Khalid, Dima Suleiman, Mariam Itriq & Aseel Al-Anani
Journal of Computer Science, Volume 4, Issue 5, pp. 393–401 · doi.org/10.3844/jcssp.2008.393.401
Abstract
In this research, we propose a fast pattern matching algorithm: The Two Sliding Windows (TSW) algorithm. The algorithm makes use of two sliding windows, each window has a size that is equal to the pattern length. Both windows slide in parallel over the text until the first occurrence of the pattern is found or until both windows reach the middle of the text. The experimental results show that TSW algorithm is superior to other algorithms especially when the pattern occurs at the end of the text.
Licence and reuse
Free to read. This article carries the publisher’s copyright, as printed on it: © 2008 Science Publications. It is free to read; ask us before reusing it.
How to reuse this articleResponses (0)
About this article
Hudaib, A., Al-Khalid, R., Suleiman, D., Itriq, M. & Al-Anani, A. (2008). A Fast Pattern Matching Algorithm with Two Sliding Windows (TSW). Journal of Computer Science, 4(5), 393–401. https://doi.org/10.3844/jcssp.2008.393.401
- Licence
- © Science Publications
- Issue
- Volume 4, Issue 5
- Policies
- Editorial independenceUse of generative AIData availabilityAppeals and complaints
- Version
- Version of record
