Near-Optimal Sparsifiers for Stochastic Knapsack and Assignment Problems
Abstract
When uncertainty meets costly information gathering, a fundamental question emerges: which data points should we probe to unlock near-optimal solutions? Sparsification of stochastic packing problems addresses this trade-off. The existing notions of sparsification measure the level of sparsity, called degree, as the ratio of queried items to the optimal solution size. While effective for matching and matroid-type problems with uniform structures, this cardinality-based approach fails for knapsack-type constraints where feasible sets exhibit dramatic structural variation. We introduce a polyhedral sparsification framework that measures the degree as the smallest scalar needed to embed the query set within a scaled feasibility polytope, naturally capturing redundancy without relying on cardinality.
Our main contribution establishes that knapsack, multiple knapsack, and generalized assignment problems admit -approximate sparsifiers with degree polynomial in and – where denotes the independent activation probability of each element – remarkably independent of problem dimensions. The key insight involves grouping items with similar weights and deploying a charging argument: when our query set misses an optimal item, we either substitute it directly with a queried item from the same group or leverage that group’s excess contribution to compensate for the loss. This reveals an intriguing complexity-theoretic separation – while the multiple knapsack problem lacks an FPTAS and generalized assignment is APX-hard, their sparsification counterparts admit efficient -approximation algorithms that identify polynomial degree query sets. Finally, we raise an open question: can such sparsification extend to general integer linear programs with degree independent of problem dimensions?
Keywords and phrases:
Packing Problems, Assignment Problems, Stochastic Selection, SparsificationCopyright and License:
2012 ACM Subject Classification:
Theory of computation Packing and covering problems ; Theory of computation Stochastic approximationFunding:
This paper is based upon work supported by the Air Force Office of Scientific Research under award number FA9550-24-1-0261. Any opinions, findings, and conclusions or recommendations expressed in this document are those of the authors and do not necessarily reflect the views of the United States Air Force.Editor:
Shubhangi SarafSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
The sparsification of stochastic packing problems has emerged as a fundamental paradigm for designing algorithms that achieve near-optimal solutions with limited access to uncertain data. This approach proves particularly valuable in settings where probing or querying elements incurs costs or faces constraints. Recent developments in sparsification of stochastic packing problems have revealed elegant techniques for selecting the most pertinent information to probe.
Our goal in this paper is to expand the sparsification toolbox beyond well-studied matching settings [1, 3, 4, 5, 6, 7, 8, 12, 13, 23] and matroid optimization problems [15, 20, 23] to design sparsifiers for knapsack-type constraints.
We adopt the general framework of Dughmi et al. [15] for a packing problem instance , where is a ground set of elements, is a downward-closed family of feasible sets, and is an objective function. In our stochastic setting, each element becomes active independently with probability , resulting in a random active set . A sparsification algorithm selects a query set prior to observing , aiming to maximize the solution value within the revealed subset .
For assignment problems like MKP and GAP, solutions are typically defined as sets of item-knapsack pairs (assignments) rather than simple subsets of items. To align with our sparsification framework, we project these problems onto the ground set of items . We say a subset of items is feasible () if there exists a valid assignment of items in to knapsacks that respects all capacity constraints. Accordingly, we extend the objective function to item sets by defining as the maximum value achievable by any feasible assignment of the items in .
To rigorously evaluate sparsification algorithms, we must balance approximation quality against the “size” of the query set. While approximation is defined as usual, quantifying the size of for knapsack-type problems requires nuance. Traditional cardinality-based measures – which normalize by the rank of – fail when feasible sets vary dramatically in size, as in capacity-constrained problems. To address this, we introduce the polyhedral sparsification degree. Let be the polytope of feasible solutions. We define the degree of a query set as the minimum scalar such that the normalized indicator vector lies within . This definition naturally generalizes existing notions111Sparsification in stochastic integer packing was introduced by Blum et al. [8] using vertex degree, and later generalized by Maehara and Yamaguchi [20, 23] to cardinality-based measures. by capturing the intuitive notion of redundancy: a query set has degree if it can be decomposed into (fractionally) feasible solutions.
Definition 1 (Sparsifier).
An algorithm is an -approximate sparsifier with degree if, for every problem instance, it returns a (possibly randomized) query set that satisfies two conditions:
-
1.
Polyhedral Feasibility: the indicator vector of the query set lies within the polytope scaled by , in other words (holding for every realization of );
-
2.
Approximation Guarantee: the expected value of the optimal solution within the queried active elements approximates the full-information optimum, such that
1.1 Our contributions
Our main result establishes that knapsack-type problems admit effective sparsification despite their computational hardness. We design deterministic and non-adaptive algorithms that produce -approximate sparsifiers with polyhedral degree polynomial in and , remarkably independent of the number of items or constraints. Unlike some prior work [20, 23], we require our degree to be independent of the total number of variables and constraints.222To be clear, our definition of degree implicitly allows the number of queries to scale with the cardinality of a typical solution. Our pursuit of constant degree (independent of the number of items or constraints) is akin to requiring “redundancy” on the order of a constant number of solutions, as a hedge against uncertainty.
Informal Theorem (Main Result).
For parameters and , there exist efficient algorithms that produce a -approximate sparsifier for the stochastic Knapsack, Multiple Knapsack, and Generalized Assignment Problems with sparsification degree .
For the single knapsack problem, our approach employs a bucketization strategy combined with a charging argument. Items are partitioned into buckets based on value, and each bucket is filled to approximately times the knapsack capacity. This redundancy allows for a substitution mechanism: if an optimal item is not queried, it can likely be replaced by a queried item from the same bucket. Feasibility is maintained by prioritizing items with smaller weights, with a refined density-based strategy for the smallest value bucket.
Extending this to the Generalized Assignment Problem (GAP) presents a fundamental obstacle: item characteristics are knapsack-dependent, breaking the direct substitutability essential to the single knapsack case. An item ideal for one knapsack may be highly inefficient for another. We overcome this by increasing redundancy – filling buckets to capacity – and developing a sophisticated charging argument. When an optimal item cannot be directly substituted (often because potential substitutes are assigned elsewhere), we fractionally distribute its lost value across multiple queried elements. This ensures that we recover nearly the full optimal value without overburdening any specific element in the analysis.
1.2 Implications and experiments
We turn to the deterministic setting (i.e., ) to reflect on complexity-theoretic implications and practical impact. Our results reveal an intriguing separation: while GAP is APX-hard and MKP lacks an FPTAS, their stochastic counterparts admit efficient -approximate sparsifiers with polynomial degree. From the Exponential Time Hypothesis [18], one would informally expect that the “hard” instances are already sparse, whereas “easy” instances may be more dense and amenable to sparsification. It is on those dense non–worst-case instances where our sparsifiers shrink the search space. This can serve as a useful preprocessing step for heuristic algorithms, guiding them to pertinent variables, even in the deterministic setting with .
Empirically, we validate the utility of our approach on synthetic datasets, using practical choices of hyperparameters that are less conservative than the theoretical settings needed to ensure worst-case, high-probability guarantees. These practical choices result in sparsifiers with significantly smaller degree than the theoretical degree guaranteed by our theorem, and on instances where the total number of items exceeds the optimal solution size by a factor of four, our sparsification algorithm reduces runtime by while preserving of the solution quality. Furthermore, under fixed time budgets, branch-and-bound algorithms running on our sparsified instances outperform those running on full datasets by a factor of in objective value. We present a summary of these results in Figure 1 and refer the reader to the full version of this paper for a detailed discussion [14].
1.3 Future directions
Finally, our work motivates a broader question regarding integer linear programs (ILPs). Current sparsifiers for general ILPs [23] depend on problem dimensions or column sparsity. This leaves open a fundamental challenge:
Open Question.
Can we design -approximate sparsifiers for general integer linear programs where the sparsification degree scales polynomially with , , and intrinsic structural parameters, but remains independent of the total number of variables and constraints?
Resolving this would significantly advance the understanding of information requirements in stochastic optimization.
1.4 Related Works
Sparsification for stochastic packing was pioneered by Blum et al. [8] for matching. This work initiated a broad sequence of improvements in approximation bounds and query complexity for stochastic matching [1, 2, 3, 6, 7, 13, 15] and stochastic vertex cover [4, 12]. Maehara and Yamaguchi generalized this framework to stochastic packing integer programs [23] and submodular maximization [20], providing non-adaptive sparsifiers whose degree, however, depended on the universe size. Subsequently, Dughmi et al. [15] achieved dimension-independent sparsifiers for matroids.
In the deterministic setting, the Knapsack problem admits fully polynomial-time approximation schemes (FPTAS), with recent algorithms achieving near-linear time [11, 17, 21]. The Multiple Knapsack Problem (MKP) is strictly harder; Chekuri and Khanna [10] demonstrated that it admits a PTAS but not an FPTAS. The Generalized Assignment Problem (GAP) is APX-hard [9], with the state-of-the-art approximation ratio of established by Feige and Vondrák [16]. For a detailed survey of related works see full version of the paper [14].
2 Stochastic Assignment Problems
In this section, we formally define the deterministic assignment problems addressed in this work – Knapsack, Multiple Knapsack, and Generalized Assignment – and their stochastic counterparts. Throughout our discussion, we use the terms “knapsack” and “bin” interchangeably.
2.1 Problem Definitions
We begin with the classical single-bin setting and progressively generalize to multiple heterogeneous constraints.
Problem 1 (Knapsack Problem (KP01)).
Consider a single knapsack with capacity and a collection of items denoted by . Each item is characterized by a value and a weight . The objective is to select a subset of items that maximizes total value while respecting the capacity constraint:
Problem 2 (Multiple Knapsack Problem (MKP)).
Consider knapsacks where knapsack has capacity , and items where each item has value and weight . The objective is to assign items to the knapsacks to maximize total value while ensuring no knapsack exceeds its capacity. Formally, we seek disjoint subsets for such that:
Problem 3 (Generalized Assignment Problem (GAP)).
Consider knapsacks where knapsack has capacity , and items . In contrast to the previous problems, each item exhibits knapsack-dependent characteristics: when assigned to knapsack , item contributes value and consumes weight . The objective is to find disjoint subsets for that maximize total value subject to capacity constraints:
2.1.1 Stochastic Variants
For any deterministic instance defined above, its stochastic variant is characterized by a parameter . A random subset , termed the active set, is generated by sampling each element independently with probability . The goal is to select a feasible solution using only the items present in the realization to maximize the objective value.
2.1.2 Assumptions
Without loss of generality, we assume that every individual item is feasible. That is, for every item , there exists at least one knapsack such that the item’s weight fits within the capacity ().
2.2 Notation and Feasibility
We distinguish between items and assignments using non-bold and bold notation, respectively.
-
Assignments (): We denote a specific assignment as , where pairs indicate that item is assigned to knapsack . For a solution to be valid, each item must appear in at most one pair. We define the total value and the weight consumed in knapsack as .
-
Item Sets (): When denotes a subset of the ground set, it refers purely to the items themselves. We abuse notation slightly in the context of GAP: for a subset of items implicitly assigned to a specific knapsack , we write .
A crucial distinction in our framework is the definition of feasibility for item sets. While the optimization problems maximize over assignments , our sparsification framework operates on the ground set . We say that an item set is feasible if there exists a valid assignment such that the set of assigned items is exactly (i.e., ). Consequently, the feasibility family used to define the polytope consists of all such feasible item sets. Therefore, the condition for sparsification degree, , is a constraint on the query set in the item space. The specific assignment is determined only after the intersection of the query set and active set, , is revealed.
2.3 Hardness and Approximability
The computational complexity of these problems forms a natural hierarchy. The classical knapsack problem, which was proven NP-hard by Karp [19], admits a fully polynomial-time approximation scheme (FPTAS) [11, 17, 21]. However, the Multiple Knapsack Problem (MKP), even when restricted to just two knapsacks, does not admit an FPTAS [10]. The Generalized Assignment Problem (GAP) is APX-hard; Chakrabarty and Goel [9] demonstrated that it cannot be approximated better than a factor of unless . The current best polynomial-time approximation algorithm for GAP achieves a ratio of for a small constant [16].
3 Warm-up: Knapsack Sparsification
We begin with a sparsification algorithm for the classical knapsack problem. This foundational case introduces key techniques that will be extended to more complex scenarios throughout the paper.
The algorithm employs a bucket-based strategy that partitions elements by value into geometrically increasing ranges. The fundamental principle ensures that the queried subset of items in each bucket is sufficiently large to either contain all items within the bucket or independently fill the knapsack constraint with high probability. In the former case, all elements remain available in the query set, ensuring that no item from the optimal solution is missed. In the latter scenario, the objective is to guarantee that whenever an item from the optimal solution is unavailable in the query set, a suitable substitute can be found.
To achieve this, the algorithm applies distinct selection criteria: for low-value elements (bucket ), it prioritizes items with high value-to-weight density, while for high-value buckets ( with ), it selects the lightest elements to maximize the probability of accommodating valuable items within capacity constraints.
Before we proceed with proving that Algorithm 1 is a good sparsifier, we first establish a key concentration result for our sparsifier analysis. The proof follows from standard concentration inequalities and is given in the full version [14].
Lemma 2 (Activation Weight Concentration).
Let be a set of elements, each with weight , such that
where Then, if each item is active independently with probability , the total weight of active items in is at least with probability at least .
Theorem 3 (Knapsack Sparsifier Performance).
For parameters and , Algorithm 1 produces a -approximate sparsifier for the stochastic knapsack problem with sparsification degree
Proof.
Let denote our -approximation to , satisfying with probability at least . Let be the event that this inequality holds and so is estimated within approximation. Condition on the event holds.
Sparsification Degree Analysis
We first bound the size of the query set . The algorithm selects at most buckets. For each bucket , the total weight is bounded by . Summing over all buckets, the total weight of the query set satisfies:
To translate this weight bound into our polyhedral sparsification degree, we consider the linear programming relaxation of the knapsack polytope, . Our calculation shows that for . However, the sparsification degree requires embedding into the convex hull of integer solutions, . We know that the integrality gap of the knapsack relaxation is bounded by 2 (assuming singletons are feasible) [22]. Therefore, , implying that the sparsification degree is at most , which remains .
Approximation Analysis
Consider any realization and let denote an optimal solution with value and weight .
We partition the optimal solution as where , and define (low-value items) and (high-value items). Completeness of this partition follows from the range of buckets. Since each item is active with probability , , implying . Our largest bucket boundary is at least , ensuring all items are covered.
High-Value Item Recovery.
For each bucket , let represent the active queried items. By Lemma 2, we have with the probability of at least when is sufficiently large (equivalently when ). Define the event as or .
Conditioning on this event , since contains the lightest items in , we can establish a matching such that each item maps to some with and (due to items being in the same value bucket). Notice that such a matching trivially exists when . This matching implies:
Since , we obtain:
| (1) |
where the final inequality uses for small .
Low-Value Item Recovery.
For bucket , we apply greedy selection on by value density up to a total capacity of . Let denote this greedy solution.
Each item in has value at most . When holds, the maximum value in is at most . By fractional knapsack analysis, the greedy algorithm achieves value within of the fractional optimum:
Since :
Final Approximation Bound.
Combining our bounds for high-value and low-value items, let denote the maximum-value feasible subset of with for each , and define . Then:
Finally, since for each , we have , so is feasible.
4 Sparsifier for the General Assignment Problem
We now extend our sparsification framework to the Generalized Assignment Problem (GAP), which encompasses the Multiple Knapsack Problem as a special case.
4.1 Key Challenges and Algorithmic Innovations
Extending our knapsack sparsifier to the GAP presents fundamental challenges that require a complete algorithmic redesign. The core difficulty stems from knapsack-dependent item characteristics, which destroy the substitutability properties essential to our knapsack analysis.
In the knapsack problem, items have fixed values and weights , enabling a global bucketing scheme where items with similar characteristics substitute seamlessly. GAP breaks this structure: items exhibit knapsack-specific parameters , so an item valuable for one knapsack may be worthless for another. This forces us to maintain separate buckets for each knapsack-bucket pair, immediately complicating the design.
The main challenge arises from cross-knapsack substitutability issue. Two items may belong to the same bucket for knapsack due to similar values , yet reside in different buckets for knapsack due to vastly different values . When our sparsifier fills bucket based on suitability for knapsack , these items fail as substitutes if the optimal solution assigns corresponding items to different knapsacks. This dependency fundamentally breaks the matching argument underlying our knapsack analysis.
We address this through enhanced redundancy combined with a more involved charging argument. Our GAP sparsifier fills each bucket to times the knapsack capacity, creating substantial redundancy in the query set. When an optimal item assigned to knapsack is missing from the query set, we first seek a direct substitute among queried items with similar weight and value characteristics for knapsack . When direct substitution fails – typically because suitable substitutes are assigned to different knapsacks in the optimal solution – we leverage the redundancy to fractionally charge value across other queried items. This ensures no queried item receives excessive charge (at most times its own value) while recovering nearly the optimal value.
A secondary challenge is ensuring the completeness of the bucket structure. In the knapsack setting, provides a natural upper bound for feasible item values. In GAP, however, an item may be active with probability , yet appear in a specific knapsack ’s optimal assignment with significantly lower probability, making localized value bounds difficult to establish.
To address this, we introduce a super bucket for each knapsack with no upper bound on its value range. While items in this bucket may have arbitrarily large values and lack mutual substitutability, we prove a surprising property: even if the reconstruction algorithm makes no attempt to substitute for missed items in the super bucket, the aggregate loss remains globally bounded.
4.2 Algorithm Design
Our GAP sparsifier employs a bucket-based approach that incorporates substantial redundancy to handle cross-knapsack dependencies. The complete procedure is presented in Algorithm 2.
Beyond the algorithmic complexities discussed above, our GAP sparsifier requires access to knapsack-level value estimates. This presents an additional challenge compared to the knapsack setting, where estimating the global expectation suffices for bucket boundary determination. In GAP, assignment decisions are interdependent across knapsacks, creating a more complex estimation problem.
Formally, for each realization of the active set, let denote the set of all optimal feasible GAP assignments on . We fix once and for all an arbitrary but deterministic tie-breaking rule that selects a canonical optimal assignment . We then define as the total value of assignment and as the total value of items assigned to knapsack in , so that
Although the individual quantities may vary with the choice of tie-breaking rule, the equality above implies that
and thus the aggregate contribution across knapsacks is invariant. The relative contribution of each knapsack can still vary substantially across different realizations and approximate solutions, which makes estimating the individual knapsack contributions from global information alone highly challenging.
To address this issue, we assume oracle access to the expected knapsack-level optima for all . Under this assumption, we establish the following performance guarantee:
Theorem 4 (GAP Sparsifier).
For parameters and , assume oracle access to the expected knapsack optima for each knapsack . Then Algorithm 2 produces a -approximate sparsifier for the stochastic GAP problem with sparsification degree
Since the Multiple Knapsack Problem is a special case of GAP, we obtain the following immediate corollary:
Corollary 5 (Multiple Knapsack Sparsifier).
Under the same oracle assumption, Algorithm 2 produces a -approximate sparsifier for the stochastic Multiple Knapsack problem, with sparsification degree
4.3 Relaxing Oracle Assumptions
In practice, obtaining precise offline computations of each may be infeasible. We therefore analyze the robustness of our algorithm under weaker information settings.
4.3.1 Approximate Oracle Access
Given a -approximation to the total stochastic optimum , we can estimate each via expected marginal contributions of knapsacks in the approximate solution. Using these estimates, Algorithm 2 achieves a -approximation with the same sparsification degree bound. The analysis remains identical to Theorem 4, using the -approximate assignment as the benchmark for the charging argument.
4.3.2 Global Oracle Access
A plausible scenario is having access to the global expectation (or a constant factor estimate thereof) without granular knapsack-level details. In this case, we can uniformly distribute the expectation by setting for all . This forces the algorithm to cover a wider range of potential values per knapsack, introducing a logarithmic dependence on in the sparsification degree.
Intuitively, the contribution of any specific knapsack lies somewhere between a uniform share () and the total value (). To ensure we capture the relevant items regardless of how the optimal solution distributes value, we set the minimum value threshold based on the uniform lower bound . Consequently, the bucket hierarchy for every knapsack must span the expansive range from this uniform average up to the global maximum. This widens the value range by a factor of , which, due to the geometric progression of bucket boundaries, incurs a logarithmic penalty in the number of buckets.
Corollary 6.
Assume oracle access to the expected global optimum . Then the modified version of Algorithm 2 with and is a -sparsifier with degree .
5 Analysis of GAP Sparsifier
Before beginning the analysis, we briefly recall the relevant notation. Non-bold symbols (e.g., ) denote sets of items, whereas bold symbols (e.g., ) denote assignment solutions, represented as sets of item–knapsack pairs. For each realization of the active set, we previously introduced a canonical optimal assignment via a deterministic tie-breaking rule. This choice is used solely for analysis; the sparsification algorithm (Algorithm 2) never requires access to for any individual . For simplicity of notation, throughout this section we omit the dependence on and write .
With this notation in place, our analysis centers on a reconstruction algorithm that conceptually simulates while constructing a feasible assignment using only queried active items. The reconstruction processes buckets sequentially, maintaining a partial assignment that incrementally grows toward .
The reconstruction algorithm employs three specialized subroutines. FillLargeBucket, for , replaces missed high-value items with lighter alternatives. FillSmallBucket, for , uses density-based substitution for low-value items. FillAllSuperBuckets, for , performs no substitutions and simply inserts each queried item using its original assignment while discarding all missed items.
Before providing definitions of these subroutines, we first state some desired properties of these subroutines and hence our ReconstructionProcedure. Based on these properties, we first prove the main result of this section in Section 5.1. Later, Section 6 will be devoted to formal definitions of subroutines, FillLargeBucket, FillSmallBucket, and FillAllSuperBuckets, as well as proofs of their desired properties.
To formally track the capacity usage and value gain during reconstruction, we define the total weight and value contributed to each knapsack by the subroutine calls in ReconstructionProcedure. Consider an assignment . For a single call to either FillSmallBucket or FillLargeBucket, we define:
-
: for each knapsack , the increase in the total weight assigned to in , namely the sum of over all item–knapsack pairs that are added to during this call;
-
: the increase in the total value of across all knapsacks, namely the sum of over all pairs that are added to during this call.
Feasibility
The ReconstructionProcedure maintains feasibility through three key properties: (1) each call to the procedure adds only queried active items to , ensuring that at all times; (2) no item is ever assigned more than once within either solution: once an item appears in (respectively, ), it is never reassigned within that same solution; and (3) for every knapsack , the total weight assigned in never exceeds that in , ensuring that capacity constraints remain satisfied throughout. Lemmas 7, 8, and 9 formally establish these properties for large, small, and super buckets, respectively.
Lemma 7 (Feasibility in Large Buckets).
When FillLargeBucket is called for knapsack and bucket , the procedure assigns only queried active items to , and no item already appearing in (respectively, ) is ever reassigned within that same solution. Moreover, for every knapsack ,
Lemma 8 (Feasibility in Small Buckets).
When FillSmallBucket is called for knapsack and bucket , the procedure assigns only queried active items to , and no item already appearing in (respectively, ) is ever reassigned within that same solution. Moreover, for every knapsack ,
Lemma 9 (Feasibility in Super Buckets).
When FillAllSuperBuckets is called, the procedure assigns only queried active items to , and no item already appearing in (respectively, ) is ever reassigned within that same solution. Moreover, for every knapsack ,
Approximation
The ReconstructionProcedure adds new item–knapsack assignments to both and in such a way that the total value of the new assignments added to closely tracks that of the new assignments added to . This ensures that, throughout the reconstruction process, the value of remains a good approximation to the value of . The following three lemmas prove this property for large-value, small-value, and super-value buckets, respectively.
Lemma 10 (Approximation Guarantee in Large Buckets).
When FillLargeBucket is called for knapsack and bucket , the following inequality holds:
Lemma 11 (Approximation Guarantee in Small Buckets).
When FillSmallBucket is called for knapsack and bucket , the inequality
holds, where denotes the expected contribution of knapsack to the optimal assignment.
Lemma 12 (Approximation Guarantee in Super Buckets).
Assume . When FillAllSuperBuckets is called, the following inequality holds:
Correct Benchmark
Finally, to demonstrate that the final output is a good approximation of , we ensure that ReconstructionProcedure terminates with . The following lemma establishes this property:
Lemma 13 (Completeness).
Upon completion of ReconstructionProcedure (Algorithm 3), we have .
5.1 Proof of Theorem 4
We now prove the main result of this section using the lemmas stated above.
Proof of Theorem 4.
Fix any realization .
We first bound the size of the query set by analyzing the total weight selected for each knapsack. Algorithm 2 maintains buckets per knapsack and iterates for rounds. In each specific round and bucket , the algorithm selects items with a total weight of at most , where the accounts for the discrete weight of the final item. Aggregating over all rounds and buckets, the total weight implicitly associated with knapsack is bounded by:
This weight bound establishes that the indicator vector lies within the natural linear programming relaxation of the problem, scaled by a factor . To translate this into the required polyhedral sparsification degree (which is defined with respect to , the convex hull of integer feasible solutions), we leverage the fact that the integrality gap of the standard linear relaxation for GAP is at most 2 (assuming feasible singletons). This implies polytope of relaxed LP is contained by . Consequently, the sparsification degree is at most , which preserves the asymptotic bound:
Feasibility
Approximation Guarantee
For each knapsack and bucket index , let denote the value increase function when calling FillLargeBucket or FillSmallBucket. For the super bucket , we define analogously as the value contribution of FillAllSuperBuckets for knapsack . By Lemmas 10–13, we have
| (2) | ||||
| (3) | ||||
| (4) | ||||
| (5) | ||||
| (6) |
where equation (2) follows from linearity of expectation; equation (3) applies Lemmas 10 and 11 to derive the first parenthesized term, and applies Lemma 12 to derive the second parenthesized term; equation (4) rearranges the terms; and equation (5) uses together with Lemma 13. The final inequality holds for all .
6 Reconstruction Procedures
This section details the ReconstructionProcedure, which incrementally constructs the optimal solution and a feasible algorithmic solution using the queried active elements. We first establish the necessary notation and then analyze the feasibility and approximation guarantees of our reconstruction subroutines.
6.1 Notation and Preliminaries
Optimal Assignment.
Let denote the value of item in the optimal solution: if , and otherwise. Throughout the text, we assume that optimal solution is deterministically fixed among feasible solutions satisfying optimality.
Buckets and Query Sets.
We denote by the set of item-knapsack pairs such that value , i.e., the value of item in bucket , falling into the -th value scale for knapsack . Let be the set of active items included to query set in round , and be the total set of queried items for this bucket. By construction, these sets are pairwise disjoint across .
Partition of OPT.
We partition the items in based on whether they were successfully queried. Note that an item assigned to in might be queried via a different bucket .
-
: Items used by that were successfully queried via bucket .
-
: Items assigned to knapsack in falling in bucket that were not queried.
This forms a partition: .
6.2 Subroutine Design
We gradually build the solutions and , which are initially set to . The reconstruction relies on three subroutines handling High-Value (), Low-Value (), and Super-Value () regimes. In all regimes, if , we simply assign to both and . If missed items exist, we credit them to and attempt to find substitutes from for .
Super-Value Regime.
FillAllSuperBuckets performs no substitution. It assigns to both solutions and only to . While seemingly wasteful, the loss is globally bounded.
6.3 Analysis
Throughout the analysis for each and , we condition on the Excess Weight Event . Whenever , the bucket must have exhausted its query capacity. Lemma 2 ensures that for each , and separately, unless all items with appearing in the pairs have already been included in the query set. Note that in this latter case, the query set contains all relevant items for this bucket, which implies that the reconstruction can assign exactly the same set of items as the stochastic optimum, making the comparison immediate.
6.3.1 Substitution Availability
Lemma 14 (Substitution Properties).
Conditioned on , if :
-
1.
BucketFilled: .
-
2.
AlternativeExists: For , queried items are lighter (); for , queried items have higher density () where and .
-
3.
SizeMatch: for .
Proof Sketch.
Follows immediately from the greedy selection in Algorithm 2 (selecting lightest/densest items first) and the capacity guarantee provided by .
6.3.2 Feasibility
Lemma 7, Lemma 8, and Lemma 9 establish that every subroutine maintains the feasibility of the partial solution by ensuring its weight consumption is dominated knapsack-wise by . The following proof sketch summarizes the critical arguments. Specifically, after each subroutine call, the following conditions hold:
-
(1)
;
-
(2)
Each item is assigned at most once;
-
(3)
For every knapsack , the marginal weight increase satisfies .
Proof Sketch.
Properties (1) and (2) follow immediately from the construction of the bucket sets , which form a disjoint partition of the queried items. We verify Property (3) by inspecting the substitution logic in each regime:
-
Large Buckets: For missed items (), keeps its original assignment. either keeps the same items or makes feasibility-preserving substitutions: in Direct Substitution, a missed item is replaced by a lighter queried item (); in Redistribution, assigns a subset of the items assigned by , and any reassignment as substitution it makes also satisfies . For queried items (), takes the same items or a feasible subset. Thus, in all branches, only keeps ’s items or replaces them with lighter feasible ones.
-
Small Buckets: The substitution prefix is explicitly constructed such that its total weight satisfies . For items not in or , exactly mirrors .
-
Super Buckets: selects a strict subset of the assignments made by , specifically including only the successfully queried items and dropping the missed ones.
Consequently, the capacity constraints are satisfied relative to , ensuring the feasibility of .
6.3.3 Approximation Guarantees
Here, we will restate lemmas utilized in Section 5.1 and provide their proof sketches.
Lemma 10 (Approximation Guarantee in Large Buckets). [Restated, see original statement.]
When FillLargeBucket is called for knapsack and bucket , the following inequality holds:
Proof Sketch.
We analyze the value added during the processing of a missed item .
-
Direct Substitution: We swap for . Since they are in the same bucket, .
-
Redistribution: We identify a set of indices (size ). makes the assignment and . However, makes the best feasible assignment of size . By averaging, the least valuable knapsack assignment in the original bundle contributes at most of the total value. Thus, captures at least of the value assigned to .
Considering the failure probability of , we account for a factor of . Setting yields the result.
Lemma 11 (Approximation Guarantee in Small Buckets). [Restated, see original statement.]
When FillSmallBucket is called for knapsack and bucket , the inequality
holds, where denotes the expected contribution of knapsack to the optimal assignment.
Proof Sketch.
If , consider the set of items in that our procedure is allowed to reassign to knapsack . We sort these candidates by ascending opt-value-to-weight ratio and take the maximal prefix whose total weight fits in the remaining capacity of knapsack , and such that contributes more value after reassignment than under its original assignment (see Figure 2 for a visual illustration of this prefix-selection step). By AlternativeExists, every candidate in has density higher than every missed item. Thus, after reassignment, captures the highest-density-with-respect-to- portion of the weight that assigns in this call. In addition, when defining we may have to exclude one item that would cause the capacity on to be exceeded; this “boundary” item lies in a small bucket and therefore satisfies . Combining these two effects and the failure probability of yields
Lemma 12 (Approximation Guarantee in Super Buckets). [Restated, see original statement.]
Assume . When FillAllSuperBuckets is called, the following inequality holds:
Proof Sketch.
The difference comes exactly from the value of missed super items. Let be the set of knapsacks with non-empty missed super items. For every , the super bucket must be full (event holds). By construction, whenever these queried super items are assigned to knapsack , each of them has value at least . In particular, this implies that the realized contribution of these super items, together with the realized contribution of knapsack to , already accounts for a substantial portion of the total optimum. Consequently, the expected loss incurred by those missed super items is small relative to the overall expected gain. Summing over all , we obtain that the total value of missed super items across is bounded by . See 13
Proof.
The sets and form a partition of . The subroutines iterate through all buckets, adding every element of this partition exactly once to .
7 Conclusion
We introduced a polyhedral framework for sparsification that extends beyond uniform structures such as matching and matroids to capacity-constrained problems including knapsack, multiple knapsack, and the generalized assignment problem. Our results demonstrate that despite the inherent hardness of these problems, one can construct -approximate sparsifiers with degree polynomial in and , independent of the problem size. This establishes a clean separation between optimization complexity and sparsification complexity: while exact or near-exact optimization remains intractable, identifying a small query set that preserves optimality up to is efficiently possible.
More broadly, our work highlights sparsification as a lens for rethinking stochastic combinatorial optimization. The polyhedral notion of degree captures structural redundancy without relying on cardinality, suggesting applications far beyond knapsack-type problems. A central open question remains: can we design size-independent sparsifiers for general integer linear programs, with degree depending only on , , and intrinsic structural parameters? Progress on this front would push the boundary of query-efficient optimization and clarify the fundamental role of sparsification in stochastic combinatorial optimization.
References
- [1] Sepehr Assadi and Aaron Bernstein. Towards a unified theory of sparsification for matching problems. In 2nd Symposium on Simplicity in Algorithms (SOSA 2019), volume 69 of OASIcs, pages 11:1–11:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2019. doi:10.4230/OASIcs.SOSA.2019.11.
- [2] Sepehr Assadi, Sanjeev Khanna, and Yang Li. The stochastic matching problem with (very) few queries. ACM Transactions on Economics and Computation (TEAC), 7(3):16:1–16:19, 2019. doi:10.1145/3355903.
- [3] Amir Azarmehr, Soheil Behnezhad, Alma Ghafari, and Ronitt Rubinfeld. Stochastic matching via in-n-out local computation algorithms. In Proceedings of the 57th Annual ACM Symposium on Theory of Computing (STOC 2025), pages 1055–1066. ACM, 2025. doi:10.1145/3717823.3718279.
- [4] Soheil Behnezhad, Avrim Blum, and Mahsa Derakhshan. Stochastic vertex cover with few queries. In Proceedings of the 2022 ACM-SIAM Symposium on Discrete Algorithms (SODA 2022), pages 1808–1846. SIAM, 2022. doi:10.1137/1.9781611977073.73.
- [5] Soheil Behnezhad and Mahsa Derakhshan. Stochastic weighted matching: (1 - )-approximation. In 61st IEEE Annual Symposium on Foundations of Computer Science (FOCS 2020), pages 1392–1403. IEEE, 2020. doi:10.1109/FOCS46700.2020.00131.
- [6] Soheil Behnezhad, Mahsa Derakhshan, and MohammadTaghi Hajiaghayi. Stochastic matching with few queries: (1 - )-approximation. In Proceedings of the 52nd Annual ACM SIGACT Symposium on Theory of Computing (STOC 2020), pages 1111–1124. ACM, 2020. doi:10.1145/3357713.3384340.
- [7] Soheil Behnezhad, Alireza Farhadi, MohammadTaghi Hajiaghayi, and Nima Reyhani. Stochastic matching with few queries: New algorithms and tools. In Proceedings of the Thirtieth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2019), pages 2855–2874. SIAM, 2019. doi:10.1137/1.9781611975482.177.
- [8] Avrim Blum, John P. Dickerson, Nika Haghtalab, Ariel D. Procaccia, Tuomas Sandholm, and Ankit Sharma. Ignorance is almost bliss: Near-optimal stochastic matching with few queries. In Proceedings of the Sixteenth ACM Conference on Economics and Computation (EC 2015), pages 325–342. ACM, 2015. doi:10.1145/2764468.2764479.
- [9] Deeparnab Chakrabarty and Gagan Goel. On the approximability of budgeted allocations and improved lower bounds for submodular welfare maximization and GAP. SIAM J. Comput., 39(6):2189–2211, 2010. doi:10.1137/080735503.
- [10] Chandra Chekuri and Sanjeev Khanna. A polynomial time approximation scheme for the multiple knapsack problem. SIAM J. Comput., 35(3):713–728, 2005. doi:10.1137/S0097539700382820.
- [11] Lin Chen, Jiayi Lian, Yuchen Mao, and Guochuan Zhang. A nearly quadratic-time FPTAS for knapsack. In Proceedings of the 56th Annual ACM Symposium on Theory of Computing (STOC 2024), pages 283–294. ACM, 2024. doi:10.1145/3618260.3649730.
- [12] Mahsa Derakhshan, Naveen Durvasula, and Nika Haghtalab. Stochastic minimum vertex cover in general graphs: A 3/2-approximation. In Proceedings of the 55th Annual ACM Symposium on Theory of Computing (STOC 2023), pages 242–253. ACM, 2023. doi:10.1145/3564246.3585230.
- [13] Mahsa Derakhshan and Mohammad Saneian. Query efficient weighted stochastic matching. In 52nd International Colloquium on Automata, Languages, and Programming (ICALP 2025), volume 334 of LIPIcs, pages 67:1–67:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2025. doi:10.4230/LIPIcs.ICALP.2025.67.
- [14] Shaddin Dughmi, Yusuf Hakan Kalayci, and Xinyu Liu. Near-optimal sparsifiers for stochastic knapsack and assignment problems. arXiv, abs/2512.01240, 2025. arXiv:2512.01240.
- [15] Shaddin Dughmi, Yusuf Hakan Kalayci, and Neel Patel. On sparsification of stochastic packing problems. In 50th International Colloquium on Automata, Languages, and Programming (ICALP 2023), volume 261 of LIPIcs, pages 51:1–51:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023. doi:10.4230/LIPIcs.ICALP.2023.51.
- [16] Uriel Feige and Jan Vondrák. Approximation algorithms for allocation problems: Improving the factor of . In 47th Annual IEEE Symposium on Foundations of Computer Science (FOCS 2006), pages 667–676. IEEE Computer Society, 2006. doi:10.1109/FOCS.2006.14.
- [17] Oscar H. Ibarra and Chul E. Kim. Fast approximation algorithms for the knapsack and sum of subset problems. J. ACM, 22(4):463–468, 1975. doi:10.1145/321906.321909.
- [18] Russell Impagliazzo and Ramamohan Paturi. On the complexity of k-sat. J. Comput. Syst. Sci., 62(2):367–375, 2001. doi:10.1006/jcss.2000.1727.
- [19] Richard M. Karp. Reducibility among Combinatorial Problems, pages 85–103. Springer, Boston, MA, 1972. doi:10.1007/978-1-4684-2001-2_9.
- [20] Takanori Maehara and Yutaro Yamaguchi. Stochastic monotone submodular maximization with queries. CoRR, abs/1907.04083, 2019. arXiv:1907.04083.
- [21] Xiao Mao. ()-approximation of knapsack in nearly quadratic time. In Proceedings of the 56th Annual ACM Symposium on Theory of Computing (STOC 2024), pages 295–306. ACM, 2024. doi:10.1145/3618260.3649677.
- [22] David P. Williamson and David B. Shmoys. The Design of Approximation Algorithms. Cambridge University Press, 2011. URL: http://www.cambridge.org/de/knowledge/isbn/item5759340/?site_locale=de_DE.
- [23] Yutaro Yamaguchi and Takanori Maehara. Stochastic packing integer programs with few queries. In Proceedings of the Twenty-Ninth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2018), pages 293–310. SIAM, 2018. doi:10.1137/1.9781611975031.21.
