arXiv · 2309.16212
Cut a Numeric String into Required Pieces
Abstract
We study the problem of cutting a length-$n$ string of positive real numbers into $k$ pieces so that every piece has sum at least $b$. 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)$-time greedy algorithm, an $O(kn\log n)$-time dynamic programming algorithm, and an $O(n+ k \log n + 2^kk)$-time FPT algorithm for $n-k$ pieces.
Explore related subjects
Keep this discovery
Yinqi Cai. 2023-09-28. Cut a Numeric String into Required Pieces. https://arxiv.org/abs/2309.16212
Cite the original work for its findings. Save a collection to share your selection of sources.