On the Fine-grained Complexity of One-Dimensional Dynamic Programming
aa r X i v : . [ c s . CC ] M a r On the Fine-grained Complexity of One-DimensionalDynamic Programming
Marvin K¨unnemann Ramamohan Paturi Stefan SchneiderUniversity of California, San DiegoMarch 6, 2017
Abstract
In this paper, we investigate the complexity of one-dimensional dynamic programming , ormore specifically, of the Least-Weight Subsequence (
LWS ) problem: Given a sequence of n dataitems together with weights for every pair of the items, the task is to determine a subsequence S minimizing the total weight of the pairs adjacent in S . A large number of natural problemscan be formulated as LWS problems, yielding obvious O p n q -time solutions.In many interesting instances, the O p n q -many weights can be succinctly represented. Yetexcept for near-linear time algorithms for some specific special cases, little is known aboutwhen an LWS instantiation admits a subquadratic-time algorithm and when it does not. Inparticular, no lower bounds for
LWS instantiations have been known before. In an attemptto remedy this situation, we provide a general approach to study the fine-grained complexityof succinct instantiations of the LWS problem. In particular, given an
LWS instantiationwe identify a highly parallel core problem that is subquadratically equivalent . This provideseither an explanation for the apparent hardness of the problem or an avenue to find improvedalgorithms as the case may be.More specifically, we prove subquadratic equivalences between the following pairs (an
LWS instantiation and the corresponding core problem) of problems: a low-rank version of
LWS and minimum inner product, finding the longest chain of nested boxes and vector domination,and a coin change problem which is closely related to the knapsack problem and p min , `q - convolution . Using these equivalences and known SETH -hardness results for some of thecore problems, we deduce tight conditional lower bounds for the corresponding
LWS instantia-tions. We also establish the p min , `q - convolution -hardness of the knapsack problem. Further-more, we revisit some of the LWS instantiations which are known to be solvable in near-lineartime and explain their easiness in terms of the easiness of the corresponding core problems.
Dynamic programming (DP) is one of the most fundamental paradigms for designing algorithmsand a standard topic in textbooks on algorithms. Scientists from various disciplines have developedDP formulations for basic problems encountered in their applications. However, it is not clear
This research is supported by the Simons Foundation. This research is support ed by NSF grant CCF-1213151from the Division of Computing and Communication Foundations. Any opinions, findings and conclusions or rec-ommendations expressed in this material are those of the authors and do not necessarily reflect the views of theNational Science Foundation.
SETH ) [27]. The longest common subsequence (LCS) problem isone such problem for which almost tight conditional lower bounds have been obtained recently. TheLCS problem is defined as follows: Given two strings x and y of length at most n , compute thelength of the longest string z that is a subsequence of both x and y . The standard DP formulationfor the LCS problem involves computing a two-dimensional table requiring O p n q steps. Thisalgorithm is only slower than the fastest known algorithm due to Masek and Paterson [34] by apolylogarithmic factor. However, there has been no progress in finding more efficient algorithmsfor this problem since the 1980s, which prompted attempts as early as in 1976 [6] to understandthe barriers for efficient algorithms and to prove lower bounds. Unfortunately, there have notbeen any nontrivial unconditional lower bounds for this or any other problem in general modelsof computation. This state of affairs prompted researchers to consider conditional lower boundsbased on conjectures such as 3-Sum conjecture [19] and more recently based on ETH [28] and
SETH [27]. Researchers have found
ETH and
SETH to be useful to explain the exact complexityof several NP -complete problems (see the survey paper [33]). Surprisingly, Ryan Williams [39] hasfound a simple reduction from the CNF-SAT problem to the orthogonal vectors problem whichunder
SETH leads to a matching quadratic lower bound for the orthogonal vectors problem. Thisin turn led to a number of conditional lower bound results for problems in P (including LCS andrelated problems) under SETH [7, 1, 11, 2, 23]. Also see [37] for a recent survey.The DP formulation of the LCS problem is perhaps the conceptually simplest example of a two-dimensional
DP formulation. In the standard formulation, each entry of an n ˆ n table is computedin constant time. The LCS problem belongs to the class of alignment problems which, for example,are used to model similarity between gene or protein sequences. Conditional lower bounds haverecently been extended to a number of alignment problems [9, 7, 1, 11, 3].In contrast, there are many problems for which natural quadratic-time DP formulations computea one-dimensional table of length n by spending O p n q -time per entry. In this work, we investigatethe optimality of such DP formulations and obtain new (conditional) lower bounds which matchthe complexity of the standard DP formulations. In this paper, weinvestigate the optimality of the standard DP formulation of the
LWS problem. A classic exampleof an
LWS problem is airplane refueling [25]: Given airport locations on a line, and a preferreddistance per hop k (in miles), we define the penalty for flying k miles as p k ´ k q . The goal isthen to find a sequence of airports terminating at the last airport that minimizes the sum of thepenalties. We now define the LWS problem formally.
Problem 1.1 ( LWS ) . We are given a sequence of n ` x , . . . , x n , weights w i,j Pt´
W, . . . , W u Y t8u for every pair i ă j of indices where the weights may also be functions of thevalues of data items x i , and an arbitrary function g : Z Ñ Z . The LWS problem is to determine T r n s which is defined by the following DP formulation. T r s “ ,T r j s “ min ď i ă j g p T r i sq ` w i,j for j “ , . . . , n. (1)2o formulate airplane refueling as an LWS problem, we let x i be the location of the i ’th airport, g be the identity function, and w i,j “ p x j ´ x i ´ k q .In the definition of the LWS problem, we did not specify the encoding of the problem (inparticular, the type of data items and the representation of the weights w i,j ) so we can capture alarger variety of problems: it not only encompasses classical problems such as the pretty printingproblem due to Knuth and Plass [31], the airplane refueling problem [25] and the longest increasingsubsequence (LIS) [18], but also the unbounded subset sum problem [36, 10], a more general coinchange problem that is effectively equivalent to the unbounded knapsack problem, 1-dimensional k -means clustering problem [24], finding longest R -chains (for an arbitrary binary relation R ), andmany others (for a more complete list of problems definitions, see Section 2).Under mild assumptions on the encoding of the data items and weights, any instantiation of the LWS problems can be solved in time O p n q using (1) for determining the values T r j s , j “ , . . . , n intime O p n q each. However, the best known algorithms for the LWS problems differ quite significantlyin their time complexity. Some problems including the pretty printing, airline refueling and LISturn out to be solvable in near-linear time, while no subquadratic algorithms are known for theunbounded knapsack problem or for finding the longest R -chain.The main goal of the paper is to investigate the optimality of the LWS
DP formulation forvarious problems by proving conditional lower bounds.
Succinct LWS instantiations.
In the extremely long presentation of an
LWS problem, theweights w i,j are given explicitly. This is however not a very interesting case from a computationalpoint of view, as the standard DP formulation takes linear time (in the size of the input) tocompute T r n s . In the example of the airplane refueling problem the size of the input is only O p n q assuming that the values of the data items are bounded by some polynomial in n . For such succinctrepresentations, we ask if the quadratic-time algorithm based on the standard LWS
DP formulationis optimal. Our approach is to study several natural succinct versions of the
LWS problem (byspecifying the type of data items and the weight function ) and determine their complexity. Werefer to Section 2 for examples of succinct instantiations of the LWS problem.
Our Contributions and Results.
The main contributions of our paper include a general frame-work for reducing succinct
LWS instantiations to what we call the core problems and provingsubquadratic equivalences between them. The subquadratic equivalences are interesting for tworeasons. First, they allows us to conclude conditional lower bounds for certain
LWS instantiations,where previously no lower bounds are known. Second, subquadratic (or more general fine-grained)equivalences are more useful since they let us translate hardness as well as easiness results.Our results include tight (up to subpolynomial factors) conditional lower bounds for several
LWS instantiations with succinct representations. These instantiations include the coin changeproblem, low rank versions of the
LWS problem, and the longest subchain problems. Our resultsare somewhat more general. We propose a factorization of the
LWS problem into a core problemand a fine-grained reduction from the
LWS problem to the core problem. The idea is that coreproblems (which are often well-know problems) capture the hardness of the
LWS problem and actas a potential barrier for more efficient algorithms. While we do not formally define the notion ofa core problem, we identify several core problems which share several interesting properties. Forexample, they do not admit natural DP formulations and are easy to parallelize. In contrast, thequadratic-time DP formulation of
LWS problems requires the entries T r i s to be computed in order,suggesting that the general problem might be inherently sequential. In all our applications, the function g is the trivial identity function. Static-LWS problem. We first reduce the
LWS problem to the
Static-LWS problem in a general way and then reduce the
Static-LWS problem to a core problem. The firstreduction is divide-and-conquer in nature and is inherently sequential. The latter reduction is spe-cific to the instantiation of the LWS problem. The
Static-LWS problem is easy to parallelize anddoes not have a natural DP formulation. However, the problem is not necessarily a natural problem.The
Static-LWS problem can be thought of as a generic core problem, but it is output-intensive.In the other direction, we show that many of the core problems can be reduced to the correspond-ing
LWS instantiations thus establishing an equivalency between LWS instantiations and their coreproblems. This equivalence enables us to translate both the hardness and easiness results (i.e., thesubquadratic-time algorithms) for the core problems to the corresponding LWS instantiations.The first natural succinct representation of the
LWS problem we consider is the low rank
LWS problem, where the weight matrix W “ p w i,j q is of low rank and thus representable as W “ L ¨ R where L and R T are p n ˆ n o p q q -matrices. For this low rank LWS problem, we identifythe minimum inner product problem (
MinInnProd ) as a suitable core problem. It is only naturaland not particularly surprising that
MinInnProd can be reduced to the low-rank LWS problemwhich shows the
SETH -hardness of the low-rank
LWS problem. The other direction is moresurprising: Inspired by an elegant trick of Vassilevska Williams and Williams [40], we are able toshow a subquadratic-time reduction from the (highly sequential) low-rank
LWS problem to the(highly parallel)
MinInnProd problem. Thus, the very compact problem
MinInnProd problemcaptures exactly the complexity of the low-rank LWS problem (under subquadratic reductions).We also show that the coin change problem is subquadratically equivalent to the p min , `q - convolution problem. In the coin change problem, the weight matrix W is succinctly given as aToeplitz matrix. At this point, the conditional hardness of the p min , `q - convolution problem isunknown. The quadratic-time hardness of the p min , `q - convolution problem would be very inter-esting, since it is known that the p min , `q - convolution problem is reducible to the 3-sum problemand the APSP problem, However, recent results give surprising subquadratic-time algorithms forspecial cases of p min , `q - convolution [14]. If these subquadratic-time algorithms extend to thegeneral p min , `q - convolution problem, our equivalence result also provides a subquadratic-timealgorithm for the coin change problem and the closely related unbounded knapsack problem. As acorollary, our reductions also give a quadratic-time p min , `q - convolution -based lower bound forthe bounded case of knapsack.We next consider the problem of finding longest chains: here, we search for the longest sub-sequence (chain) in the input sequence such that all adjacent pairs in the subsequence are con-tained in some binary relation R . We show that for any binary relation R satisfying certainconditions the chaining problem is subquadratically equivalent to a corresponding (highly par-allel) selection problem. As corollaries, we get equivalences between finding the longest chain ofnested boxes ( NestedBoxes ) and
VectorDomination as well as between finding the longest sub-set chain (
SubsetChain ) and the orthogonal vectors ( OV ) problem. Interestingly, these resultshave algorithmic implications: known algorithms for low-dimensional vector domination and low-dimensional orthogonal vectors translate to faster algorithms for low-dimensional NestedBoxes and
SubsetChain for small universe size.Table 1 lists the
LWS succinct instantiations (as discussed above) and their corresponding coreproblems. All LWS instantiations and core problems considered in this paper are formally definedin Section 2.Finally, we revisit classic problems including the longest increasing subsequence problem, the4 ame Weights Equivalent Core Reference
Coin Change Toeplitz matrix: p min , `q - convolution Theorem 4.8 w i,j “ w j ´ i Remark:
Subquadratically equivalent to
UnboundedKnapsack
LowRankLWS Low rank representation:
MinInnProd
Theorem 3.9 w i,j “ x σ i , µ j y R -chains matrix induced by R : Selection p R q Theorem 5.3 w i,j “ w j if R p x i , x j q and o/w Theorem 5.7 Remark:
Result below are corollaries.NestedBoxes w i,j “ ´ B j contains B i VectorDomination
SubsetChain w i,j “ ´ S i Ď S j OrthogonalVectors
Table 1: Summary of our results
Name Weights ˜ O p n q -time reducible to Reference Longest Increasing matrix induced by R ă : Sorting [18],Subsequence w i,j “ ´ x i ă x j Observation 2Unbounded Subset Toeplitz t , matrix: Convolution [10],Sum w i,j “ w j ´ i P t , Observation 3Concave 1-dim. DP concave matrix: SMAWK problem [25, 21, 38], w i,j ` w i ,j ď w i ,j ` w i,j Observation 4for i ď i ď j ď j Table 2: Near-linear time algorithms following from the proposed framework.unbounded subset sum problem and the concave
LWS problem and analyze the
Static-LWS instantiations to immediately infer that the corresponding core problem can be solved in near-lineartime. Table 2 gives an overview of some of the problems we look at in this context.
Related Work.
LWS has been introduced by Hirschberg and Lamore [25]. If the weight functionsatisfies the quadrangle inequality formalized by Yao [41], one obtains the concave LWS problem, forwhich they give an O p n log n q -time algorithm. Subsequently, improved algorithms solving concaveLWS in time O p n q were given [38, 21]. This yields a fairly large class of weight functions (including,e.g., the pretty printing and airplane refueling problems) for which linear-time solutions exist. Togeneralize this class of problems, further works address convex weight functions [20, 35, 30] as wellas certain combinations of convex and concave weight functions [16] and provide near-linear timealgorithms. For a more comprehensive overview over these algorithms and further applications ofthe LWS problem, we refer the reader to Eppstein’s PhD thesis [17].Apart from these notions of concavity and convexity, results on the succinct LWS problemsare typically more scattered and problem-specific (see, e.g., [18, 31, 10, 24]; furthermore, a closelyrelated recurrence to (1) pops up when solving bitonic TSP [15]). An exception to this rule is astudy of the parallel complexity of LWS [22]. Organization.
Section 3 contains the result on low-rank
LWS . This is also where we formally See Section 2 for definitions. A weight function is convex if it satisfies the inverse of the quadrangle inequality.
Static-LWS . Section 4 proves the subquadratic equivalence of the coin change problemand p min , `q - convolution , while Section 5 discusses chaining problems and their correspondingselection (core) problem. Our results on near-linear time algorithms are given in Section 6. In this section, we state our notational conventions and list the main problems considered in thiswork.Problem A subquadratically reduces to problem B , denoted A ď B , if for any ε ą δ ą B with time O p n ´ ε q implies an algorithm for A with time O p n ´ δ q . We call the two problems subquadratically equivalent, denoted A ” B , if there aresubquadratic reductions both ways.We let r n s : “ t , . . . , n u . When stating running time, we use the notation ˜ O p¨q to hide poly-logarithmic factors. For a problem P , we write T P for its time complexity. We generally assumethe word-RAM model of computation with word size w “ Θ p log n q . For most problems defined inthis paper, we consider inputs to be integers in the range t´ W, . . . , W u where W fits in a constantnumber of words . For vectors, we use d for the dimension and generally assume d “ n o p q . Core Problems and Hypotheses.
One of the most popular problems in the field of quadratic-time conditional hardness is the following problem.
Problem 2.1 (Orthogonal Vectors ( OV )) . Given a , . . . , a n , b , . . . , b n P t , u d , determine if thereis a pair i, j satisfying x a i , b j y “ OV (and the related problems below) we assume d “ n o p q . Thus the naivealgorithm solves OV in time O p n ¨ d q “ O p n ` o p q q .One of the reasons for the popularity of OV is its surprising connection to the Strong ExponentialTime Hypothesis ( SETH ) [27]: It states that for every ε ą k , such that the k -SATproblem requires time Ω p p ´ ε q n q . By an elegant reduction due to Williams [39], OV is quadratic-time SETH -hard, i.e., there is no algorithm with running time time O p n ´ ε q for any ε ą SETH is false.We consider the following generalizations of OV . Problem 2.2 ( MinInnProd ) . Given a , . . . , a n , b , . . . , b n P t´
W, . . . , W u d and a natural number r P Z , determine if there is a pair i, j satisfying x a i , b j y ď r . Problem 2.3 ( AllInnProd ) . Given a , . . . , a n P t´
W, . . . , W u d and b , . . . , b n P t´
W, . . . , W u d ,determine for all j P r n s , the value min i Pr n s x a i , b j y . Problem 2.4 ( VectorDomination ) . Given a , . . . , a n , b , . . . , b n P t´
W, . . . , W u d determine ifthere is a pair i, j such that a i ď b j component-wise. Problem 2.5 ( SetContainment ) . Given sets a , . . . , a n , b , . . . , b n Ď r d s given as vectors in t , u d determine if there is a pair i, j such that a i Ď b j .Note that SetContainment is a special case of
VectorDomination and computationallyequivalent to OV , as x a, b y “ a Ď b (in this slight misuse of notation we think ofthe Boolean vectors a, b as sets and let ¯ b denote the complement of b ). For the purposes of our reductions, even values up to W “ n o p q would be fine. OV , these problems are also quadratic-time SETH -hard. However, the converse does not neces-sarily hold. In particular, the strongest currently known upper bounds differ: while for OV and SetContainment for small dimension d “ c ¨ log p n q , an n ´ { O p log c q -time algorithm is known [4],for VectorDomination the best known algorithm runs only in time n ´ { O p c log c q [26, 13].Another fundamental quadratic-time problem is p min , `q - convolution , defined below. Problem 2.6 ( p min , `q - convolution ) . Given vectors a “ p a , . . . , a n ´ q , b “ p b , . . . , b n ´ q Pt´ W, . . . , W u n , determine its p min , `q - convolution a ˚ b defined by p a ˚ b q k “ min ď i,j ă n : i ` j “ k a i ` b j for all 0 ď k ď n ´ . As opposed to the classical convolution, which we denote as a f b , solvable in time O p n log n q using FFT, no strongly subquadratic algorithm for p min , `q - convolution is known. Compared to OV , we have less support for believing that no O p n ´ ε q -time algorithm for p min , `q - convolution exists. In particular, interesting special cases can be solved in subquadratic-time [14] and thereare subquadratic-time co-nondeterministic and nondeterministic algorithms [8, 12]. At the sametime, breaking this long-standing quadratic-time barrier is a prerequisite for progress on refutingthe 3SUM and APSP conjectures. This makes it an interesting target particularly for provingsubquadratic equivalences , since both positive and negative resolutions of this open question appearto be reasonable possibilities. Succinct LWS Versions and Applications.
In the definition of LWS (Problem 1.1) we did notfix the encoding of the problem (in particular, the choice of data items, as well the representationof the weights w i,j and the function g ). Assuming that g can be determined in ˜ O p q and that W “ poly p n q , this problem can naturally be solved in time ˜ O p n q , by evaluating the centralrecurrence (1) for each j “ , . . . , n – this takes ˜ O p n q time for each j , since we take the minimumover at most n expressions that can be evaluated in time ˜ O p q by accessing the previously computedentries T r s , . . . , T r j ´ s as well as computing g . In all our applications, g will be the identityfunction, hence it will suffice to define the type of data items and the corresponding weight matrix.Throughout this paper, whenever we fix a representation of the weight matrix W “ p w i,j q i,j , wedenote the corresponding problem LWS p W q .In the remainder of this section, we list problems considered in this paper that can be expressedas an LWS instantiations. At this point, we typically give the most natural formulations of theseproblems – the corresponding definitions as LWS instantiations are given in the correspondingsections.We start off with a natural succinct “low-rank” version of LWS . Problem 2.7 ( LowRankLWS ) . LowRankLWS is the
LWS problem where the weight matrix W is of rank d ! n . The input is given succinctly as two matrices A and B , which are p n ˆ d q - and p d ˆ n q -matrices respectively, and W “ A ¨ B .Alternatively, LowRankLWS may be interpreted in the following way: There are places0 , , . . . , n , each of which is equipped with an in- and an out-vector. The cost of going from place i to j is then defined as the inner product of the out-vector of i with the in-vector of j , and thetask is to compute the minimum-cost monotonically increasing path to reach place n starting from0. In Section 3, we prove subquadratic equivalence to MinInnProd .We consider the following coin change problem and variations of
Knapsack .7 roblem 2.8 ( CC ) . We are given a weight sequence w “ p w , . . . , w n q with w i P t´
W, . . . , W u Yt8u , i.e., the coin with value i has weight w i . Find the weight of the multiset of denominations I such that ř i P I i “ n and the sum of the weights ř i P I w i is minimized. Problem 2.9 ( UnboundedKnapsack ) . We are given a sequence of profits p “ p p , . . . , p n q with p i P t , , . . . , W u , i.e., the item of size i has profit p i . Find the total profit of the multiset ofindices I such that ř i P I i ď n and the total profit ř i P I p i is maximized.Note that if we replace multiset by set in the above definition, we obtain the bounded versionof the problem, which we denote by Knapsack .We remark that our perspective on CC and UnboundedKnapsack (as well as
Unbounded-SubsetSum below) using LWS is slightly different than many classical accounts of Knapsack: Wedefine the problem size as the budget size instead of the number of items, thus our focus is onpseudo-polynomial time algorithms for the typical formulations of these problems.Note that we state the coin change problem as allowing positive or negative weights, but
Un-boundedKnapsack only allows for positive profits. Furthermore, CC is a minimization problem,while UnboundedKnapsack is a maximization problem. For CC , the maximization problem istrivially equivalent as we can negate all weights. Furthermore, we can freely translate the range ofthe weights in the coin change problem by defining w i “ i ¨ M ` w i for all i and sufficiently large orsmall M . The most significant difference between CC and UnboundedKnapsack is that for CC the indices have to sum to exactly n , while for UnboundedKnapsack n is only an upper bound.We will encounter an important generalization of the two problems above, defined as follows. Problem 2.10 ( oiCC ) . The output-intensive version of CC is to determine, given an input to CC , the weight of the optimal multiset such that the denominations sum up to j for all ď j ď n .It is easy to see that oiCC is at least as hard as both CC and UnboundedKnapsack . Wewill relate the above
Knapsack variants to p min , `q - convolution in Section 4.In Section 6, we will revisit near-linear time algorithms for the following special case of the coinchange problem. Problem 2.11 ( UnboundedSubsetSum ) . Given a subset S Ď r n s , determine whether there is amultiset of elements of S that sums up to exactly n .We also discuss problems where the goal is to find the longest chain among data items, wherethe notion of a chain is defined by some binary relation R . We first give the definition of the generalproblem which is parameterized by R . Problem 2.12 ( ChainLWS ) . Fix a set X of objects and a relation R Ď X ˆ X . The WeightedChain Least-Weight Subsequence Problem for R , denoted ChainLWS p R q , is the following problem:Given data items x , . . . , x n P X , weights w , . . . , w n ´ P t´
W, . . . , W u , find the weight of theincreasing sequence i “ ă i ă i ă . . . ă i k “ n such that for all j with 1 ď j ď k the pair p x i j ´ , x i j q is in the relation R and the weight ř k ´ j “ w i j is minimized.The following problems are specializations of this problem for different relations. Problem 2.13 ( NestedBoxes ) . Given n boxes in d dimensions, given as non-negative, d -dimensionalvectors p b , . . . , b n q , find the longest chain such that each box fits into the next (without rotation).We say box that box a fits into box b if for all dimensions 1 ď i ď d , a i ď b i .8 roblem 2.14 ( SubsetChain ) . Given n sets from a universe U of size d , given as Boolean, d -dimensional vectors p b , . . . , b n q , find the longest chain such that each set is a subset of the next.Note that SubsetChain is a special case of
NestedBoxes . Problem 2.15 ( LIS ) . Given a sequence of n integers x , . . . , x n , compute the length of the longestsubsequence that is strictly increasing.Finally, we will briefly discuss the following class of LWS problems that turn out to be solvablein near-linear time. Problem 2.16 ( ConcLWS ) . Given an LWS instance in which the weights satisfy the quadrangleinequality w i,j ` w i ,j ď w i ,j ` w i,j for i ď i ď j ď j , solve it. The weights are not explicitly given, but each w i,j can be queried in constant time. Let us first analyze the following canonical succinct representation of a low-rank weight matrix W “ p w i,j q i,j : If W is of rank d ! n , we can write it more succinctly as W “ A ¨ B , where A and B are p n ˆ d q - and p d ˆ n q matrices, respectively. We can express the resulting natural LWS problemequivalently as follows. Problem 3.1 ( LowRankLWS ) . We define the following
LWS instantiation
LowRankLWS “ LWS p W LowRank q . Data items: out-vectors µ , . . . , µ n ´ P t´
W, . . . , W u d , in-vectors σ , . . . , σ n P t´
W, . . . , W u d Weights: w p i, j q “ x µ i , σ j y for 0 ď i ă j ď n In this section, we show that this problem is equivalent, under subquadratic reductions, to thefollowing non-sequential problem.
Problem 3.2 ( MinInnProd ) . Given a , . . . , a n , b , . . . , b n P t´
W, . . . , W u d and a natural number r P Z , determine if there is a pair i, j satisfying x a i , b j y ď r .We first give a simple reduction from MinInnProd that along the way proves quadratic-timeSETH-hardness of
LowRankLWS . Lemma 3.3.
It holds that T MinInnProd p n, d, W q ď T LowRankLWS p n ` , d ` , dW q ` O p nd q .Proof. Given a , . . . , a n , b , . . . , b n P t´
W, . . . , W u d , let O “ p , . . . , q P Z d be the all-zeroes vectorand define the following in- and out-vectors µ “ p dW, , O q , σ n ` “ p dW, dW, O q ,µ i “ p , dW, a i q , σ i “ p , , O q , for i “ , . . . , n,µ n ` j “ p , , O q , σ n ` j “ p dW, , b j q , for j “ , . . . , n. To prove correctness, we show that in the constructed
LowRankLWS instance, we have T r n ` s “ min i,j x a i , b j y , from which the results follows immediately. Inductively, we have T r i s “ i “ , . . . , n , since x µ i , σ i y “ ď i ă i ď n . Similarly, for j “ , . . . , n one can inductively show9hat T r n ` j s “ min ď i ď n,j ď j x a i , b j y , using that x µ , σ n ` j y “ p dW q ě max i,j x a i , b j y , x µ i , σ n ` j y “x a i , b j y and x µ n ` j , σ n ` j y “ ď i, j ď n and j ď j . Finally, using (1) x µ , σ n ` y “p dW q ě max i,j x a i , b j y and T r s “
0, (2) x µ i , σ n ` y “ p dW q ě max i,j x a i , b j y and T r i s “ i “ , . . . , n and (3) x µ n ` j , σ n ` y “ T r n ` j s “ min ď i ď n, ď j ď j x a i , b j y for all j “ , . . . , n ,we can finally determine T r n ` s “ min i,j x a i , b j y .To prove the other direction, we will give a quite general approach to compute the sequential LWS problem by reducing to a natural static subproblem of
LWS : Problem 3.4 ( Static-LWS p W q ) . Fix an instance of
LWS p W q . Given intervals I : “ t a ` , . . . , a ` N u and J : “ t a ` N ` , . . . , a ` N u , together with the correctly computed values T r a ` s , . . . , T r a ` N ` s , the Static Least-Weight Subsequence Problem ( Static-LWS ) asks to determine T r j s : “ min i P I T r i s ` w i,j for all j P J. Lemma 3.5 ( LWS p W q ď Static-LWS p W q ) . For any choice of W , if Static-LWS p W q can besolved in time O p N ´ ε q for some ε ą , then LWS p W q can be solved in time ˜ O p n ´ ε q .Proof. In what follows, we fix
LWS as LWS p W q and Static-LWS as Static-LWS p W q .We define the subproblem S pt i, . . . , j u , p t i , . . . , t j qq that given an interval spanned by 1 ď i ď j ď n and values t k “ min ď k ă i T r k s ` w k ,k for each point k P t i, . . . , j u , computes all values T r k s for k P t i, . . . , j u . Note that a call to S pr n s , p w , , . . . , w ,n qq solves the LWS problem, since T r s “ t k , k P r n s are correctly initialized.We solve S using Algorithm 1. We briefly argue correctness, using the invariant that t k “ Algorithm 1
Reducing
LWS to Static-LWS function S ( t i, . . . , j u , p t i , . . . , t j q ) if i “ j then return T r i s Ð t i m Ð r j ´ i s p T r i s , . . . , T r i ` m ´ sq Ð S pt i, . . . , i ` m ´ u , p t i , . . . , t i ` m ´ qq solve Static-LWS on the subinstance given by I : “ t i, . . . , i ` m ´ u and J : “ t i ` m, . . . , i ` m ´ u : Ź obtains values T r k s “ min i ď k ă i ` m T r k s ` w k ,k for k “ i ` m, . . . , i ` m ´ t k Ð min t t k , T r k su for all k “ i ` m, . . . , i ` m ´ p T r i ` m s , . . . , T r i ` m ´ sq Ð S pt i ` m, . . . , i ` m ´ u , p t i ` m , . . . , t i ` m ´ qq if j “ i ` m then T r j s : “ min t t j , min i ď k ă j T r k s ` w k,j u . return p T r i s , . . . , T r j sq min ď k ă i T r k s ` w k ,k in every call to S . If S is called with i “ j , then the invariant yields t i “ min ď k ă i T r k s ` w k ,i “ T r i s , thus T r i s is computed correctly. For the call in Line 5, theinvariant is fulfilled by assumption, hence the values p T r i s , . . . , T r i ` m ´ sq are correctly computed.For the call in Line 9, we note that for k “ i ` m, . . . , i ` m ´
1, we have t k “ min t t k , T r k su “ min t min ď k ă i T r k s ` w k ,k , min i ď k ă i ` m T r k s ` w k ,k u “ min ď k ă i ` m T r k s ` w k ,k . p T r i ` m s , . . . , T r i ` m ´ sq are correctlycomputed. Finally, if j “ i ` m , we compute the remaining value T r j s correctly, since t j “ min ď k ă i T r k s ` w k,j by assumption.To analyze the running time T S p n q of S on an interval of length n : “ j ´ i `
1, note thateach call results in two recursive calls of interval lengths at most n {
2. In each call, we need anadditional overhead that is linear in n and T Static-LWS p n { q . Solving the corresponding recursion T S p n q ď T S p n { q ` T Static-LWS p n { q ` O p n q , we obtain that an O p N ´ ε q -time algorithm Static-LWS , with 0 ă ε ă T LWS p n q ď T S p n q “ O p n ´ ε q . Similarly, an O p N log c N q -timealgorithm for Static-LWS would result in an O p n log c ` n q -time algorithm for LWS .For the special case of
LowRankLWS , it is straightforward to see that the static version boilsdown to the following natural reformulation.
Problem 3.6 ( AllInnProd ) . Given a , . . . , a n P t´
W, . . . , W u d and b , . . . , b n P t´
W, . . . , W u d ,determine for all j P r n s , the value min i Pr n s x a i , b j y . (Again, we typically assume that d “ n o p q and W “ n o p q .) Lemma 3.7 ( Static-LWS p W LowRank q ď AllInnProd ) . We have T Static-LWS p W LowRank q p n, d, W q ď T AllInnProd p n, d ` , nW q ` O p nd q . Proof.
Consider
Static-LWS p W LowRank q . Let I “ t a ` , . . . , a ` N u , J “ t a ` N ` , . . . , a ` N u and values T r a ` s , . . . , T r a ` N s be given. To determine T r j s “ min i P I T r i s ` w i,j for all j P J , it is sufficient to solve AllInnProd on the vectors a a ` , . . . , a a ` N , b a ` N ` , . . . , b a ` N Pt nW, . . . , nW u d ` defined by a i : “ p µ i , T r i sq b j “ p σ j , q , for all i P I, j P J, since then x a i , b j y “ T r i s ` x µ i , σ j y “ T r i s ` w i,j . The claim immediately follows (note that | T r i s| ď nW ).Finally, inspired by an elegant trick of [40], we reduce AllInnProd to MinInnProd . Lemma 3.8 ( AllInnProd ď MinInnProd ) . We have T AllInnProd p n, d, W q ď O p n ¨ T MinInnProd p? n, d ` , ndW q ¨ log nW q . Proof.
We first observe that we can tune
MinInnProd to also return a witness p i, j q with x a i , b j y ď r , if it exists. To do so, we replace each a i by the p d ` q -dimensional vector a i “ p a i ¨ n, p i ´ q n, ´ q and similarly, each b j by the p d ` q -dimensional vector b j “ p b j ¨ n, ´ , j ´ q . Clearly, we have x a i , b j y “ x a i , b j y n ´ p i ´ q n ´ p j ´ q . Thus x a i , b j y ď rn if and only if x a i , b j y ď r since i, j P r n s .Using a binary search over r , we can find min i,j x a i , b j y , from whose precise value we can determinealso a witness, if it exists. Thus the running time wit p n, d, W q for finding such a witness is boundedby O p log nW q ¨ T MinInnProd p n, d ` , nW q .To solve AllInnProd , i.e., to compute p j : “ min i Pr n s x a i , b j y for all j P r n s , we employ aparallel binary search. Consider in particular the following problem P : Given arbitrary r , . . . , r n ,determine for all j P r n s whether there exists i P r n s such that x a i , b j y ď r j . We will show belowthat this problem can be solved in time O p n ¨ wit p? n, d ` , dW qq . The claim then follows, sincestarting from feasible intervals R “ ¨ ¨ ¨ “ R n “ t´ dW , . . . , dW u satisfying p j P R j , we can11alve the sizes of each interval simultaneously by a single call to P . Thus, after O p log p dW qq calls, the true values p j can be determined, resulting in the time guarantee T AllInnProd p n, d, w q “ O p n ¨ wit p? n, d ` , dW q ¨ log p dW qq “ O p n ¨ T MinInnProd p? n, d ` , ndW q log p nW qq , as desired.We complete the proof of the claim by showing how to solve P . Without loss of generality, wecan assume that r j ď dW for every j , since no larger inner product may exist. We group thevectors a , . . . , a n in g : “ r ? n s groups A , . . . , A g of size at most ? n each, and do the same for thevectors b , . . . , b n to obtain B , . . . , B g . Now, we iterate over all pairs of groups A k , B ℓ , k, ℓ P r g s :For each such choice of pairs, we do the following process. For each vector a i P A k , we definethe p d ` q -dimensional vector ˜ a i : “ p a i , ´ q and for every vector b j P B ℓ , we define ˜ b j : “ p b j , r j q .In the obtained instance t ˜ a i u a P A k , t ˜ b j u b P B ℓ , we try to find some i, j such that x ˜ a i , ˜ b j y ď
0, whichis equivalent to x a i , b j y ď r j . If we succeed in finding such a witness, we delete b j and ˜ b j (butremember its witness) and repeat finding witnesses (an deleting the witnessed b j ) until we cannotfind any. The process then ends and we turn to the next pair of groups.It is easy to see that for all j P r n s , we have x a i , b j y ď r j for some i P r n s if and only if theabove process finds a witness for b j at some point. To argue about the running time, we charge therunning time of every call to witness finding to either (1) the pair A k , B ℓ , if the call is the first callin the process for A k , B ℓ , or (2) to b j , if the call resulted from finding a witness for b j in the previouscall. Note that every pair A k , B ℓ is charged by exactly one call and every b j is charged by at mostone call (since in after a witness for b j is found, we delete b j and no further witness for b j can befound). Thus in total, we obtain a running time of at most p g ` n q ¨ wit p? n, d ` , dW q ` O p n q “ O p n ¨ wit p? n, d ` , dW qq . Theorem 3.9.
We have
LowRankLWS ” MinInnProd .Proof.
In Lemmas 3.3, 3.5, 3.7, and 3.8, we have proven
MinInnProd ď LowRankLWS “ LWS p W LowRank qď Static-LWS p W LowRank q ď AllInnProd ď MinInnProd , proving the claim. In this section, we focus on the following problem related to
Knapsack : Assume we are givencoins of denominations d , . . . , d m with corresponding weights w , . . . , w m and a target value n ,determine a way to represent n using these coins (where each coin can be used arbitrarily often)minimizing the total sum of weights of the coins used. Since without loss of generality d i ď n forall i , we can assume that m ď n and think of n as our problem size. In particular, we describe theinput by weights w , . . . , w n where w i denotes the weight of the coin of denomination i (if no coinwith denomination i exists, we set w i “ 8 ). It is straightforward to see that this problem is an LWS instance
LWS p W cc q , where the weight matrix W cc is a Toeplitz matrix. Problem 4.1 ( CC ) . We define the following
LWS instantiation CC “ LWS p W cc q . Data items: weight sequence w “ p w , . . . , w n q with w i P t´
W, . . . , W u Y t8u
Weights: w i,j “ w j ´ i for 0 ď i ă j ď n UnboundedKnapsack only in that it searches for the most profitable multiset of items of weight exactly n , instead of atmost n . Problem 4.2 ( UnboundedKnapsack ) . We are given a sequence of profits p “ p p , . . . , p n q with p i P t , , . . . , W u , i.e., the item of size i has profit p i . Find the total profit of the multiset ofindices I such that ř i P I i ď n and the total profit ř i P I p i is maximized.The purpose of this section is to show that both CC and UnboundedKnapsack are sub-quadratically equivalent to the p min , `q - convolution problem. Along the way, we also provequadratic-time p min , `q - convolution -hardness of Knapsack . Recall the definition of p min , `q - convolution . Problem 4.3 ( p min , `q - convolution ) . Given vectors a “ p a , . . . , a n ´ q , b “ p b , . . . , b n ´ q Pt´ W, . . . , W u n , determine its p min , `q - convolution a ˚ b defined by p a ˚ b q k “ min ď i,j ă n : i ` j “ k a i ` b j for all 0 ď k ď n ´ . As opposed to the classical convolution, which we denote as a f b , solvable in time O p n log n q using FFT, no strongly subquadratic algorithm for p min , `q - convolution is known. Compared tothe popular orthogonal vectors problem, we have less support for believing that no O p n ´ ε q -timealgorithm for p min , `q - convolution exists. In particular, interesting special cases can be solved insubquadratic time [14] and there are subquadratic-time co-nondeterministic and nondeterministicalgorithms [8, 12]. At the same time, breaking this long-standing quadratic-time barrier is a prereq-uisite for progress on refuting the 3SUM and APSP conjectures. This makes it an interesting targetparticularly for proving subquadratic equivalences , since both positive and negative resolutions ofthis open question appear to be reasonable possibilities.To obtain our result, we address two issues: (1) We show an equivalence between the problemof determining only the value T r n s , i.e., the best way to give change only for the target value n ,and to determine all values T r s , . . . , T r n s , which we call the output-intensive version . (2) We showthat the output-intensive version is subquadratic equivalent to p min , `q - convolution . Problem 4.4 ( oiCC ) . The output-intensive version of CC is to determine, given an input to CC ,all values T r s , . . . , T r n s .We first consider issue (2) and provide a p min , `q - convolution -based lower bound for oiCC . Lemma 4.5 ( p min , `q conv ď oiCC ) . We have T p min , `q conv p n, W q ď T oiCC p n, p W ` qq ` O p n q .Proof. We first do a translation of the input. Note that for any scalars α, β , we have p a ` α q˚p b ` β q “p a ˚ b q ` α ` β . Let M : “ W `
1. Without loss of generality, we may assume that2 M ď a i ď M for all i “ , . . . , n ´ , ď b j ď M for all j “ , . . . , n ´ . We now define a CC instance with a problem size n “ n and W “ M by defining w “ p M q n ˝ p a n ´ , . . . , a q ˝ p M q n ˝ p b n ´ , . . . , b q ˝ p M q n .
13e now claim that T r n ` i s “ p a ˚ b q n ´ i for i “ , . . . , n , which immediately yields the lemma.To do so, we will prove the following sequence of identities. T r i s “ M for i P r n s , (2) T r n ` i s “ a n ´ i for i P r n s , (3) T r n ` i s “ M for i P r n s , (4) T r n ` i s “ b n ´ i for i P r n s , (5) T r n ` i s “ p a ˚ b q n ´ i for i P r n s , (6)In the last line, we define, for our convenience, p a ˚ b q n ´ “ M (note that before, we defined onlythe entries p a ˚ b q k with k ď n ´ ď w i ď M for all i P r n s . It is easy to see that thisimplies 0 ď T r i s ď M for i P r n s .The identities in (2) are obvious.To prove the identities in (3) inductively over i , recall that T r n ` i s “ min j “ ,...,n ` i t T r n ` i ´ j s ` w j u . Observe that T r n ` i ´ j s ` w j ă M can only occur if j ě n ` w j “ M ), which implies n ` i ´ j ď n and T r n ` i ´ j s “ M except for the case j “ n ` i . Inthis case, we have T r n ` i ´ j s ` w j “ T r s ` w n ` i “ a n ´ i ď M .To prove the identities in (4), observe that for 1 ď j ď n , we have w j ě M by assumptionmin i a i ě M . Similarly, we have already argued that T r i s ě M for 1 ď i ď n . Thus, we caninductively show that T r n ` i s “ min t T r s ` w n ` i , min j “ ,..., n ` i ´ T r n ` i ´ j s ` w j u “ M using w n ` i “ M and that every sum in the inner minimum expression is at least 4 M .To prove the identities in (5), note that for T r n ` i ´ j s ` w j ă M to hold, we must haveeither n ` ď j ď n or 3 n ` ď j ď n ` i , since otherwise w j “ M . We observe that for n ` ď j ď n , we have w j ě min i a i ě M and T r n ` i ´ j s ě min i a i ě M . Thus, we mayassume that 3 n ` ď j ď n ` i . Note that in this case, we have T r n ` i ´ j s “ M except forthe case j “ n ` i , where we have T r n ` i ´ j s ` w j “ T r s ` w n ` i “ b n ´ i ă M .Finally, for the identities in (6), we might have T r n ` i s ` w j ă M only if n ` ď j ď n or3 n ` ď j ď n . First consider the case that i “
1. We have T r n ` s “ min t w n ` , min n ` ď j ď n T r n ` ´ j s looooooomooooooon “ M ` w j , min n ` ď j ď n T r n ` ´ j s looooooomooooooon “ M ` w j u “ M. Inductively over 1 ă i ď n , we will prove T r n ` i s “ p a ˚ b q n ´ i . By definition, T r n ` i s “ min t w n ` i , min n ` ď j ď n T r n ` i ´ j s ` w j , min n ` ď j ď n T r n ` i ´ j s ` w j u“ min t w n ` i , min ď j ď n T r n ` i ´ j s ` a n ´ j , min ď j ď n T r n ` i ´ j s ` b n ´ j u (7)Note thatmin ď j ď n T r n ` i ´ j s loooooomoooooon “ M for j ě i or j ă i ´ n ` b n ´ j “ min max t ,i ´ n uď j ď min t i ´ ,n u a n ´p i ´ j q ` b n ´ j “ p a ˚ b q n ´ i where the last equation follows from noting that the choice of j lets n ´ j and n ´ p i ´ j q rangeover all admissible pairs of values in t , . . . , n ´ u summing up to 2 n ´ i . Similarly, we inductivelyprove thatmin ď j ď n T r n ` i ´ j s ` a n ´ j “ min max t ,i ´ n uď j ď min t i ´ ,n u a n ´p i ´ j q ` b n ´ j “ p a ˚ b q n ´ i , a n ´ j ě M and T r n ` i ´ j s ě M whenever j ě i or j ă i ´ n (where the lastregime uses T r n ` i s “ p a ˚ b q n ´ i ě M inductively for i ă i ). Finally, since p a ˚ b q n ´ i ďp max i a i q ` p max j b j q ď M , we can simplify (7) to T r n ` i s “ p a ˚ b q n ´ i .Using the notion of Static-LWS , the other direction is straight-forward.
Lemma 4.6.
We have oiCC ď Static-LWS p W cc q ď p min , `q conv .Proof. In Lemma 3.5, we have in fact reduced the output-intensive version of
LWS p W q to ourstatic problem Static-LWS p W q , thus specialized to the coin change problem, we only need toshow that Static-LWS p W cc q subquadratically reduces to p min , `q - convolution . Consider aninput instance to Static-LWS given by I “ t a ` , . . . , a ` N u , J “ t a ` N ` , . . . , a ` N u andvalues T r i s , i P I . Defining M : “ W ` u : “ p nM, T r a ` s , . . . , T r a ` N s , N times hkkkkkkikkkkkkj nM, . . . , nM q ,v : “ p nM, w , . . . , w N q , we have p u ˚ v q N ` k “ min i “ ,...,N T r a ` i s ` w N ` k ´ i “ T r a ` N ` k s for all k “ , . . . , N , thusa p min , `q - convolution of two p n ` q -dimensional vectors solves Static-LWS p W cc q , yieldingthe claim.The last two lemmas resolve issue (2). We proceed to issue (1) and show that the output-intensive version is subquadratically equivalent to both CC and UnboundedKnapsack that onlyask to determine a single output number. We introduce the following notation for our convenience:Recall that weight w i denotes the weight of a coin of denomination i . For a multiset S Ď r n s , we let d p S q : “ ř i P S i denote its total denomination , i.e., sum of the denomination of the coins in S (wheremultiples uses of the same coin is allowed, since S is a multiset). We let w p S q : “ ř i P S w i denote theweight of the multiset. Analogously, when considering a Knapsack instance, p p S q “ ř i p i denotesthe total profit of the item (multi)set S .It is trivial to see that UnboundedKnapsack ď oiCC . Furthermore, we can give the followingsimple reduction from CC to UnboundedKnapsack . Oberservation 1 ( CC ď UnboundedKnapsack ď oiCC ) . We have T CC p n, W q ď T UnboundedKnapsack p n, nW q ` O p n q and T UnboundedKnapsack p n, W q ď T oiCC p n, W q ` O p n q .Proof. Given a CC instance, for every weight w i ă 8 , we create an item of size i and profit p i : “ i ¨ M ´ w i in our resulting UnboundedKnapsack instance for a sufficiently large constant M ě nW . This way, all profits are positive and every multiset S whose sizes sum up to B has a profitof p p S q “ B ¨ M ´ w p S q . Since M ě nW ě max S,d p S qď n | w p S q| , this ensures that the maximum-profit multiset of total size/denomination at most n has a total size/denomination of exactly n .Thus, the optimal multiset S ˚ has profit p p s ˚ q “ n ¨ M ´ min S : d p S q“ n w p S q “ n ¨ M ´ T r n s , fromwhich we can derive T r n s , as desired.Given an UnboundedKnapsack instance, we define for every item of size i and profit p i the corresponding weight w i “ ´ p i in a corresponding CC instance. It remains to compute all T r s , . . . , T r n s in this instance and determining their minimum, concluding the reduction.15he remaining part is similar in spirit to Lemma 3.8: Somewhat surprisingly, the same generalapproach works despite the much more sequential nature of the Knapsack/CoinChange problem –this sequentiality can be taken care of by a more careful treatment of appropriate subproblems thatinvolves solving them in a particular order and feeding them with information gained during theprocess.In what follows, to clarify which instance is currently considered, we let T I denote the T -table ofthe (oi)CC LWS problem (see Problem 1.1) corresponding to instance I . Dropping the superscriptalways refers to T I . Lemma 4.7 ( oiCC ď CC ) . We have that T oiCC p n, W q ď O p log p nW q ¨ n ¨ T CC p ? n, n W qq .Proof. Let I be an oiCC instance. To define our subproblems, we set N : “ r ? n s and define N ranges W : “ t , . . . , N u , . . . , W N : “ tp N ´ q N ` , . . . , N u . To determine all T r i s “ min S : d p S q“ i w p S q , we will compute T r i s for all i P W j successively over all j “ , . . . , N . The caseof j “ j “ O p N q “ O p n q . Considernow any fixed j ě T r i s for i P W j with j ă j have already beencomputed. We employ a parallel binary search. For every i P W j , we set up a feasible range R i initialized to t´ nW, . . . , nW u . We will maintain the invariant that T r i s P R i and will halve thesize of all feasible ranges R i , i P W j simultaneously using a small number of calls to the followingproblem P p M, ¯ W q : Given an instance J for CC specified by the weights ˜ w , . . . , ˜ w M , as well asvalues ˜ r , . . . , ˜ r M P t´ ¯ W , . . . , ¯ W u Y t´8 , , determine whether there exists an i P r M s with T J r i s ď ˜ r i , and if so, also return a witness i . We will later prove that this problem can be solved intime T P p M, ¯ W q “ O p T CC p M, M ¯ W qq . Clearly, after O p log p nW qq rounds of this parallel binarysearch, the feasible ranges consists of single values, thus determining the values of all T r i s for i P W j .Since we will show that halving all feasible ranges for range W j takes O p N q calls to P p N, nW q ,and we need to determine at most N ranges W , . . . , W N , the total time for this process amountsto O p log p nW q N ¨ T P p N, nW qq “ O p log p nW q N ¨ T CC p N, n W qq .We now describe how to use P to halve the size of all feasible ranges R i , i P W j : we set r i to the median of R i and aim to determine, for all i P W j , whether T r i s ď r i , i.e., whethersome multiset S with d p S q “ i and w p S q ď r i exists. We achieve this by the following process:For every k “ , . . . , j , we consider only two ranges, namely W k “ tp k ´ q N ` , . . . , kN u and W j ´ k Y W j ´ k ` “ tp j ´ k ´ q N ` , . . . , p j ´ k ` q N u . Let us first consider the case k ě
2. Here,we can define the 2 N -dimensional vectors a, b with a ℓ “ w p k ´ q N ` ℓ for ℓ P r N s , for ℓ ą N,b ℓ “ T rp j ´ k ´ q N ` ℓ s for ℓ P r N s . (Note that all T r i s , i P W j ´ k Y W j ´ k ` for k ě p min , `q - convolution a ˚ b of these vectors that correspondto summing up some w p k ´ q N ` ℓ with some T rp j ´ k ´ q N ` ℓ s such that p j ´ q N ` ℓ ` ℓ P W j .More specifically, we aim to determine whether there is some ℓ with p a ˚ b q N ` ℓ ď r p j ´ q N ` ℓ . To doso, we use the reduction from p min , `q - convolution to oiCC given in Lemma 4.5 to create an oiCC instance J . From this instance of problem size 12 N we can read off the values of a ˚ b as acertain interval in the corresponding T J -table. Thus, we can test whether p a ˚ b q N ` ℓ ď r p j ´ q N ` ℓ for some ℓ using P p N, nW q : for every ℓ , we let i be the unique index in the T J -table representing16he entry p a ˚ b q N ` ℓ and set ˜ r i : “ r p j ´ q N ` ℓ . For all other i , we set ˜ r i “ ´8 , thus enforcing thatthose indices will never be reported.For the special case k “
1, we proceed slightly differently: Here, we define the 2 N -dimensionalvectors a, b with a ℓ “ T r ℓ s for ℓ P r N s b ℓ “ T rp j ´ q N ` ℓ s for ℓ P r N s8 for ℓ ą N. (Note that all necessary T r i s , i P W Y W and T r i s , i P W j ´ have already been computed byassumption.) Analogously to above, we use P p N, nW q to test whether p a ˚ b q N ` ℓ ď r p j ´ q N ` ℓ using the reduction from p min , `q - convolution to oiCC given in Lemma 4.5.Once an i P W j has been reported to satisfy T r i s ď r i for some witnessing subproblem givenby the ranges W k and W j ´ k Y W j ´ k ` for some k , we set r i : “ ´8 and repeat on the samesubproblem k (analogously to the approach of Lemma 3.8). Note that for every j , we have j ď N subproblems and at most N many indices i P W j that can be reported. Thus, we use at most O p N q many calls to the subproblem P .To briefly argue correctness, note that by construction, we only determine some i with T r i s ď r i if we have found a witness. For the converse, let k be the largest index such that the optimal multisetfor i includes a coin in W k . Then the subproblem given by the ranges W k and W j ´ k Y W j ´ k ` will give a witness. This is obvious for k ě
2. For k “
1, note that no weight in W k with k ą T r i s P W j . In particular, the optimal multiset S can be representedas S “ S Y S , where S is a multiset of total denomination i P W j ´ and S is a multiset oftotal denomination i ´ i P W Y W . Thus, in the instance constructed from a, b , we will find thewitness T r i s ď T r i s ` T r i ´ i s ď r i .We finally describe how to solve P p M, ¯ W q in time T CC p M, M ¯ W q . First consider the problem without finding a witnessing i . Let ˜ w , . . . , ˜ w M , ˜ r , . . . , ˜ r M be an instance J of P p M, ¯ W q . We definea CC instance K of problem size 2 M by giving the weights w i : “ ˜ w i for all i P r M s ,w M ´ i : “ ´ M ¯ W ´ ˜ r i for all i P r M s . We claim that T K r M s ď ´ M ¯ W iff the input instance to P is a yes instance: First observe that T K r s “ T J r s , . . . , T K r M s “ T J r M s since the first M weights agree for both J and K . Considerthe case that there is some i P r M s with T J r i s ď ˜ r i . Then we have T K r M s ď T K r i s ` w M ´ i “p T J r i s ´ ˜ r i q ´ M ¯ W ď ´ M ¯ W , as desired. Conversely, assume that all T J r i s ą ˜ r i . We distinguishthe cases whether the optimal subsequence S uses only weights among ˜ w , . . . , ˜ w M or not. In thefirst case, since | ˜ w i | ď W for i P r M s , we have that w p S q ě M ¨ min i Pr n s | ˜ w i | ě ´ M ¯ W ą ´ M ¯ W .Otherwise, S uses exactly one weight among ˜ w M ` , . . . , ˜ w M . Let this weight be ˜ w M ´ i . Then w p S q “ T K r i s ` ˜ w M ´ i “ p T J r i s ´ ˜ r i q ´ M ¯ W ą ´ M ¯ W since T J r i s ą ˜ r i , yielding the claim.Very similar to Lemma 3.8, we can now tune the above reduction to also produce a witness i such that T J r i s ď ˜ r i . For this, we scale all weights w i , i P r M s by a factor of M and subtracta value of i ´ w i , i P r M s . It is easy to see that a yes instance K attains some value T K r M s “ ´ κ ¨ M ´ i for some integers κ ě ď i ă n , where i ` T J r i ` s ď ˜ r i ` , thus computing T K r M s lets us derive a witness as well. Thus, problem P canbe solved by a single call to T CC p M, M ¯ W q . 17he results above prove the following theorem. Theorem 4.8.
We have p min , `q conv ” CC ” UnboundedKnapsack . Furthermore, thebounded version of
Knapsack admits no strongly subquadratic-time algorithm unless p min , `q - convolution can be solved in strongly subquadratic time.Proof. Lemmas 4.5 and 4.6 prove p min , `q conv ” oiCC , while Observation 1 and Lemma 4.7establish oiCC ” CC ” UnboundedKnapsack , yielding the first claim.The second claim follows from inspecting the proofs of Lemma 4.5, Lemma 4.7 and the firstclaim of Observation 1 and observing that we only reduce to CC / Knapsack instances in whichthe optimal multiset (for each total size) is always a set, i.e., uses each element at most once.
In this section we consider a special case of of Least-Weight Subsequence problems called the ChainLeast-Weight Subsequence. This captures problems in which edge weights are given implicitly bya relation R that determines which pairs of data items we are allowed to chain – the aim is to findthe longest chain.An example of a Chain Least-Weight Subsequence problem is the NestedBoxes problem.Given n boxes in d dimensions, given as non-negative, d -dimensional vectors b , . . . , b n , find thelongest chain such that each box fits into the next (without rotation). We say box that box a fitsinto box b if for all dimensions 1 ď i ď d , a i ď b i . NestedBoxes is not immediately a least-weight subsequence problem, as for least weight sub-sequence problems we are given a sequence of data items, and require any sequence to start at thefirst item and end at the last. We can easily convert
NestedBoxes into a
LWS problem by sortingthe vectors by the sum of the entries and introducing two special boxes, one very small box K suchthat K fits into any box b i and one very large box J such that any b i fits into J .We define the chain least-weight subsequence problem with respect to any relation R and con-sider a weighted version where data items are given weights. To make the definition consistentwith the definition of LWS the output is the weight of the sequence that minimizes the sum of theweights.
Problem 5.1 ( ChainLWS ) . Fix a set of objects X and a relation R Ď X ˆ X . We define thefollowing LWS instantiation
ChainLWS p R q “ LWS p W ChainLWS p R q q . Data items: sequence of objects x , . . . , x n P X with weights w , . . . , w n P t´
W, . . . , W u . Weights: w i,j “ w j if p x i , x j q P R, otherwise , for 0 ď i ă j ď n .The input to the (weighted) chain least-weight subsequence problem is a sequence of data items,and not a set. Finding the longest chain in a set of data items is NP -complete in general. Forexample, consider the box overlap problem: The input is a set of boxes in two dimensions, given bythe top left corner and the bottom right corner, and the relation consists of all pairs such that thetwo boxes overlap. This problem is a generalization of the Hamiltonian path problem on inducedsubgraphs of the two-dimensional grid, which is an NP -complete problem [29].We relate ChainLWS p R q to the class of selection problems with respect to the same relation R . 18 roblem 5.2 (Selection Problem) . Given data items a , . . . , a n , b , . . . , b n and a relation R p a i , b j q ,determine if there is a pair i, j satisfying R p a i , b j q . We denote this selection problem with respectto a relation R by Selection p R q .The class of selection problems includes several well studied problems including MinInnProd , OV [39, 4] and VectorDomination [26].We will use the selection problems in the search variant, where we find a pair satisfying the R if such a pair exists. To reduce the the search variant to the decision variants in a fine-grained way,we can use a simple, binary search type reduction from the decision problem to the search problem:We give a subquadratic reduction from ChainLWS p R q to Selection p R q that is independentof R . Theorem 5.3.
For all relations R such that R can be computed in time subpolynomial in thenumber of data items n , ChainLWS p R q ď Selection p R q . The proof is again based on
Static-LWS and a variation on a trick of [40].As an intermediate step, we define
Static-ChainLWS as the equivalent of
Static-LWS in thespecial case for chains.
Problem 5.4 ( Static-ChainLWS ) . Fix an instance of
ChainLWS p R q . Given intervals I : “t a ` , . . . , a ` N u and J : “ t a ` N ` , . . . , a ` N u for some a and N , together with the correctlycomputed values T r a ` s , . . . , T r a ` N s , the Static Chain Least-Weight Subsequence Problem( Static-ChainLWS ) asks to determine T r j s : “ min i P I : R p i,j q T r i s ` w j for all j P J. Similar to the definition of
ChainLWS , Static-ChainLWS is the special case of
Static-LWS where the the weights w i,j are restricted to be either w j or , depending on R . As a result, Lemma3.5 applies directly. Corollary 5.5 ( ChainLWS p R q ď Static-LWS p R q ) . For any R , if Static-ChainLWS p R q canbe solved in time O p n ´ ε q for some ε ą , then ChainLWS p R q can be solved in time ˜ O p n ´ ε q . We now reduce
Static-ChainLWS p R q to Selection p R q with a variation on the trick by [40]. Lemma 5.6 ( Static-ChainLWS p R q ď Selection p R q ) . For all relations R such that R canbe computed in time subpolynomial in the number of data items n , Static-ChainLWS p R q ď Selection p R q .Proof. As a first step, we sort the data items a i , i P I “ t a ` , . . . , a ` N u by T r i s in increasingorder and we will assume for the remainder of the proof that for all a ` ď i ă a ` N we have T r i s ď T r i ` s . We then split the set a a ` , . . . , a a ` N into g : “ r ? N s groups A , . . . , A g with A i “ t a p i ´ q r N { g s , . . . , a i r N { g s ´ u . We split the set b a ` N ` , . . . , b a ` N into B , . . . , B g in a similarfashion. We then iterate over all pairs A k , B l with k, l P r g s in lexicographic order, and for each pairwe do the following. Call the oracle for Selection p R q on the input A k , B l to find a pair a i , b j suchthat the relation R is satisfied on the pair. If there is no such pair, move to the next pair A k ˚ , B l ˚ of sets of data items. If there is such a pair, find the first element a i ˚ P A k such that R p a i ˚ , b j q using a simple linear scan. As we first sorted A and iterate over sets A k , B l in lexicographic order,we have T r j s “ T r i ˚ s ` w j . We then remove b j from B l and repeat.19or the runtime analysis, we observe, that the oracle can find a pair of elements at most O p N q times, as each time we find a pair we remove an element from the input. In the case where we dofind a pair of elements we do a linear scan that takes O p N { g q time. Furthermore, each pair of sets A k , B l can fail to find a pair at most once. Hence, if T Selection is the time to solve the selectionproblem and using g “ ? N we get a time of T p N q “ N T
Selection p? N q ` N p T Selection p? N q ` ? N q “ N T
Selection p? N q (8)which is subquadratic if T Selection p N q is subquadratic. Theorem 5.7.
Let D be the set of possible data items. For any relation R such that • There is a data item K such that pK , d q P R for all d P D . • There is a data item J such that p d, Jq P R for all d P D . • For any set of data items d , . . . , d n there is a sequence i , . . . , i n such that for any j ă k , p d i j , d i k q R R . This ordering can be computed in time O p n ´ δ q for δ ą . We call this orderingthe natural ordering.Then Selection p R q ď ChainLWS p R q .Proof. We construct an unweighted
ChainLWS problem with all weights set to ´
1, so that theproblem is to find the longest chain. Let a , . . . a n and b , . . . , b n be the data items of Selection p R q and sort both sets according to the natural ordering. We claim that for the sequence of data items K , a , . . . a n , b , . . . , b n , J the weight of the least weight subsequence is ´ p a i , b j q P R . Because of the property of the natural ordering, any valid subsequence starting at K and ending at J contains at most one element a i and at most one element b j . If there is a pair p a i , b j q P R , then the sequence K , a i , b j , J will have value ´
3. If there is no such pair, any validsequence contains at most one element other than K and J and its value is therefore at least ´ Selection and
ChainLWS . Corollary 5.8 ( NestedBoxes ” VectorDomination ) . The weighted
NestedBoxes problemon d “ c log n dimensions can be solved in time n ´p { O p c log c qq . For d “ ω p logn q , the (unweighted) NestedBoxes problem cannot be solved in time O p n ´ ε q for any ε ą assuming SETH .Proof.
Let R be the relation that contains all pairs of non-negative, d -dimensional vectors a, b suchthat a i ď b i for all i . Now Selection p R q is VectorDomination , and
ChainLWS p R q is the NestedBoxes problem.Using the reduction from Theorem 5.3 and the algorithms for vector domination of the statedruntime [26, 13] we immediately get an algorithm for
NestedBoxes .We apply Theorem 5.7 with
J “ W d where W is the largest coordinate in all input vectors, K “ d and use the sum of the coordinates of the boxes as the natural ordering. SETH -hardnessof
NestedBoxes then follows from the
SETH -hardness of vector domination [39].20f we restrict
NestedBoxes and
VectorDomination to Boolean vectors, then we get
Sub-setChain and
SetContainment respectively. In this case the upper bound improves to n ´ { O p log c q [4]. We would like to point out that the definition of ChainLWS requires the input to be a sequenceof data items, and not a set. Consider the following definition:
Problem 5.9 ( ChainSet ) . Let a set of data items data items t x , . . . , x n u , weights w , . . . , w n ´ Pt´
W, . . . , W u and a relation R p x i , x j q be given. The chain set problem for R , denoted ChainSet p R q asks to find the weight sequence i , i , i , . . . , i k such that for all j with 1 ď j ď k the pair p x i j ´ , x i j q is in the relation R and the weight ř k ´ j “ w i j is minimized.While ChainLWS can always be solved in quadratic time,
ChainSet is NP -complete. Forexample, consider the box overlap problem: The input is a set of boxes in two dimensions, given bythe top left corner and the bottom right corner, and the relation consists of all pairs such that thetwo boxes overlap. This problem is a generalization of the Hamiltonian path problem on inducedsubgraphs of the two-dimensional grid, which is an NP -complete problem [29]. This is a formalbarrier to a more general reduction than Theorem 5.7, as we need some mechanism to impose anordering on the data items. In this section, we classify problems to be solvable in near-linear time using the lens of our framework.Note that in these instances, near-linear time solutions have already been known, however, ourfocus on the static variants of LWS provides a simple, general approach to find fast algorithmsby identifying a simple “core” problem. Since in this paper, we generally ignore subpolynomialfactors in the running time, we concentrate here on the reduction from some LWS variant to itscorresponding core problem and disregard reductions in the other direction.
The longest increasing subsequence problem
LIS has been first investigated by Fredman [18], whogave an O p n log n q -time algorithm and gave a corresponding lower bound based on Sorting . Thefollowing LWS instantiation is equivalent to
LIS . Problem 6.1 ( LIS ) . We define the following
LWS instantiation
LIS “ LWS p W LIS q . Data items: integers x , . . . , x n P t , . . . , W u Weights: w i,j “ ´ x i ă x j ow.It is straightforward to verify that ´ T r n s yields the value of the longest increasing subsequence of x , . . . , x n . Using the static variant of LWS introduced in Section 3, we observe that LIS effectivelyboils down to
Sorting . Oberservation 2.
LIS can be solved in time ˜ O p n q .Proof. By Lemma 3.5, we can reduce
LIS to the static variant
Static-LWS p W LIS q . It is straight-forward to see that the latter can be reformulated as follows: Given p a , T r sq , . . . , p a N , T r N sq and21 , . . . , b N , determine for every j “ , . . . , N , the value T r j s “ ´ ` min ď i ď N,a i ă b j T r i s . To doso, it suffices to sort the first list as p a i , T r i sq , . . . , p a i N , T r i N sq with a i ď ¨ ¨ ¨ ď a i N and thesecond as b j , . . . , b j N with b j ď ¨ ¨ ¨ ď b j N . Finally, a single pass over both lists will do: For each k “ , . . . , N , we search for the largest ℓ such that a i ℓ ă b j k , then the T -value corresponding to b j ℓ is ´ ` min ď ℓ ď ℓ T r i ℓ s . By this approach, it is easy to see that after sorting, these values can becomputed in time O p N q . For the exact running time, note that solving Static-LWS p W LIS q takestime O p N log N q due to sorting, yielding a O p n log n q -time algorithm for LIS by Lemma 3.5.
UnboundedSubsetSum is a variant of the classical
SubsetSum , in which repetitions of elementsare allowed. While improved pseudo-polynomial-time algorithms for
SubsetSum could only re-cently be found [32, 10], there is a simple algorithm solving
UnboundedSubsetSum in time O p n log n q [10]. It can be cast into an LWS formulation as follows. Problem 6.2 ( UnboundedSubsetSum ) . We define the following
LWS instantiation
LIS “ LWS p W USS q . Data items: S Ď r n s Weights: w i,j “ j ´ i P S ow.Note that in this formulation, T r n s “ S that sums upto n . It is a straightforward observation that the static variant of UnboundedSubsetSum can besolved by classical convolution, i.e., p¨ , `q -convolution. Oberservation 3.
UnboundedSubsetSum can be solved in time ˜ O p n q .Proof. Noting that all weights w i,j are either 0 or , it is easy to see that the static variant Static-LWS p W USS q can be reformulated as follows: Given a subset X Ď I “ t a ` , . . . , a ` N u ,determine, for all j P J “ t a ` N ` , . . . , a ` N u , whether there exists some i P X such that j ´ i P S .To do so, we do the following: We represent X as an N -bit vector x “ p x , . . . , x N q P t , u N with x i “ a ` i P X . Furthermore, we represent the “relevant part” of S by defining a 2 N -bitvector s “ p s , . . . , s N q P t , u N with s i “ i P S . Then the p¨ , `q -convolution r “ x f s of x and s allows us to determine T r a ` N ` j s for j “ , . . . , N : this values is 0 iff r N ` j ą otherwise. Correctness follows from the observation that r N ` j ą i P r N s and k P r N s with i ` k “ N ` j and x i “ s k “
1. This in turn is equivalent to a ` i P X and p a ` N ` j q ´ p a ` i q “ N ` j ´ i “ k P S , as desired.Thus Static-LWS p W USS q can be solved by a single convolution computation, which can beperformed in time O p N log N q . Thus by Lemma 3.5, this gives rise to a O p n log n q -time algorithmfor UnboundedSubsetSum . The concave LWS problem is a special case of LWS in which the weights satisfy the quadrangleinequality. Since a complete description of the input instance consists of Ω p n q weights, we usethe standard assumption that each w i,j can be queried in constant time. This allows for sublinearsolutions in the input description, in particular there exist O p n q -time algorithms [38, 21].22 roblem 6.3 ( ConcLWS ) . We define the following
LWS instantiation
LIS “ LWS p W conc q . Weights: w i,j given by oracle access, satisfying w i,j ` w i ,j ď w i ,j ` w i,j for i ď i ď j ď j .We revisit ConcLWS and its known connection to the problem of computing column (or row)minima in a totally monotone p n ˆ n q -matrix, which we call the SMAWK problem because ofits remarkable O p n q -time solution called the SMAWK algorithm [5].
Oberservation 4.
ConcLWS can be solved in time ˜ O p n q .Proof. The static variant of
ConcLWS can be formulated as follows: Given intervals I “ t a ` , . . . , a ` N u and J “ t a ` N ` , . . . , a ` N u , we define a matrix M : “ p m i,j q i P I,j P J q with m i,j “ T r i s ` w i,j . It is easy to see that M is a totally monotone matrix since w satisfies thequadrangle inequality. Note that the minimum of column j P J in M is min i P I T r i s ` w i,j “ T r j s by definition. Thus, using the SMAWK algorithm we can determine all T r j s in simultaneously intime O p N q .Thus by Lemma 3.5, we obtain an O p n log n q -time algorithm for ConcLWS . Acknowledgments.
We would like to thank Karl Bringmann and Russell Impagliazzo for helpfuldiscussions and comments.
References [1] Amir Abboud, Arturs Backurs, and Virginia Vassilevska Williams. Quadratic-time hardnessof LCS and other sequence similarity measures. In
Proc. 56th Annual IEEE Symposium onFoundations of Computer Science (FOCS’15) , pages 59–78, 2015.[2] Amir Abboud, Thomas Dueholm Hansen, Virginia Vassilevska Williams, and Ryan Williams.Simulating branching programs with edit distance and friends or: A polylog shaved is a lowerbound made. In
Proc. 48th Annual ACM Symposium on Symposium on Theory of Computing(STOC’16) , 2016. To appear.[3] Amir Abboud, Virginia Vassilevska Williams, and Oren Weimann. Consequences of fasteralignment of sequences. In
Proc. 41st International Colloquium on Automata, Languages, andProgramming (ICALP’14) , pages 39–51, 2014.[4] Amir Abboud, Ryan Williams, and Huacheng Yu. More applications of the polynomial methodto algorithm design. In
Proc. 26th Annual ACM-SIAM Symposium on Discrete Algorithms(SODA’15) , pages 218–230, 2015.[5] Alok Aggarwal, Maria M. Klawe, Shlomo Moran, Peter W. Shor, and Robert E. Wilber. Geo-metric applications of a matrix-searching algorithm.
Algorithmica , 2:195–208, 1987.[6] Alfred V. Aho, Daniel S. Hirschberg, and Jeffrey D. Ullman. Bounds on the complexity of thelongest common subsequence problem.
Journal of the ACM , 23(1):1–12, 1976. A matrix M “ p m i,j q i,j is totally monotone if for all i ă i and j ă j , we have that m i,j ą m i ,j implies that m i,j ą m i ,j . For a more comprehensive treatment, we refer to [5, 21]. Proc. 47th Annual ACM Symposium on Theory of Computing(STOC’15) , pages 51–58, 2015.[8] David Bremner, Timothy M. Chan, Erik D. Demaine, Jeff Erickson, Ferran Hurtado, JohnIacono, Stefan Langerman, Mihai Patrascu, and Perouz Taslakian. Necklaces, convolutions,and X+Y.
Algorithmica , 69(2):294–314, 2014.[9] Karl Bringmann. Why walking the dog takes time: Frechet distance has no strongly sub-quadratic algorithms unless SETH fails. In
Proc. 55th Annual IEEE Symposium on Founda-tions of Computer Science (FOCS’14) , pages 661–670, 2014.[10] Karl Bringmann. A near-linear pseudopolynomial time algorithm for subset sum. In
Proc. 28thAnnual ACM-SIAM Symposium on Discrete Algorithms (SODA’17) , pages 1073–1084, 2017.[11] Karl Bringmann and Marvin K¨unnemann. Quadratic conditional lower bounds for stringproblems and dynamic time warping. In
Proc. 56th Annual IEEE Symposium on Foundationsof Computer Science (FOCS’15) , pages 79–97, 2015.[12] Marco L. Carmosino, Jiawei Gao, Russell Impagliazzo, Ivan Mihajlin, Ramamohan Paturi, andStefan Schneider. Nondeterministic extensions of the strong exponential time hypothesis andconsequences for non-reducibility. In
Proc. 7th ACM Conference on Innovations in TheoreticalComputer Science (ITCS’16) , pages 261–270, 2016.[13] Timothy M Chan. Speeding up the four russians algorithm by about one more logarithmicfactor. In
Proc. 26th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’15) ,pages 212–217. Society for Industrial and Applied Mathematics, 2015.[14] Timothy M. Chan and Moshe Lewenstein. Clustered integer 3sum via additive combinatorics.In
Proc. 47th Annual ACM Symposium on Theory of Computing, (STOC’15) , pages 31–40,2015.[15] Mark de Berg, Kevin Buchin, Bart M. P. Jansen, and Gerhard J. Woeginger. Fine-grainedcomplexity analysis of two classic TSP variants. In
Proc. 43rd International Colloquium onAutomata, Languages, and Programming (ICALP’16) , pages 5:1–5:14, 2016.[16] David Eppstein. Sequence comparison with mixed convex and concave costs.
J. Algorithms ,11(1):85–101, 1990.[17] David A. Eppstein.
Efficient algorithms for sequence analysis with concave and convex gapcosts . PhD thesis, Columbia University, 1989.[18] Michael L. Fredman. On computing the length of longest increasing subsequences.
DiscreteMathematics , 11(1):29 – 35, 1975.[19] Anka Gajentaan and Mark H Overmars. On a class of o (n2) problems in computationalgeometry.
Computational geometry , 5(3):165–185, 1995.[20] Zvi Galil and Raffaele Giancarlo. Speeding up dynamic programming with applications tomolecular biology.
Theoretical Computer Science , 64(1):107–118, 1989.2421] Zvi Galil and Kunsoo Park. A linear-time algorithm for concave one-dimensional dynamicprogramming.
Inf. Process. Lett. , 33(6):309–311, 1990.[22] Zvi Galil and Kunsoo Park. Parallel algorithms for dynamic programming recurrences withmore than O(1) dependency.
J. Parallel Distrib. Comput. , 21(2):213–222, 1994.[23] Jiawei Gao, Russell Impagliazzo, Antonina Kolokolova, and Ryan Williams. Completeness forfirst-order properties on sparse structures with algorithmic applications. In
Proc. 28th AnnualACM-SIAM Symposium on Discrete Algorithms (SODA’17) , pages 2162–2181, 2017.[24] A. Grønlund, K. Green Larsen, A. Mathiasen, J. Sindahl Nielsen, S. Schneider, and M. Song.Fast Exact k-Means, k-Medians and Bregman Divergence Clustering in 1D.
ArXiv e-prints ,January 2017. arXiv:1701.07204 .[25] Daniel S. Hirschberg and Lawrence L. Larmore. The least weight subsequence problem.
SIAMJournal on Computing , 16(4):628–638, 1987.[26] Russell Impagliazzo, Shachar Lovett, Ramamohan Paturi, and Stefan Schneider. 0-1 integerlinear programming with a linear number of constraints. arXiv preprint arXiv:1401.5512 , 2014.[27] Russell Impagliazzo and Ramamohan Paturi. On the complexity of k-sat.
Journal of Computerand System Sciences , 62(2):367 – 375, 2001.[28] Russell Impagliazzo, Ramamohan Paturi, and Francis Zane. Which problems have stronglyexponential complexity?
Journal of Computer and System Sciences , 63(4):512–530, 2001.[29] Alon Itai, Christos H Papadimitriou, and Jayme Luiz Szwarcfiter. Hamilton paths in gridgraphs.
SIAM Journal on Computing , 11(4):676–686, 1982.[30] Maria M. Klawe and Daniel J. Kleitman. An almost linear time algorithm for generalizedmatrix searching.
SIAM J. Discrete Math. , 3(1):81–97, 1990.[31] Donald E. Knuth and Michael F. Plass. Breaking paragraphs into lines.
Softw., Pract. Exper. ,11(11):1119–1184, 1981.[32] Konstantinos Koiliaris and Chao Xu. A faster pseudopolynomial time algorithm for subsetsum. In
Proc. 28th Annual ACM-SIAM Symposium on Discrete Algorithms, (SODA’17) , pages1062–1072, 2017.[33] Daniel Lokshtanov, D´aniel Marx, and Saket Saurabh. Lower bounds based on the exponentialtime hypothesis.
Bulletin of the EATCS , 105:41–72, 2011.[34] William J. Masek and Mike Paterson. A faster algorithm computing string edit distances.
Journal of Computer and System Sciences , 20(1):18–31, 1980.[35] Webb Miller and Eugene W. Myers. Sequence comparison with concave weighting functions.
Bulletin of Mathematical Biology , 50(2):97–120, 1988.[36] David Pisinger. Dynamic programming on the word RAM.
Algorithmica , 35(2):128–145, 2003.[37] Virginia Vassilevska Williams. Hardness of Easy Problems: Basing Hardness on Popular Con-jectures such as the Strong Exponential Time Hypothesis (Invited Talk). In
Proc. 10th Inter-national Symposium on Parameterized and Exact Computation (IPEC’15) , pages 17–29, 2015.2538] Robert E. Wilber. The concave least-weight subsequence problem revisited.
J. Algorithms ,9(3):418–425, 1988.[39] Ryan Williams. A new algorithm for optimal 2-constraint satisfaction and its implications.
Theoretical Computer Science , 348(2):357–365, 2005.[40] Virginia Vassilevska Williams and Ryan Williams. Subcubic equivalences between path, matrixand triangle problems. In
Proc. 51st Annual IEEE Symposium on Foundations of ComputerScience (FOCS’10) , pages 645–654, 2010.[41] F. Frances Yao. Efficient dynamic programming using quadrangle inequalities. In