Set packing is a classical NP-complete problem in computational complexity theory and combinatorics, and was one of Karp's 21 NP-complete problems.
Suppose one has a finite set S and a list of subsets of S. Then, the set packing problem asks if some k subsets in the list are pairwise disjoint (in other words, no two of them share an element).
More formally, given a universe and a family of subsets of , a packing is a subfamily of sets such that all sets in are pairwise disjoint, and the size of the packing is . In the set packing decision problem, the input is a pair and an integer ; the question is whether there is a set packing of size or more. In the set packing optimization problem, the input is a pair , and the task is to find a set packing that uses the most sets.