A Nonlinear Lower Bound on Linear Search Tree Programs for Solving Knapsack Problems*

Similar documents
1 Computational Problems

Computer Science 385 Analysis of Algorithms Siena College Spring Topic Notes: Limitations of Algorithms

1 From previous lectures

Notes for Lecture Notes 2

CSC 8301 Design & Analysis of Algorithms: Lower Bounds

CS 350 Algorithms and Complexity

CS 350 Algorithms and Complexity

CS3719 Theory of Computation and Algorithms

A note on parallel and alternating time

CS6901: review of Theory of Computation and Algorithms

Automata Theory CS S-18 Complexity Theory II: Class NP

34.1 Polynomial time. Abstract problems

Limitations of Algorithm Power

On shredders and vertex connectivity augmentation

Near-domination in graphs

CS 372: Computational Geometry Lecture 4 Lower Bounds for Computational Geometry Problems

U.C. Berkeley CS278: Computational Complexity Professor Luca Trevisan August 30, Notes for Lecture 1

Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography

P is the class of problems for which there are algorithms that solve the problem in time O(n k ) for some constant k.

Coloring Vertices and Edges of a Path by Nonempty Subsets of a Set

The Ellipsoid Algorithm

Final exam study sheet for CS3719 Turing machines and decidability.

Part V. Intractable Problems

Chapter 4. Measure Theory. 1. Measure Spaces

arxiv:math/ v1 [math.co] 3 Sep 2000

Computational complexity theory

Show that the following problems are NP-complete

, Department of Computer and Communication Sciences, University of Michigan, Ann Arbor, Michigan

Coloring Vertices and Edges of a Path by Nonempty Subsets of a Set

Time Complexity (1) CSCI Spring Original Slides were written by Dr. Frederick W Maier. CSCI 2670 Time Complexity (1)

Learning k-edge Deterministic Finite Automata in the Framework of Active Learning

Disjoint paths in tournaments

Computational Complexity and Intractability: An Introduction to the Theory of NP. Chapter 9

K 4 -free graphs with no odd holes

On the Impossibility of Certain Ranking Functions

Course 2BA1: Trinity 2006 Section 9: Introduction to Number Theory and Cryptography

Four-coloring P 6 -free graphs. I. Extending an excellent precoloring

Computational complexity theory

Notes for Lecture 3... x 4

Computational Complexity

MULTIPLICITIES OF MONOMIAL IDEALS

Lecture 20: conp and Friends, Oracles in Complexity Theory

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

Intractable Problems [HMU06,Chp.10a]

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.

Chapter 1 The Real Numbers

CSE 105 THEORY OF COMPUTATION

Undecidability. Andreas Klappenecker. [based on slides by Prof. Welch]

Advanced topic: Space complexity

arxiv: v2 [cs.fl] 29 Nov 2013

Data Structures and Algorithms

Limitations of Efficient Reducibility to the Kolmogorov Random Strings

On zero-sum partitions and anti-magic trees

On the Computational Hardness of Graph Coloring

Basic counting techniques. Periklis A. Papakonstantinou Rutgers Business School

A well-quasi-order for tournaments

COMP/MATH 300 Topics for Spring 2017 June 5, Review and Regular Languages

Automata Theory CS Complexity Theory I: Polynomial Time

CSC 5170: Theory of Computational Complexity Lecture 4 The Chinese University of Hong Kong 1 February 2010

Theory of Computation p.1/?? Theory of Computation p.2/?? We develop examples of languages that are decidable

On NP-Completeness for Linear Machines

1 Take-home exam and final exam study guide

Theory of Computation Chapter 9

CS 125 Section #10 (Un)decidability and Probability November 1, 2016

Jeong-Hyun Kang Department of Mathematics, University of West Georgia, Carrollton, GA

A Geometric Approach to Graph Isomorphism

Analysis of Algorithms. Unit 5 - Intractable Problems

conp, Oracles, Space Complexity

Non-emptiness Testing for TMs

CS 5114: Theory of Algorithms

