2
$\begingroup$

The reduction of Exact Cover to Subset Sum has previously been discussed at this forum. What I'm interested in is the practicality of this reduction, which I will discuss in section 2 of this post. For you who are not familiar with these problems I will define them and show the reduction Exact Cover $\leq_p$ Subset Sum in section 1. For the readers who are already familiar with these problems and the reduction can move ahead to section 2.

section 1

The Exact Cover defined as follows:

Given a family $\{S_j\}$ of subsets of a set $\{u_i, i=1,2,\ldots,t\}$ (often called the Universe), find a subfamily $\{T_h\}\subseteq\{S_j\}$ such that the sets $T_h$ are disjoint and $\cup T_h=\cup S_j=\{u_i, i=1,2,\ldots,t\}$.

The Subset Sum is defined as follows:

Given a set of positive integers $A=\{a_1,a_2,\ldots,a_r\}$ and another positive integer $b$ find a subset $A'\subseteq A$ such that $\sum_{i\in A'}a_i=b$.

For the reduction Exact Cover $\leq_p$ Subset Sum I have followed the one given by Karp R.M. (1972) Reducibility among Combinatorial Problems

Let $d=|\{S_j\}|+1$, and let $$ \epsilon_{ji}=\begin{cases}1 & \text{if} & u_i\in S_j, \\ 0 & \text{if} & u_i \notin S_j,\end{cases} $$ then $$ a_j=\sum_{i=1}^{t}\epsilon_{ji}d^{i-1}, \tag{1} $$ and $$ b = \frac{d^t-1}{d-1}. \tag{2} $$

section 2

In practise (meaning for real world problems) the size of the Universe for the Exact Cover problem can be very large, e.g. $t=100$. This would mean that if you would reduce the Exact Cover problem to the Subsets sum problem the numbers $a_j$ contained in the set $A$ for the Subset Sum could be extremely large, and gap between the $\min\{A\}$ and $\max\{A\}$ can therefore be huge.

For example, say $t=100$ and $d=10$, then its possible to have an $a_j\propto 10^{100}$ and another $a_i\propto 10$. Implementing this on a computer can be very difficult since adding large numbers with small numbers basically ignores the small number, $10^{16} + 1 - 10^{16} = 0$. You can probably see why this could be a problem.

Is it therefore possible to reduce the Exact Cover to Subset Sum in a more practical way, that avoids the large numbers, and have that the integers in $A$ are of a more reasonable size?

I know that it is possible to multiply both $A$ and $b$ by an arbitrary factor $c$ to rescale the problem, but the fact still remains that gap between possible smallest and largest integer in $A$ is astronomical.

Thanks in advance!

$\endgroup$
  • $\begingroup$ What is the ultimate goal of the reduction? It seem you intend to solve Exact Cover instances with an algorithm for Subset sum. However, this does not seem to be a standard approach, solving it via ILP or SMT solvers might be more appropriate. Is there a good reason why you want to reduce to subset sum in particular? $\endgroup$ – Discrete lizard Mar 29 at 10:41
  • $\begingroup$ @Discretelizard The goal is to continue the reduction and in the end have reduced Exact Cover to Max Cut, (Exact Cover $\leq_p$ Subset Sum $\leq_p$ Number Partition $\leq_p$ Max Cut). When I do this full reduction Exact Cover to Max Cut, the weight of the edges in the graph is huge! So I'm thinking if I can somehow go back to the first reduction Exact Cover $\leq_p$ Subset Sum and make the numbers smaller, it will possible lead to the weighted edges in Max Cut to be smaller as well. $\endgroup$ – Turbotanten Mar 29 at 10:43
  • $\begingroup$ Ok, and what do you want to do with this reduction from Exact Cover to Max Cut? $\endgroup$ – Discrete lizard Mar 29 at 10:44
  • $\begingroup$ @Discretelizard To make a long story short. The goal in the end is to study a "Quantum Algorithm" called QAOA. They apply this algorithm to solve Max Cut. $\endgroup$ – Turbotanten Mar 29 at 10:47
  • $\begingroup$ So, in the end, you want to solve Max Cut? Why not e.g. reduce Max Cut to SAT and use a SAT-solver or reduce it ILP and use an ILP solver? $\endgroup$ – Discrete lizard Mar 29 at 10:51
4
$\begingroup$

The short answer is no :-)

Why? ... Because SUBSET SUM is weakly NP-complete; you cannot avoid the exponential blowup of the numerical value of the arguments with respect to the input size of the original problem (in other words the length of the binary representation of the $a_j$ is kept polynomial by the reduction but the values obviously are exponential)

If this was not the case you could use Dynamic Programming to solve an NP-complete problem in polynomial time.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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