Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

It's possible that this question is trivial and I've overlooked something.

Let us impose the following constraint on the well-known PARTITION problem: in all inputs of a new problem the number of elements is fixed and equals $k$?

Does such constraint make PARTITION polynomially solvable?

P.S. There is pseudopolynomial algorithm for it with running time $\mathcal{O}(nA)$, where $A$ is the sum of the numbers in the given input. However, fixing $n$ doesn't seem to make it polynomial in $\log A$. Or am I missing something?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Yes. The problem becomes in $P$. The reason is that there would be a fixed number of partitions bounded by $O(2^k)$ which is a constant. You do not need the $O(nA)$ dynamic programming algorithm.

share|improve this answer
    
Of course, you're right. Thanks. –  Oleksandr Bondarenko Feb 5 '11 at 1:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.