Space Complexity. then the space required by M on input x is. w i u i. F ) on. September 27, i=1

A General Lower Bound on the I/O-Complexity of Comparison-based Algorithms

BBM402-Lecture 11: The Class NP

Definability in the Enumeration Degrees

Some hierarchies for the communication complexity measures of cooperating grammar systems

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 1 Turing Reducibility

CS154, Lecture 17: conp, Oracles again, Space Complexity

An average case analysis of a dierential attack. on a class of SP-networks. Distributed Systems Technology Centre, and

Lecture 7: Dynamic Programming I: Optimal BSTs

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Ordered categories and additive conjoint measurement on connected sets

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS

CSC Linear Programming and Combinatorial Optimization Lecture 8: Ellipsoid Algorithm

Computation Histories

Recognition of Deterministic ETOL Languages in Logarithmic Space

CP405 Theory of Computation

NP-completeness. Chapter 34. Sergey Bereg

LOWER BOUNDARY HYPERPLANES OF THE CANONICAL LEFT CELLS IN THE AFFINE WEYL GROUP W a (Ãn 1) Jian-yi Shi

Notes on the Dual Ramsey Theorem

Further discussion of Turing machines

Sparse analysis Lecture II: Hardness results for sparse approximation problems

MATH 215 Sets (S) Definition 1 A set is a collection of objects. The objects in a set X are called elements of X.

Any Wizard of Oz fans? Discrete Math Basics. Outline. Sets. Set Operations. Sets. Dorothy: How does one get to the Emerald City?

Covering an ellipsoid with equal balls

Introduction to Automata

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) October,

On a generalization of addition chains: Addition multiplication chains

Tractability. Some problems are intractable: as they grow large, we are unable to solve them in reasonable time What constitutes reasonable time?

LINEAR EQUATIONS WITH UNKNOWNS FROM A MULTIPLICATIVE GROUP IN A FUNCTION FIELD. To Professor Wolfgang Schmidt on his 75th birthday

ON THE STRUCTURE OF BOUNDED QUERIES TO ARBITRARY NP SETS

Transcription:

