Is there set partition problem with maximum number of subsets?

252 Views Asked by At

Given a set of $n$ elements having weights $S=\{x_1,x_2,x_3\dots,x_n\}$.

Find subsets $\{s_1,s_2,s_4,\dots,s_k\}$ of $S$ such that cost each subset is equal and $k$ is maximized.

I know for fixed $k$ I can use partition problem. But above problem requires maximizing number of subsets as well.

Can you direct me towards literature that could solve it.

1

There are 1 best solutions below

0
On

Given that for fixed $k$, the problem is NP-complete, so we don't know a polynomial-time algorithm, the overhead of just trying every possible $k$ is relatively insignificant. For example, if we had an $\mathcal O(C^n)$ algorithm for solving the $k$-partition problem, for any value of $k$, we could try each value $k=1, 2, \dots, n$ in just $\mathcal O(n \cdot C^n)$ total time, and then we'd have solved the maximization problem as well.

And, of course, to solve the maximization problem, we have to be able to solve partition problems for various values $k$, so this is optimal up to the factor of $n$.