17

I want to enumerate the partitions of $\{1,2,\ldots,n\}$ into disjoint sets $A$ and $B$ such that no subset of $B$ has a sum that is a member of $A$.

For example, when $n=3$ there are $7$ such partitions:

\begin{align*} A&=\emptyset,B=\{1,2,3\}\\ A&=\{1\},B=\{2,3\},\\ A&=\{2\},B=\{1,3\},\\ A&=\{1,2\},B=\{3\},\\ A&=\{1,3\},B=\{2\},\\ A&=\{2,3\},B=\{1\},\\ A&=\{1,2,3\},B=\emptyset, \end{align*}

Note that $A=\{3\},B=\{1,2\}$ is not a valid since there is a subset of $B$ whose sum is a member of $A$, namely $B$ itself. That is, $1+2=3\in A$.

I can do this numerically (by building the subsets recursively) but is there a way of theoretically determining this number?

Peter Taylor
  • 13,731
Auslander
  • 1,309
  • 1
    I've got a feeling that the answer begins with "Split it into pairs, where each pair sums up to $41$" (I'm also pretty sure that there's a music band by the name Sum 41, but that's besides the point I suppose). – barak manos Dec 26 '16 at 09:47
  • Does the reverse also need to hold, that no subset of $A$ has a sum that is a member of $B$? – Joffan Dec 26 '16 at 10:43
  • Hi Joffan, thanks for the question. The reverse does not need to hold. I'll add that to the problem description. – Auslander Dec 26 '16 at 11:12
  • I don't think that there can be a nice formula for this number. There are some recusion formulas on partial numbers, for example if you define $V_{n,k}$ as the number of such partitions of ${1,\dots,n}$ with $# A=k$, then $V_k=\lim_n (V_{n,k})$ stabilizes very quickly, for example $V_0=1$, $V_1=2$, $V_2=4$, $V_3=8$, $V_4=14$, $V_5=27$, $V_6=47$, $V_7=89$, etc. This sequence doesn't appear in OEIS. – san Jan 07 '17 at 01:39
  • I think the question is difficult to understand. Can you show for example what the answer is for n=3? – Paul Jan 08 '17 at 12:47
  • Paul, I've included the example you were after. – Auslander Jan 09 '17 at 02:19
  • interesting problem. It seems that there is some connection to the $\gcd$ function. Hope this would help you. – Zongxiang Yi Jan 09 '17 at 08:51
  • It suffices to require that no sum of a pair of elements of B is in A. – san Jan 10 '17 at 00:26
  • san, are you suggesting the following statement? if $x$ is the number of partitions such that $A$ contains no member that is a subset-sum of $B$ and $y$ is that number of partitions such that $A$ contains no member that is the sum of two members of $B$ then $x=y$. – Auslander Jan 10 '17 at 14:04
  • 2
    The following argument can be generalized and formalized: If $x_1+x_2+x_3=y$ with $x_1,x_2,x_3\in B$ and $y\in A$ (so we are dealing with a non-admissible partition), then either $x_1+x_2\in A$, which violates the "no sum of two elements of B in A" rule, or $x_1+x_2\in B$, but then for $y_1=x_1+x_2$ we have $y_1+x_3\in A$, which also violates the "no sum of two elements of B in A" rule. So this rule is enough. – san Jan 11 '17 at 19:55

1 Answers1

3

Since no one has answered yet...

An upper bound is obviously $2^n$.

A lower bound is $2^{\lfloor n/2\rfloor+1}$ (since there are these many subsets of $C=\{\lceil n/2 \rceil,...,n\}$, and any pair of distinct integers equal to or greater than $\lceil n/2 \rceil$ adds up to more than $n$, so any of these subsets qualifies for $A$).

I believe, in fact, that one can prove an upper bound of $2^{n/2}poly(n)$. The very informal reasoning is the following.

Consider all subsets of $C$ of cardinality $m$. In how many ways can I "extend" any generic one of them $S$ (solely) with elements from $\{1,...,\lceil n/2 \rceil-1\}$ without violating the no-sum-in-the-other-partition rule (I'll call these legal extensions)? Consider a "Poissonized" choice of $S$, where each element of $C$ is inserted in $S$ with probability $\gamma=m/|C|$ (so I don't get exactly cardinality $m$, but close enough, and I think everything can be formalized properly) and now consider an integer $p$ in $\{1,...,\lceil n/2 \rceil-1\}$. How likely is it that $p$ can be added? Let's think now of going through the numbers $\lceil n/2 \rceil, ..., n-p$; if for any such number $q$ one but not both of $q$ and $p+q$ are in $S$ then I can't add $p$ to $S$. What's the probability of being able to add $p$? Let's focus on $m<\lceil|C|/2\rceil$ i.e. $\gamma\lesssim \frac{1}{2}$, since it's easy to see that for $\gamma\gtrsim\frac{1}{2}$ the situation is symmetrical (also in terms of number of subsets with that cardinality). For each $q$, the probability of $p$ "surviving" $q$ is $\gamma(1-\gamma)$, so $p$ has on average a probability bounded away from $0$ of surviving the whole process if it's roughly between $n/2$ and $n/2-\frac{1}{\gamma}$, a probability a constant factor smaller on average if it's roughly between $n/2-\frac{1}{\gamma}$ and $n/2-\frac{2}{\gamma}$ and so on. All told, we can then expect to add $O(\frac{1}{\gamma})$ different numbers to $S$, and so extend it in $2^{O(\frac{1}{\gamma})}=2^{O(n/m)}$ ways (note that this is an upper bound).

