4
$\begingroup$

From the section Open Problems in the article Connect the Stars by Kenneth Regan:

Finally, we offer an intriguing open problem about how fast we can multiply integers. It is possible to multiply integers very fast if they are represented via the Chinese Remainder Theorem—though perhaps still not in linear time. Alas while addition and multiplication are fast in this representation, it seems to make it harder to compare two numbers. Thus a natural question is:

Does there exist a representation of integers so that addition, multiplication, and comparison are all doable in linear time? Basically, is there a linear time discretely ordered ring?

I found this very intriguing.

  • How can integers be represented via the Chinese Remainder Theorem?
  • How can they be multiplied?

1 Answers 1

2

See the Wikipedia entry on CRT for an introduction.

Essentially, a number is represented in a set of rings, usually by computing modulo a set of primes. See my answer here about representing the numbers and combining them to get the original number.

To multiply a number, simply multiply the residue (which is the number modulo a prime) by another number modulo the same prime, and calculate the remainder modulo the prime. To give a concrete example, we have, for two number $a$ and $b$ to be multiplied together modulo another number $p$, the result $r$ is:

$((a \bmod p)\cdot(b \bmod p))\bmod p \equiv (a \cdot b) \bmod p$

Then simply perform this calculate with a sufficient set of $p$s.

NOTES ON LINEAR OPERATIONS

The following is a further illustration of trying to find the ring that K. Regan talks about in his statement. As pointed out by the OP in the comments below, finding the square root may be impossible, as values in RNS for squares are not necessarily unique. Thus we may require some sort of overdetermined system to do so.

We can note that

$\text{Max}(a,b) = \frac{(a+b) + \sqrt{(a-b)^2}}{2}$ $\text{Min}(a,b) = \frac{(a+b) - \sqrt{(a-b)^2}}{2}$

So if we can determine the square root shown above, we can effectively perform a comparison using the formulas above and responding accordingly.

  • 0
    @RealzSlaw: You are correct. I'll remove the error, keeping in mind Regan's and your other question. – 2012-11-13