Does there exist two infinite subsets of naturals $A, B$ such that each $n \in A + B$ uniquely determines $a \in A, b \in B$ such that $a + b = n$?

49 Views Asked by At

Does there exist two infinite sets of naturals $A, B$ such that each $n \in A + B = \{ a + b : a\in A, b\in B\}$ has a unique solution $a + b = n$ in which $a \in A, b \in B$?

For example:

$$ A = \{0,3,6\} \\ B = \{0,2,7\} \\ \implies \\ 0 = 0 + 0 \text{ is unique } \\ 0 = 0 + 2 \text{ is unique } \\ \vdots \\ 6 + 7 = 13 \text{ is unique } $$

But I need the sets $A, B$ to be infinite.

I need it so that when multiplying two numbers in binary:

$$ (\sum_{i \in A}^{\infty} a_i 2^i)(\sum_{j \in B}^{\infty} b_j 2^j) $$

Each coefficient is of the form $a_i b_j$ for some $i, j$ and so that the position $i$ that $a_i$ came from and the position $j$ that $b_j$ came from is uniquely determined by the value $i + j$.


I only need to always be able to determine two finite sets $A, B$ of roughly the same size such that $|A||B| = |A + B| = N^2$ for any $N \in \Bbb{N}$, which is why infinity came to mind, but an algorithm that returns the two finite sets given $N$ is sufficient for my purposes.

2

There are 2 best solutions below

0
On BEST ANSWER

Define $A,B$ as follows . . .

  • Let $A$ be the set of positive integers of the form $2^s$ where $s$ is even.
  • Let $B$ be the set of positive integers of the form $2^t$ where $t$ is odd.
If for $a\in A$ and $b\in B$, we have $$n=a+b=2^s+2^t$$ where $s$ is even and $t$ is odd, then $s,t$ are uniquely determined by $n$, hence so are $a,b$.
4
On

Sure. Let $A$ be the powers of 10, and $B$ be $\{2, 22, 222, 2222, \dotsc\}$.

Numbers in $A+B$ are either of a form like 1000022222, or like 2223222, and in either case you can determine what $a$ and $b$ are.

If you want more numbers in the sets, we can generalize quasi's answer: Let $A$ be the sums of distinct odd powers of two, and $B$ be the sums of distinct even powers of two. Then each set has 32 elements below 1000, which is better than the 3 each in my answer, or the 5 each in quasi's answer. $A$ starts with $\{0, 2, 8, 10, 32, 34, \dotsc\}$ and $B$ starts with $\{0, 1, 4, 5, 16, 17, 20, \dotsc\}$.

Then the number of elements in $A$ or $B$ less than any given $N$ is about $2^{\log_2(N)/2}$: for half the available bit positions (either the even or odd ones), you make a choice between putting a 0 or 1 there. This is about $\sqrt{N}$. By the pigeonhole principle, the best you can do is less than $\sqrt{2N}$, so this is close to optimal.