Algorithmica

, Volume 53, Issue 3, pp 298–313

# Fast Algorithms for the Density Finding Problem

Article

## Abstract

We study the problem of finding a specific density subsequence of a sequence arising from the analysis of biomolecular sequences. Given a sequence A=(a1,w1),(a2,w2),…,(an,wn) of n ordered pairs (ai,wi) of numbers ai and width wi>0 for each 1≤in, two nonnegative numbers , u with u and a number δ, the Density Finding Problem is to find the consecutive subsequence A(i*,j*) over all O(n2) consecutive subsequences A(i,j) with width constraint satisfying w(i,j)=∑r=ijwru such that its density $$d(i^{*},j^{*})=\sum_{r=i^{*}}^{j*}a_{r}/w(i^{*},j^{*})$$ is closest to δ. The extensively studied Maximum-Density Segment Problem is a special case of the Density Finding Problem with δ=∞. We show that the Density Finding Problem has a lower bound Ω(nlog n) in the algebraic decision tree model of computation. We give an algorithm for the Density Finding Problem that runs in optimal O(nlog n) time and O(nlog n) space for the case when there is no upper bound on the width of the sequence, i.e., u=w(1,n). For the general case, we give an algorithm that runs in O(nlog 2m) time and O(n+mlog m) space, where $$m=\min\{\lfloor\frac{u-\ell}{w_{\mathrm{min}}}\rfloor,n\}$$ and wmin=min r=1nwr. As a byproduct, we give another O(n) time and space algorithm for the Maximum-Density Segment Problem.

### Keywords

Maximum-density segment problem Density finding problem Slope selection problem Convex hull Computational geometry GC content DNA sequence Bioinformatics

## Preview

### References

1. 1.
Chung, K.-M., Lu, H.-I.: An optimal algorithm for the maximum-density segment problem. SIAM J. Comput. 34(2), 373–387 (2004)
2. 2.
Goldwasser, M.H., Kao, M.-Y., Lu, H.-I.: Fast algorithms for finding maximum-density segments of a sequence with applications to bioinformatics. In: Guigó, R., Gusfield, D. (eds.) Proceedings of the Second International Workshop of Algorithms in Bioinformatics, Rome, Italy, 2002. Lecture Notes in Computer Science, vol. 2452, pp. 157–171. Springer, New York (2002) Google Scholar
3. 3.
Goldwasser, M.H., Kao, M.-Y., Lu, H.-I.: Linear-time algorithms for computing maximum-density sequence segments with bioinformatics applications. J. Comput. Syst. Sci. 70(2), 128–144 (2005)
4. 4.
Huang, X.: An algorithm for identifying regions of a DNA sequence that satisfy a content requirement. Comput. Appl. Biosci. 10(3), 219–225 (1994) Google Scholar
5. 5.
Kim, S.K.: Linear-time algorithm for finding a maximum-density segment of a sequence. Inf. Process. Lett. 86(6), 339–342 (2003)
6. 6.
Lin, Y.-L., Jiang, T., Chao, K.-M.: Algorithms for locating the length-constrained heaviest segments, with applications to biomolecular sequence analysis. J. Comput. Syst. Sci. 65(3), 570–586 (2002)
7. 7.
Lin, Y.-L., Huang, X., Jiang, T., Chao, K.-M.: MAVG: locating non-overlapping maximum average segments in a given sequence. Bioinformatics 19(1), 151–152 (2003)
8. 8.
Nekrutenko, A., Li, W.-H.: Assessment of compositional heterogeneity within and between eularyotic genomes. Genome Res. 10, 1986–1995 (2000)
9. 9.
Rice, P., Longden, I., Bleasby, A.: Emboss: the European molecular biology open software suite. Trends Genet. 16, 276–277 (2000)
10. 10.
Ioshikhes, I.P., Zhang, M.Q.: Large-scale human promoter mapping using CpG islands. Gene, Nat. Genet. 26, 61–63 (2000) Google Scholar
11. 11.
Ohler, U., Niemann, H., Liao, G., Rubin, G.M.: Joint modeling of DNA sequence and physical properties to improve eukaryotic promoter recognition. Gene, Bioinf. 17(Suppl 1), S199–S206 (2001) Google Scholar
12. 12.
Ben-Or, M.: Lower bounds for algebraic computation trees. In: Proc. 15th Annu. ACM Sympos. Theory Comput., pp. 80–86 (1983) Google Scholar
13. 13.
Cormen, T.H., Leiserson, C.E., Rivest, R.L.: Introduction to Algorithms, MIT Press Google Scholar
14. 14.
Graham, R.L.: An efficient algorithm for determining the convex hull of a finite planar set. Inf. Process. Lett. 1, 132–133 (1972)