English

Insertion and Sorting in a Sequence of Numbers Minimizing the Maximum Sum of a Contiguous Subsequence

Data Structures and Algorithms 2013-03-21 v2 Computational Complexity Discrete Mathematics

Abstract

Let AA be a sequence of n0n \geq 0 real numbers. A subsequence of AA is a sequence of contiguous elements of AA. A \emph{maximum scoring subsequence} of AA is a subsequence with largest sum of its elements, which can be found in O(n) time by Kadane's dynamic programming algorithm. We consider in this paper two problems involving maximal scoring subsequences of a sequence. Both of these problems arise in the context of buffer memory minimization in computer networks. The first one, which is called {\sc Insertion in a Sequence with Scores (ISS)}, consists in inserting a given real number xx in AA in such a way to minimize the sum of a maximum scoring subsequence of the resulting sequence, which can be easily done in O(n2)O(n^2) time by successively applying Kadane's algorithm to compute the maximum scoring subsequence of the resulting sequence corresponding to each possible insertion position for xx. We show in this paper that the ISS problem can be solved in linear time and space with a more specialized algorithm. The second problem we consider in this paper is the {\sc Sorting a Sequence by Scores (SSS)} one, stated as follows: find a permutation AA' of AA that minimizes the sum of a maximum scoring subsequence. We show that the SSS problem is strongly NP-Hard and give a 2-approximation algorithm for it.

Keywords

Cite

@article{arxiv.1210.5955,
  title  = {Insertion and Sorting in a Sequence of Numbers Minimizing the Maximum Sum of a Contiguous Subsequence},
  author = {Ricardo C. Corrêa and Pablo M. S. Farias and Críston P. de Souza},
  journal= {arXiv preprint arXiv:1210.5955},
  year   = {2013}
}

Comments

This paper has been submitted for journal publication

R2 v1 2026-06-21T22:25:54.145Z