English

Cut a Numeric String into Required Pieces

Data Structures and Algorithms 2023-09-29 v1

Abstract

We study the problem of cutting a length-nn string of positive real numbers into kk pieces so that every piece has sum at least bb. The problem can also be phrased as transforming such a string into a new one by merging adjacent numbers. We discuss connections with other problems and present several algorithms in connection with the problem: an O(n)O(n)-time greedy algorithm, an O(knlogn)O(kn\log n)-time dynamic programming algorithm, and an O(n+klogn+2kk)O(n+ k \log n + 2^kk)-time FPT algorithm for nkn-k pieces.

Keywords

Cite

@article{arxiv.2309.16212,
  title  = {Cut a Numeric String into Required Pieces},
  author = {Yinqi Cai},
  journal= {arXiv preprint arXiv:2309.16212},
  year   = {2023}
}
R2 v1 2026-06-28T12:34:37.735Z