A Fast Pattern Matching Algorithm with Two Sliding Windows (TSW)

Amjad A. Hudaib, Rola Al-Khalid, Dima Suleiman, Mariam Itriq, Aseel Al-Anani · Journal of Computer Science · 2008

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.

Read the paper · More papers on PaperTik