In this paper, we define a family of patterns with don’t cares occurring in a text. We call primitive patterns. The set of primitive patterns forms a basis for all the maximal patterns occ in the text. The number of primitive patterns is smaller than other known basis. We present an incremental algorithm that computes the primitive patterns occurring at q times in a text of lengthn, given theN primitive patterns occurring at least q − 1 times, in time O(|Σ |Nn2 logn), whereΣ is the alphabet. In… CONTINUE READING