Undecidable difference of decidable sets.

computabilitydecidabilitylogic

I have the following problem:

Prove that there are decidable sets of natural numbers 𝐴 and 𝐵 such that set $A − B = \{x − y | x \in A, y \in B\}$ is undecidable (𝐴 − 𝐵 is a subset of natural numbers, so we could say that $x\in A-B$ only and only if $\exists a \in A, \exists b \in B: a = b + c)$.

Of course, the set we need will be decidable and the addition to our set will be undecidable. I've seen a similar task (but with set $\{c | x = c y, x \in A, 𝑦 \in B\})$. It is solved using the $𝐴 = \{2^{f(k)} (2k+1) | k \in N\}$ for some totally computable function $f(x)$, such that $f(N) = X$ for an undecidable set $X$ and $B$ – set of odd numbers. But I can't use this idea in my problem (I can't invent the way how to encode value $f(key)$ and the $key$ in one number to use it in the future).

I'll be happy to hear any ideas.

Best Answer

The idea is the same: let $f$ be total computable s.t. $f(\mathbb N)$ is not decidable, let $A$ be set of numbers $g(n) = 2^{2f(n)} + 2^{2f(n) + 2n + 3}$ and let $B$ be set of numbers $2^{2k + 1}$.

We can easily recover $n$ from $g(n)$ and compute $f$ on it, to check if some number is in $A$ or not.

We can prove that $2^{2k}$ is in $A - B$ iff $k = f(n)$ for some $n$.

Indeed, assume $2^{2p} = 2^{2q} + 2^{2q + 2r + 3} - 2^{2s + 1}$ for some $p,q,r,s$. We need to prove that $p = q$. Lets rewrite it as $2^{2p} + 2^{2s + 1} = 2^{2q} + 2^{2q + 2r + 3}$. Both left and right part written in binary have two non-zero digits, with only one on even position $2p$ and $2q$ correspondingly. As numbers are equal, this positions are equal.

So, we have that $(A - B) \cap \{2^{2k} | k \in \mathbb N|\}$ is undecidable, and thus $A - B$ is also undecidable.