Enhancing ERS-A Algorithm for Pattern Matching (EERS-A)
Journal of Software Engineering and Applications
Pattern matching is a very important topic in computer science. It has been used in various applications such as information retrieval, virus scanning, DNA sequence analysis, data mining, machine learning, network security and pattern recognition. This paper has presented a new pattern matching algorithm-Enhanced ERS-A, which is an improvement over ERS-S algorithm. In ERS-A, two sliding windows are used to scan the text from the left and the right simultaneously. The proposed algorithm also
... s the text from the left and the right simultaneously as well as making comparisons with the pattern from both sides simultaneously. The comparisons done between the text and the pattern are done from both sides in parallel. The shift technique used in the Enhanced ERS-A is the four consecutive characters in the text immediately following the pattern window. The experimental results show that the Enhanced ERS-A has enhanced the process of pattern matching by reducing the number of comparisons performed. Keywords Pattern Matching, Enhanced Two Sliding Windows Algorithm, RS-A Fast Pattern Matching Algorithm, Enhanced RS-A D. Suleiman et al. 144 rithms made enhancements on preprocessing phase - and searching phase -, and others modified the shifting technique   - used in a case of a mismatch between the pattern and the text. Searching process differs from one algorithm to another: some algorithms scan the text from one side only, either from left  or from right ; other algorithms use two sliding windows to scan the text from the left and the right sides simultaneously -. Some algorithms made modification on the shifting values. The shift value is the amount of shift that the sliding window will move in a case of a mismatch between the text and the window; shift values depend on the number of consecutive characters immediately after the sliding window. Some algorithms use one consecutive character  ; others use two    and few use three . In this paper, we propose a new pattern matching algorithm-Enhanced ERS-A. The algorithm uses two sliding windows such as TSW , ETSW , ERS-A  and EBR  algorithms. It also uses four consecutive characters to compute the shift values such as RS-A  and ERS-A  algorithms. In addition to that, it uses the same comparison technique between the pattern and the text that was used in ETSW . This paper compares between the new algorithms of EERS-A, ETSW  and ERS-A  . The results showed that the new algorithm is better than others as explained in Section 5. The reminder of this paper is organized as follows: Section 2 consists of related works; Section 3 explains EERS-A algorithm; Section 4 covers the analysis. Finally, the conclusion and the future work are presented in Section 6.