Now, one could actually make an almost identical argument on the ways to extend subsets of $\{1, ...,\lceil n/2 \rceil-1\}$ with elements solely of $C$, showing that if one starts with cardinality $m$ one can extend a subset "legally" in $2^{O(\frac{1}{\gamma})}=2^{O(n/(m))}$ ways (again, an upper bound). Then, every subset of $\{1,...,n\}$ satisfies at least one of the following three properties:

  1. It has at most $\frac{n}{2\lg(n)}$ elements.
  2. It has at least half its elements in $C$.
  3. It has at least half its elements outside $C$.

The subsets with property $0$ are at most $n^{\frac{n}{2\lg(n)}}=2^{n/2}$, so they won't budge the $2^{n/2}poly(n)$. The subsets of with property $1$ but without property $0$ are subsets of $C$ that were be extended in at most $2^{O(n/m)}$ ways with $m\geq \frac{n}{2\lg(n)}$ i.e. in at most $2^{O(\lg(n))}=poly(n)$ ways; we know that there are $O(2^{n/2})$ subsets of $C$, so the subsets with property $1$ but not property $0$ are at most $2^{n/2}poly(n)$, and the same can be said of those with property $2$ but not property $0$.

Anonymous
  • 5,897
  • 1
    From the numerics, I also believe your conjecture to be true. In fact, I believe that one might be able to prove the following (or something similar): If $a_n$ is the number of partitions as described, then $a_{n+1}/a_{n}\to\sqrt{2}$ as $n\to\infty$. The values of $a_{n+1}/a_{n}$ for $n=1,\ldots,33$ are: ${2, 1.75, 1.71429, 1.58333, 1.63158, 1.51613, 1.55319, 1.50685, 1.52727, 1.47024, 1.51822, 1.456, 1.49634, 1.46022, 1.48282, 1.44262, 1.4855, 1.4363, 1.47144, 1.43747, 1.46731, 1.42872, 1.46583, 1.42485, 1.45981, 1.42614, 1.45409, 1.4202, 1.45612, 1.41745, 1.44995, 1.41823, 1.44865}$ – Auslander Jan 09 '17 at 11:17
  • @Auslander Note that $a_n=poly(n)2^{n/2}$ produces almost exactly this behaviour: there exists a $k$ such that $lim_{n\rightarrow\infty} a_{n+1}... a_{n+k}= (\sqrt{2})^k$; and in fact if the "poly(n)" term does not oscillate "too much" you get it with $k=1$. But I am curious about what the "poly(n)" term might be; in particular if it's bounded or grows polynomially. Could you give us the sequence $\frac{a_n}{a_1(\sqrt{2})^n}$? – Anonymous Jan 11 '17 at 00:11
  • The bounty is almost up and you've made some great process so it'll go to you. I'll get that sequence for you when I'm at my computer. I suspect we'll see that it is bounded. – Auslander Jan 12 '17 at 10:15
  • I might be wrong. The sequence $\frac{a_n}{a_1(\sqrt2)^n}$ for $1\leq n \leq 34$ is ${0.71, 1.00, 1.24, 1.50, 1.68, 1.94, 2.08, 2.28, 2.43, 2.63, 2.73, 2.93,3.02, 3.19, 3.30, 3.46, 3.52, 3.70, 3.76, 3.91, 3.98, 4.13, 4.17, 4.32, 4.35, 4.49, 4.53, 4.66, 4.68, 4.82, 4.83, 4.95, 4.96, 5.08}$ – Auslander Jan 12 '17 at 13:29
  • Auslander, thanks for the bounty! I don't quite feel I've done enough to deserve it... As for the sequence, it appears to grow sublinearly, but if I had to hazard a guess I'd say it's unbounded... – Anonymous Jan 13 '17 at 18:46
  • a partition of the set of answers is given by the set containing your answer and the empty set. The choice was rather easy! :) – Auslander Jan 14 '17 at 10:05