English

Algorithms for Locating Constrained Optimal Intervals

Data Structures and Algorithms 2008-09-15 v1

Abstract

In this work, we obtain the following new results. 1. Given a sequence D=((h1,s1),(h2,s2)...,(hn,sn))D=((h_1,s_1), (h_2,s_2) ..., (h_n,s_n)) of number pairs, where si>0s_i>0 for all ii, and a number LhL_h, we propose an O(n)-time algorithm for finding an index interval [i,j][i,j] that maximizes k=ijhkk=ijsk\frac{\sum_{k=i}^{j} h_k}{\sum_{k=i}^{j} s_k} subject to k=ijhkLh\sum_{k=i}^{j} h_k \geq L_h. 2. Given a sequence D=((h1,s1),(h2,s2)...,(hn,sn))D=((h_1,s_1), (h_2,s_2) ..., (h_n,s_n)) of number pairs, where si=1s_i=1 for all ii, and an integer LsL_s with 1Lsn1\leq L_s\leq n, we propose an O(nT(Ls1/2)Ls1/2)O(n\frac{T(L_s^{1/2})}{L_s^{1/2}})-time algorithm for finding an index interval [i,j][i,j] that maximizes k=ijhkk=ijsk\frac{\sum_{k=i}^{j} h_k}{\sqrt{\sum_{k=i}^{j} s_k}} subject to k=ijskLs\sum_{k=i}^{j} s_k \geq L_s, where T(n)T(n') is the time required to solve the all-pairs shortest paths problem on a graph of nn' nodes. By the latest result of Chan \cite{Chan}, T(n)=O(n3(loglogn)3(logn)2)T(n')=O(n'^3 \frac{(\log\log n')^3}{(\log n')^2}), so our algorithm runs in subquadratic time O(nLs(loglogLs)3(logLs)2)O(nL_s\frac{(\log\log L_s)^3}{(\log L_s)^2}).

Keywords

Cite

@article{arxiv.0809.2097,
  title  = {Algorithms for Locating Constrained Optimal Intervals},
  author = {Hsiao-Fei Liu and Peng-An Chen and Kun-Mao Chao},
  journal= {arXiv preprint arXiv:0809.2097},
  year   = {2008}
}

Comments

An earlier version of the second part of this work appeared in Proceedings of the 18th International Symposium on Algorithms and Computation, Japan, 2007

R2 v1 2026-06-21T11:19:28.002Z