Abstract

Attaching a cost function to integers appearing in partitions of an integer n gives rise to a natural least-cost or greatest-profit problem. We present several modifications of the standard O(n2) dynamic programming algorithm for the least-cost problem. One modification results in an average complexity of order O(n3/2 by restriction of possible substitutions; a second in an efficient print algorithm for display of the resultant partition. A third, a prepass eliminating some equations from consideration, guarantees O(n) or O(n log n) efficiency in a number of important special cases; in particular, we can guarantee such efficiency whenever the unit cost function is even approximately monotonically increasing or decreasing. We also give a related algorithm for the problem of partitioning an integer by integers no larger than some upper bound p, of complexity polynomial in p. Finally, we show that no modification of the dynamic programming algorithm (using only pair comparison and information from the permutation of integers induced by sorting the unit costs) is worst-case better than ω(n2).

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.