JOURNAL OF COMPUTER AND SYSTEM SCIENCES 13, 69--73 (1976) A Nonlinear Lower Bound on Linear Search Tree Programs for Solving Knapsack Problems* DAVID DOBKIN Department of Computer Science, Yale University, New Haven, Connecticut 06520 Received October 7, 1975; revised February 25, 1976 By the method of region counting, a lower bound of n logs n queries is obtained on linear search tree programs which solve the n-dimensional knapsack problem. The region counting involves studying the structure of a subset of the hyperplanes defined by the problem. For this subset of hyperplanes, the result is shown to be tight. 1. INTRODUCTION In a previous paper [2], we showed that any linear search tree which determines membership in a union of a disjoint family of k open sets requires at least log2 k queries. This result can actually be extended [4] to show that any search tree using queries which are polynomials of degree ~ p requires at least (l/p)log2 k queries to determine membership in a union of a disjoint family of k open sets. In the present paper we use these results to show that any linear search tree for solving the knapsack problem of dimension n requires at least n log2 n queries. This result will follow by showing that a subset of this problem gives rise to at least 89 regions. Although the linear search tree model does not appear to have all the power of the Turing machine model for which the P vs NP model was first proposed, this nonlinear lower bound is derived on the model which is actually used for solving knapsack-type problems. To begin, we review some definitions from [2] to set notation for this paper. The knapsack problem of dimension n is commonly stated as follows. Given an (n -~ 1)-tuple {x 1... Xn, b}, does there exist a vector (a I,..., %) all of whose comn ponents are 0 or 1 such that ~i=1 aixi = b? We can restate this problem in a geometric fashion by observing that determining whether the (n + 1)-tuple (x 1... Xn, b) gives rise to a solvable knapsack problem is equivalent to determining whether the point (Xl/b, xz/b,..., xn/b) lies on any of a set of hyperplanes in R n, n-dimensional Euclidean space. In particular, if 1 ~ i ~ 2 n -- 1 is represented in its binary expansion * Portions of this research were supported by the ONR under Grant N00014-75-C-0450 and by NSF Travel Grant DCR75-15624. Copyright (.62 1976 by Academle Press, Inc. All rights of reproduction in any form reserved. 69

70 DAVID DOBKIN as i : i,~2 ~-1 +-&_x2n-2+--.+ i 2.2 + il, we can represent the ith of these hyperplanes as Hi(v ) -- 1 : 0 where Hi(v ) = ~-~n 5=1 ijvj In all that follows we shall use this second formulation, which is trivially equivalent to the first. The linear search tree model is defined as the set of programs consisting of statements of three types, Li: L~,: L~: iff(x) R0 then go tolj else go tolk, Halt and accept, Halt and reject, where f(x) is a linear form in the components of the n-vector x and R is one of the relations >, <, or =. This model was first studied by Rabin [3]. This model can be extended to polynomial search trees of degree ~ p by allowingf(x) to be a polynomial of degree ~ p. The result of [2] can then be stated as follows. THEOREM 1. Any linear search tree for determining membership in Ui~t Ai, where each A i is an open subset of ~ and the A i are pairwise disjoint requires at least logz ] I ] queries in the worst case. As observed, we have the corollary. COROLLARY. Any polynomial search tree of degree ~ p for determining membership in Ui~l Ai for {Ai}i~ a family of open subsets of R" which are pairwise disjoint requires (l/p) logs l li queries in the worst case. Our main result will be to show that a subset of the knapsack hyperplanes divide E'~ into at least 89 disjoint open sets, so that solving the knapsack problem (i.e., determining membership in these sets) requires at least n log 2 n queries in the worst case. The hyperplanes which we will consider are those Hi such that the binary expansion of i has exactly two ones in it corresponding to solutions of the problem: Given (x 1..., x,, b), do there exist i :/: j such that xi + xj b? Since the number of regions generated by all the hyperplanes is at least as many as those generated by this subset, this lower bound provides a lower bound on the entire problem. Furthermore, we will show that this lower bound is tight for the problem at hand by demonstrating an appropriate algorithm. 2. A LOWER BOUND In this section, we give a characterization of the regions generated by the hyperplanes in the problem under consideration. To begin, we observe that we are seeking to determine how many regions exist which can be expressed as the intersections of

