Skip to main content
. 2009 Mar 4;7:75–89. doi: 10.4137/cin.s1054

Table 4.

Average case complexity for the proposed algorithms.

Complexity Alg. 1 Alg. 2 Alg. 3
Time Construction O(nsls) O(|Sd|) O(nsls + nplp) O(nplp) = O(|Sc|)
Search O(nsnplp) O(ns|Sc|) O(nplp) O(nsls) = O(|Sd|)
Total O(nsls + nsnplp) ≈ O(nsls) O(nsls + nplp) ≈O(nsls) O(nsls + nplp) ≈O(nsls)
Space Construction O(ws) O(nsls + nplp) O(nplp)
Search O(lp) O(lp) O(ws)
Total O(ws + lp) ≈ O(ws) O(nsls + nplp) ≈ O(nsls) O(nplp) + O(ws).≈ O(ws)
*

Average case complexity for the proposed algorithms (ns = number of sequences in the database, np = number of common patterns, is = average length of a sequence, ip = average length of a pattern, ws = number of characters processed at one time (size of the sliding window), sc is the concatenation of all the multiple patterns, and sd is the concatenation of all the sequences in the database).