2

How can we prove that the following problem $A$ is NP complete?

Given a set of integers $S={a_1, ..., a_n}$ and a number $D$, is it possible to find disjoint sets $S_1, S_2, S_3, S_4$ such that $S_1 \cup S_2 \cup S_3 \cup S_4=S$ and

$$ -\sum_{j=1}^{4}\frac{\sum_{a_i \in S_j}a_i}{\sum_{a_i \in S}a_i}\log_2(\frac{\sum_{a_i \in S_j}a_i}{\sum_{a_i \in S}a_i})\geq D$$

I was thinking on using some NP complete problem $B$ and showing that $B \leq_P A$, but I can't figure out what reduction would work.

Here is what I tried (simplified the problem to 2 sets): Given a set $S$ of n elements, I tried to prove that $S \in \text{Partition-Problem} \iff \langle S, 1 \rangle \in A$. If $S$ is an instance of the partition problem, it means there are 2 subsets in $S$ that have the same sum ($n/2$). Therefore the expression in $A$ (with 2 sets instead of 4) evaluates to $-\log_2 (1/2)=1$. Then proving $S \in \text{Partition-Problem} \Rightarrow \langle S, 1 \rangle \in A$ is trivial. However I am still stuck at proving the $\Leftarrow$ part.

D.W.
  • 167,959
  • 22
  • 232
  • 500
user1354784
  • 309
  • 3
  • 14

1 Answers1

1

Let's say that the numbers $a_1,\ldots,a_n$ are non-negative, and sum to $A$. They induce a probability distribution on $\{1,\ldots,n\}$, in which the probability of $i$ is $a_i/A$.

Given a partition $S_1,S_2,S_3,S_4$, let $I$ be a random variable distributed as above, and let $X$ be the index of the set to which $I$ belongs (so $X \in \{1,2,3,4\}$). Your condition then reads $$ H(X) \geq K, $$ where $H(\cdot)$ is the entropy function.

This suggests choosing $K = 2$, since we know that $H(X) = 2$ iff $\Pr[S_1] = \Pr[S_2] = \Pr[S_3] = \Pr[S_4]$.

We can now describe a reduction from PARTITION to your problem. Given an instance $b_1,\ldots,b_m$ of PARTITION, where $b_1,\ldots,b_m$ are non-negative integers summing to $B$, create an instance of your problem by adding two copies of $B/2$, and by taking $K=2$. The list $b_1,\ldots,b_m,B/2,B/2$ can be partitioned into four parts with equal sum (i.e., $H(X) \geq 2$) if $b_1,\ldots,b_m$ can be partitioned into two parts with equal sum.

Yuval Filmus
  • 280,205
  • 27
  • 317
  • 514