A Fast Pattern Matching Algorithm with Two Sliding Windows (TSW)
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.
DOI: https://doi.org/10.3844/jcssp.2008.393.401
Copyright: © 2008 Amjad Hudaib, Rola Al-Khalid, Dima Suleiman, Mariam Itriq and Aseel Al-Anani. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
- 4,077 Views
- 3,186 Downloads
- 26 Citations
Download
Keywords
- Pattern matching
- string matching
- berry-ravindran algorithm
- boyer moore