2
$\begingroup$

Let us consider a specific case of an extended Kakuro puzzle. Given an integer $n$, we must form $n$ as the sum of $k$ distinct positive integers each less than or equal to $r$. From a mathematical standpoint we know that any number including, and between $L=\frac{k(k+1)}{2}$ and $R=k(r+1)-L$ is achievable in such a way. Given a number $n$, which is between those limits, can anyone think of an algorithm to generate a set of $k$ integers which satisfy the above conditions(knowing that there is at least one such set)?

$\endgroup$
1
  • 2
    $\begingroup$ The algorithm mimics the proof that such a partition is achievable. $\endgroup$ Commented Aug 28, 2016 at 14:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.