# Lower bounds for sorting of sums

## Abstract

This paper addresses the following question: How much can sorting (by comparisons) be speeded up if some information about the possible ordertypes the input sequence (x_{1},...,x_{n}) might have is given in advance? We extend a lower bound due to Fredman [3] concerning sorting of sums of the form (y_{i}+z_{j} | 1≤i, j≤m) to the problem of sorting all sums of up to d out of m numbers:

Let d ≥ 2, n=Σ_{0≤s≤d}( _{s} ^{m} . Then every decision tree for inputs from R^{n} that sorts all sums of up to d out of m numbers w_{1},...,w_{m}, i. e., that determines the ordertype of sequences of the form \((\mathop \Sigma \limits_{r \in S} w_r |S \subset \{ 1,...m\} , |S| \leqslant d)\), for \(\overline w \in R^m\), has depth Θ(m^{d})=Θ(n).

This is an optimal lower bound. Furthermore, the case of sorting all subset sums of a vector is considered:

Let n=2^{m}. Then every decision tree for inputs from R^{n} that determines the ordertype of sequences of the form \((\mathop \Sigma \limits_{r \in S} w_r |S \subset \{ 1,...m\} ),\overline w \in R^m\), has depth ≥2^{⌊m/3⌋}=Θ(n^{1/3}).

This lower bound is exponentially larger than those previously known for this problem. It may be viewed as another step in an attempt to analyze how hard the R^{n}-version of the NP-complete Knapsack problem is on structured computational models like the linear decision tree.

## Keywords

Decision Tree Knapsack Problem Sorting Problem Major Open Problem General Decision Tree## Preview

Unable to display preview. Download preview PDF.

## References

- [1]M. Dietzfelbinger and W. Maass, Two lower bound arguments with "inaccessible" numbers, in "Structure in Complexity Theory", Proceedings, A. Selman (ed.), pp. 161–183, Lecture Notes in Computer Science 223, Springer-Verlag, Berlin, 1986.Google Scholar
- [2]D. P. Dobkin and R. J. Lipton, On the complexity of computations under varying sets of primitives, J. Comput. System Sci. 18 (1979), 86–91.CrossRefGoogle Scholar
- [3]M. L. Fredman, How good is the information theory bound in sorting? Theor. Comp. Sci. 1 (1976), 355–361.Google Scholar
- [4]L. H. Harper, T. H. Payne, J. E. Savage, and E. Strauss, Sorting X+Y, Comm. Assoc. Comput. Mach. 18 (1975), 347–349.Google Scholar
- [5]J. Kahn and M. Saks, Balancing poset extensions, Order 1 (1984), 113–126.Google Scholar
- [6]F. Meyer auf der Heide, A polynomial linear search algorithm for the n-dimensional knapsack problem, J. Assoc. Comput. Mach. 31 (1984), 668–676.Google Scholar
- [7]J. Stoer and C. Witzgall, "Convexity and Optimization in Finite Dimensions I", Springer-Verlag, New York, 1970.Google Scholar
- [8]E. Ukkonen, Exponential lower bounds for some NP-complete problems in a restricted linear decision tree model, BIT 23 (1983), 181–192.Google Scholar