KNAPSACK PROBLEMS 71 half-spaces of the form x i + x; > 1 or x i + xj ~< 1 for 1 ~ i <j ~ n. We may represent these spaces by Sij ~ {x ~ ~ I xi + xj < 1} and Si~ ~ {x ~ ~ [ x i + xj > 1} for 1 ~ i < j ~ n. We may define ~ as the set of all pairs of the form (i, j) for 1 ~iv6j~n and then for each subset of K of ~, we ask whether 3K- (-](ia)~k S~J n N(ia)~g Sij is empty or not. There are 2(2 ) such subsets and at first one is tempted to believe that each subset gives rise to an open subset of N~. However, we may observe that for n ~ 4, if K = {(1, 2), (3, 4)}, then ~K = S12 n 834 n $13 (~ $2~ c~ S1~ ~ S~3 is empty since a point in this set would satisfy x~ + x 2 < 1, x3 + x4 < 1 as well as x~ + x a > 1, x 2 + x 4 > 1, a contradiction. Furthermore, it is clear that if /s and K 2 are different subsets of ~ such that 3~ca and 8x2 are nonempty, then these intersections are disjoint open sets. Openness follows since these sets are the intersections of finite collections of open sets and to show that they are disjoint we observe that there is an (i,j) which belongs to K~ and not K~ (or to K 2 and not K~) so that every point in ~c~ satisfies xi + x~ < 1 and every point in ~x~ satisfies xi + x~ > 1. Now, we wish to determine conditions of K C ~ such that 3K is nonempty. We begin with one such set and apply the appropriate permutations to generate at least ~n.a I others. LEMIVlA. If K ~- {(i,j) l i + j ~ n + 1}, then3kisnonempty. Proof. Let x, -- (i/(n + 3/2)) for 1 ~i~n; then x i+xj-< 1 if and only if i + j < n + 3/2 if and only if (i, j) ~ K. Hence the point (x 1,..., x~) is an element of K, which is therefore nonempty. We observe that K is a subset of #Tn consisting of [n2/2j elements and that i occurs in exactly n -- i pairs of K if i ~ In/2] and n + 1 -- i pairs if i > In/2]. For each permutation Tr of n elements we define 7r(K) as {(Tr(i), 7r(j) [ (i,j) ~ K} and observe that, for two permutations ~1 and ~2,7rl(K) and 7r2(K ) are different if either of the following is not true: (i) ~rl(i ) = ~r2(i ) if i r {[ni21, [n/2] + 1}, (ii) {Trl([n/2]), 7rl([n/2] + 1)} = {~r2([n/2]), ~r2([n/2 ] + 1)). Thus, no three permutations generate the same ~r(k). THEOREM 2. empty sets ~K. There are at least 89 different subsets K of 3-~ which give rise to non- Using this theorem in concert with Theorem 1, we obtain the main result of this paper. THEOREM 3. Any linear search tree for solving the n-dimensional knapsack problem (or even the n-dimensional knapsack problem restricted to solutions of the form x i + xj ~ b) must require n log n -- 1.o.t. queries in the worst case.

72 DAVID DOBKIN Furthermore, since polynomial queries can be simulated by linear queries, we have COROLLARY. Any polynomial search tree of degree ~ p requires at least (1/p)n logs n queries in the worst case to solve the n-dimensional knapsack problem. 3. AN UPPER BOUND In this section, a method is given to match the lower bound given in the previous section for the restricted knapsack problem mentioned there. Given an input (x I,..., x~, b), we wish to determine if there exist distinct integers i and j such that xi + x~ ~ b. To do so, we may use the following ALGORITHM KS2. (I) Sort x I... x~ to yield a sorted list Yl...,Yn such that for i >j, y~ ~ yj. (II) Test to determine if anyy i is 89 if two or more are, halt and accept the input. If one is, drop this element from the list and proceed to Step III. If none is, proceed to Step III. (III) For each i, 1 ~ i ~ n, determine the least ji such that Yi -}-YJ, < 1, if yi ~-YJ~-I - 1 halt and accept; otherwise continue. (IV) Halt and reject. Step I in this algorithm requires n log2 n steps, Step II can be done in log2 n steps by binary search and Step III can be done in at most 2n steps by a merging strategy. Therefore, the entire algorithm requires n logz n -]- l.o.t, steps matching the leading term in the upper bound. 4. CONCLUSIONS AND RESEARCH PROBLEMS The major results of this paper are a lower bound of n log n queries for the solution of the knapsack problem with a linear search tree and a similar upper bound for the restricted version of the problem under consideration. These results may possibly be improved by considering less restricted versions of the ptoblem. For example, it is reasonable to conjecture that a better lower bound could be obtained by considering the regions generated by all 2 ~ knapsack hyperplanes rather than merely a subset of (3) such hyperplanes. Unfortunately, Strassen [4] has observed that no better lower bound than O(n ~) can be obtained by applying Theorem 1, as at most 0(2 '~) regions will be generated by a set of 2" hyperplanes in W*. A lower bound of this type is given in [1].

KNAPSACK PROBLEMS 73 REFERENCES 1. D. DOBKIN AND R. LIPTON, A lower bound of 89 n 2 on the knapsack problem, in preparation. 2. D. DOBKIN AND R. LIPTON, On the complexity of computations under varying sets of primitive operations, in "Proceedings of the Second GI- Symposium on Automata Theory and Formal Languages," pp. 110-119, Springer-Verlag, New York/Berlin, 1975. 3. M. RABIN, Proving simultaneous positivity of linear forms, J. Comput. System Sci. 6 (1972), 639-650. 4. V. STRASSEN, personal communication, May 1975.