Enhancing ERS-A Algorithm for Pattern Matching (EERS-A)

Dima Suleiman, Mariam Itriq, Aseel Al-Anani, Rola Al-Khalid, Amjad Hudaib
2015 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
more » ... 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 [6]-[9] and searching phase [10]-[12], and others modified the shifting technique [5] [9] [13]-[15] 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 [15] or from right [5]; other algorithms use two sliding windows to scan the text from the left and the right sides simultaneously [10]-[13]. 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 [16] [17]; others use two [10] [12] [15] and few use three [13]. In this paper, we propose a new pattern matching algorithm-Enhanced ERS-A. The algorithm uses two sliding windows such as TSW [12], ETSW [10], ERS-A [11] and EBR [13] algorithms. It also uses four consecutive characters to compute the shift values such as RS-A [5] and ERS-A [11] algorithms. In addition to that, it uses the same comparison technique between the pattern and the text that was used in ETSW [10]. This paper compares between the new algorithms of EERS-A, ETSW [10] and ERS-A [11] . 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.
doi:10.4236/jsea.2015.83015 fatcat:gd7j326ajjcj3cow4sxim42peu