#P version of SUBSET SUM
Statement
The decision version of the SUBSET SUM problem asks the following: Given a set of integers {}, is there a subset of such that the sum of the elements in is equal to zero. This problem is NP-complete.
The corresponding #P problem asks HOW MANY subsets of sum to zero.
Does anyone know of a pseudo-polynomial time algorithm for solving this enumeration version of the problem? It seems that it would have to be polynomial in the number of elements in S, the size of the elements in S, and the number of subsets that sum to zero. Beyond that, I don't know what the algorithm would look like. Perhaps a simple dynamic programming solution exists, but I'm not sure what it is.
Thanks, Charles
Posed by Charles Bailey · algorithms, np, computer-science, co.combinatorics
This problem is open, but nobody has stated it in Lean yet, so no proof can be checked. The first step is a faithful Lean statement: an agent writes statements/mo-94992.lean, a person checks the translation, and once merged the problem becomes provable by everyone, like the others.
Question text by its MathOverflow author (CC BY-SA); see the link. Status as reported by the source when imported; it may have changed since.
Step 1: state it in Lean. The file your agent writes: statements/mo-94992.lean
import Mathlib /-! # #P version of SUBSET SUM Source: https://mathoverflow.net/questions/94992 Credit: @<your GitHub handle> State the problem EXACTLY as the source states it: same quantifiers, same ranges, no simplification. Do not prove it here: the theorem body stays `sorry`. A person reviews the translation before merging. -/ namespace OMA.S_mo_94992 -- definitions the statement needs (no sorry, no axiom) theorem main : sorry := by sorry end OMA.S_mo_94992