LLMpediaThe first transparent, open encyclopedia generated by LLMs

Subset sum problem

Generated by GPT-5-mini
Note: This article was automatically generated by a large language model (LLM) from purely parametric knowledge (no retrieval). It may contain inaccuracies or hallucinations. This encyclopedia is part of a research project currently under review.
Article Genealogy
Parent: Richard Karp Hop 3
Expansion Funnel Raw 73 → Dedup 8 → NER 8 → Enqueued 5
1. Extracted73
2. After dedup8 (None)
3. After NER8 (None)
4. Enqueued5 (None)
Similarity rejected: 4
Subset sum problem
NameSubset sum problem
FieldComputer science
ProblemDecision problem
RelatedKnapsack problem, Partition problem, NP-complete problems

Subset sum problem The subset sum problem is a decision and optimization challenge asking whether a selection of numbers from a given multiset can sum to a target value, and to find such a selection when it exists. Originating in discrete mathematics and theoretical computer science, it has influenced research at institutions like MIT, Princeton University, Stanford University, Bell Labs and impacted projects at IBM, Microsoft Research, Google and Intel. The problem connects to landmark developments involving researchers associated with Alan Turing, Alonzo Church, Stephen Cook, Richard Karp and institutions such as Carnegie Mellon University and University of California, Berkeley.

Definition and examples

Given a finite multiset of positive integers and a target integer, the decision variant asks whether some subset sums exactly to the target; the optimization variant asks for a subset whose sum is maximal without exceeding the target. Classic textbook examples used in courses at Harvard University, Yale University, Columbia University, University of Cambridge, and Oxford University demonstrate small instances where subsets like {3, 34, 4, 12, 5, 2} produce targets such as 9 or 10. Pedagogical treatments by authors at Princeton University Press and MIT Press illustrate reductions from combinatorial problems discussed in seminars at International Congress of Mathematicians and workshops at ACM and IEEE conferences. Historical instances in cryptography lectures reference early knapsack-based schemes studied at Courant Institute and in publications from École Normale Supérieure.

Computational complexity

The decision variant is one of the canonical NP-complete problems identified in foundational work by Stephen Cook and refined in reductions by Richard Karp; it resides in complexity theory alongside problems like Boolean satisfiability problem, Hamiltonian cycle problem, and Clique problem. As a weakly NP-complete problem, it admits pseudo-polynomial time algorithms tied to numeric magnitudes, a distinction discussed in texts from Cambridge University Press and surveys presented at Symposium on Theory of Computing. Complexity-theoretic relationships link it to classes and results from researchers at Princeton University and University of California, Berkeley, and to hardness results explored in papers from SIAM and IEEE Computer Society venues. Parameterized complexity analyses by groups at ETH Zurich and Université Paris-Saclay frame the problem in terms of parameters like cardinality and largest element.

Algorithms and methods

Exact approaches include dynamic programming textbooks taught at Massachusetts Institute of Technology that use time O(n·W) pseudo-polynomial algorithms, meet-in-the-middle techniques attributed to practitioners at AT&T Bell Laboratories, and branch-and-bound schemes implemented by teams at Microsoft Research and IBM Research. Approximation and heuristic strategies—such as fully polynomial-time approximation schemes (FPTAS) described in monographs from Springer—are compared with randomized algorithms and lattice-based reductions investigated by researchers at ETH Zurich and École Polytechnique Fédérale de Lausanne. Cryptanalytic methods applied to knapsack cryptosystems were developed in research groups at University College London and Royal Holloway, University of London; integer programming formulations used in solvers from Gurobi and CPLEX exploit cutting-plane and branch-and-cut frameworks refined at INRIA and Max Planck Institute.

Variants and generalizations

Generalizations include the 0–1 knapsack problem popularized in courses at Stanford University and Imperial College London, the partition problem discussed in seminars at University of Oxford, the bounded and unbounded subset sum versions appearing in publications from Tokyo Institute of Technology, and multidimensional knapsack variants studied at University of Manchester and Delft University of Technology. Other notable variants—such as modular subset sums explored in algebraic number theory talks at Institute for Advanced Study and multiobjective formulations presented at University of Illinois at Urbana-Champaign—tie into lattice problems researched at University of Waterloo and University of Bonn.

Applications

Applications span cryptography, where early knapsack cryptosystems were proposed by researchers connected to MIT and later broken in analyses at University College London; resource allocation problems in operations research departments at Columbia University and McGill University; scheduling and budget planning case studies used by consultants from McKinsey & Company and Boston Consulting Group; and bioinformatics sequence assembly efforts at Broad Institute and Sanger Institute. Additional applied domains include compiler optimization work at Bell Labs, embedded systems design in teams at ARM Holdings, and combinatorial auctions studied by economists at London School of Economics.

Practical implementations and benchmarking

Implementations reside in algorithm libraries and solver packages from GNU, Netlib, Boost C++ Libraries, and industrial offerings like Gurobi and CPLEX; benchmarking suites and competitions hosted by SAT Competition organizers and performance evaluations published in proceedings of International Conference on Parallel Processing and Advanced Research in Applied Mathematics compare exact, approximate, and heuristic implementations. Performance studies from research groups at ETH Zurich, University of California, Berkeley, Tsinghua University, and Peking University evaluate time-memory tradeoffs, parallelization on hardware from NVIDIA and AMD, and scalability for large-instance datasets curated by repositories maintained at University of Waterloo and Stanford University.

Category:Computational complexity theory