International Journal of Computer Applications |
Foundation of Computer Science (FCS), NY, USA |
Volume 64 - Number 18 |
Year of Publication: 2013 |
Authors: Sagnik Banerjee, Tamal Chakrabarti, Devadatta Sinha |
10.5120/10737-5614 |
Sagnik Banerjee, Tamal Chakrabarti, Devadatta Sinha . Finding All Occurrences of a Pattern by a Genetic Algorithm Based Divide-and-Conquer Method. International Journal of Computer Applications. 64, 18 ( February 2013), 48-52. DOI=10.5120/10737-5614
The method of finding a sequence of characters, called the pattern, in another much longer sequence of characters, called the text, is known as pattern matching. Several pattern-matching algorithms exist, that locate all the positions where a pattern occurs in a text. In this paper we have presented an algorithm which implements a divide and conquer technique, which divides the text in smaller independent sub-texts and then looks for the existence of the pattern in each such sub-text. The said divide and conquer method thus eventually finds all the occurrences of the pattern in the given text. The points of division have been chosen using a genetic algorithm.