Ruler Rolling(尺子卷折)
Ruler Rolling
AI总结:
本文提出更现实的 {\sc Ruler Rolling} 问题,将尺子同向连续 90 度折成矩形,并给出动态规划算法枚举 Pareto 最优卷折。
摘要:
在 CCCG '21 上,O'Rourke 提出了 Hopcroft、Josephs 和 Whitesides(1985)的 NP 完全问题 {\sc Ruler Folding}(尺子折叠)的一个变体,他称之为 {\sc Ruler Wrapping}(尺子缠绕),其中所有折叠都必须沿同一方向进行 180 度。Gagie、Saeidi 和 Sapucaia(2023)指出,如果尺子的最后一个直线段必须最长,那么 {\sc Ruler Wrapping} 等价于将一个正整数串划分成若干子串,使这些子串的和递增,并且最后一个子串的和不超过给定值。他们针对带有和不带有该假设的 {\sc Ruler Wrapping} 版本都给出了线性时间算法。在现实生活中,我们无法反复将木工尺沿同一方向折叠 180 度。本文提出更贴近现实的问题 {\sc Ruler Rolling}(尺子卷折),其中我们反复将各段沿同一方向折叠 90 度,从而把尺子折叠成一个矩形,而不是一个区间。我们应当报告所有 Pareto 最优卷折。我们注意到,如果尺子的最后一个直线段必须比倒数第三个直线段长——类似于 Gagie 等人的假设——那么 {\sc Ruler Rolling} 等价于将一个正整数串划分成若干子串,使偶数位置子串的和递增,奇数位置子串的和也递增。我们给出一种简单的动态规划算法,在该假设下以二次时间报告所有 Pareto 最优卷折。即使没有该假设,我们的算法仍然有效,但那时会留下二次数量的二维可行解,因此寻找 Pareto 最优解会使运行时间增加一个对数因子。然而,如果我们有一个性质良好的目标函数,则仍可使用二次时间。
英文摘要:
At CCCG '21 O'Rourke proposed a variant of Hopcroft, Josephs and Whitesides' (1985) NP-complete problem {\sc Ruler Folding}, which he called {\sc Ruler Wrapping} and for which all folds must be 180 degrees in the same direction. Gagie, Saeidi and Sapucaia (2023) noted that if the last straight section of the ruler must be longest, then {\sc Ruler Wrapping} is equivalent to partitioning a string of positive integers into substrings whose sums are increasing such that the last substring sums to at most a given amount. They gave linear-time algorithms for the versions of {\sc Ruler Wrapping} both with and without this assumption. In real life we cannot repeatedly fold a carpenter's ruler 180 degrees in the same direction. In this paper we propose the more realistic problem of {\sc Ruler Rolling}, in which we repeatedly fold the segments 90 degrees in the same direction and thus fold the ruler into a rectangle instead of into an interval. We should report all the Pareto-optimal rollings. We note that if the last straight section of the ruler must be longer than the third to last -- analogously to Gagie et al.'s assumption -- then {\sc Ruler Rolling} is equivalent to partitioning a string of positive integers into substrings such that the sums of the even substrings are increasing, as are the sums of the odd substrings. We give a simple dynamic-programming algorithm that reports all the Pareto-optimal rollings in quadratic time under this assumption. Our algorithm still works even without the assumption, but then we are left with a quadratic number of two-dimensional feasible solutions, so finding the Pareto-optimal ones and increases our running time by a logarithmic factor. If we have a nice objective function, however, we still use quadratic time.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。