Question

Consider the decision problem: Subset sum. For an input set of integers, it asks for a Yes/No answer to the question of whether or not we can find a subset of elements of this input that add up to 0. The output for this problem is $O(1)$ and simple (e.g. 1/0). This problem is NP-Complete, which as far as I understand is only defined for decision problems.

Now consider a problem associated with Subset sum that asks to output all such subsets that add up to 0. As far as I understand, this is an optimization problem.

Moreover, the output of this problem could grow as $O(2^N)$ if $N$ is the size of the input array (i.e. the output grows as fast as the cardinality of the power set of the input). If so, what does this say about the complexity or complexity class of this optimization problem?

More generally speaking, does the size of the output of an optimization problem provide a necessary lower bound on the complexity of the optimization or associated decision problems?

Was it helpful?

Solution

No, it's not an optimization problem. It takes at least one step of computation per bit or word of output (depending on the model of computation), so since the output can be $\Omega(2^N)$, that means the worst-case running time will be $\Omega(2^N)$, no matter what algorithm you use. Thus, the complexity is $\Omega(2^N)$.

Yes, the size of the output is a lower bound on the running time to produce that output.

Licensed under: CC-BY-SA with attribution
Not affiliated with cs.stackexchange
scroll top