Base case (k = 2): Merging two frequent 1-sequences and will produce two candidate 2-sequences: and General case (k > 2):A frequent (k-1)-sequence w1 is merged with another frequent (k-1)-sequence w2 to produce a candidate k-sequence if the subsequence obtained by removing the first event in w1 is the same as the subsequence obtained by removing the last event in w2The resulting candidate after merging is given by the sequence w1 extended with the last event of w2. If the last two events in w2 belong to the same element, then the last event in w2 becomes part of the last element in w1Otherwise, the last event in w2 becomes a separate element appended to the end of w1