4
$\begingroup$

Consider the following ternary relation $R\subseteq\mathbb{N}^3$:

$(p,q,m)\in R$ iff $p,q>0$ and there is a set $S\subseteq \{\frac{1}{n}:n\in\mathbb{N}, n\geq 1\}$ such that $|S|=m$ and $\frac{p}{q}=\sum_{s\in S} s$.

Is $R$ primitive recursive, recursive, or recursively enumerable?

$\endgroup$
  • 2
    $\begingroup$ It is worth mentioning that these are Egyptian fractions: en.wikipedia.org/wiki/Egyptian_fraction $\endgroup$ – Andrej Bauer Jan 2 '15 at 23:19
  • 3
    $\begingroup$ The following paragraph from that article is I think directly relevant to this question: "It is possible to use brute-force search algorithms to find the Egyptian fraction representation of a given number with the fewest possible terms (Stewart 1992) or minimizing the largest denominator; however, such algorithms can be quite inefficient. The existence of polynomial time algorithms for these problems, or more generally the computational complexity of such problems, remains unknown." $\endgroup$ – David Eppstein Jan 4 '15 at 6:04
3
$\begingroup$

Consider $(p,q,m)\in R_k$ iff there is a set $S\subseteq \{\frac{1}{n}:n\in\mathbb{N}, n> k\}$ such that $|S|=m$ and $\frac{p}{q}=\sum_{s\in S} s$, so $R=R_0$.

It is easy to see that $(p,q,m)\in R_k$ iff there is an $k<\ell\le \frac {qm}p$ such that $(p\ell-q,q\ell,m-1)\in R_\ell$.

$\endgroup$
  • 1
    $\begingroup$ I suppose it should be $l\le qm/p$. If I understand the argument correctly, it also shows that if there is such a set $S$, there is one with $S\subseteq\{n^{-1}:n<(qm)^{2^m}\}$ or so, hence the problem is in NEXP. $\endgroup$ – Emil Jeřábek supports Monica Jan 4 '15 at 19:38
  • $\begingroup$ Sorry, NEXPEXP, if $m$ is given in binary. $\endgroup$ – Emil Jeřábek supports Monica Jan 4 '15 at 19:50

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.