Research Article

A New Approach for Mining Order-Preserving Submatrices Based on All Common Subsequences

Algorithm 1

Data: Two sequences and
Output: acs—the set of all common subsequences of and .
(1) ∗∗∗∗∗∗∗∗∗∗∗∗∗ Begin of Initialization ∗∗∗∗∗∗∗∗∗∗∗∗∗
(2) ;
(3) acs+ = ; //acs is the set of ACS between and .
(4) for (; ; ++) do
(5) ;
(6)  = null;
(7) for (; ; ++) do
(8)   if   then
(9)   ; //ind represents the index of celement of in .
(10)  end
(11) end
(12) end
(13) ∗∗∗∗∗∗∗∗∗∗∗∗∗ End of Initialization ∗∗∗∗∗∗∗∗∗∗∗∗∗
(14) for (; ; ++) do
(15) if   then
(16)   for (; ; ++) do
(17)    if   then  //if stay the same order.
(18)   ;
(19)   end
(20)  end
(21)  ;
(22) end