1

Is there any known algorithm for computing the GCD of two numbers in the modular representation (i.e, residues modulo pair-wise coprime integers) that does not require the computation of the actual integers using Chinese Remainder Theorem?

Let the modulii set $M = \{2, 3, 5, 7\}$. The residue representation of $x$ is written as $x \bmod M$ given by

$$ x \bmod M = \langle x \bmod 2, x \bmod 3, x \bmod 5, x \bmod 7 \rangle \mod M$$

$$24 = \langle 0, 0, 4, 3 \rangle \mod M$$ $$36 = \langle 0, 0, 1, 1 \rangle \mod M$$

We know $GCD(24, 36) = 12 = \langle 0, 0, 2, 1\rangle \mod M$.

In general, is there a way to compute the modular representation of the GCD directly in the residue form without converting the respective residue representations into the integers {$(24, 36)$ in this example}, and without using the traditional integer GCD computation?

If there is a previously known method, please provide a reference to the text or paper.

Related:

Arithmetic inequality comparison of integers in residues modulo primes

vvg
  • 3,526
  • 1
    Unfortunately, no. Under $\bmod M$, $24$ and $864$ are equivalent. However $\gcd(864,36) = 36 \ne 12 = \gcd (24,46)$. – player3236 Oct 07 '20 at 17:02
  • @player3236: What if we are not concerned about integers greater than the range that is representable $\mod M$? For instance, $M$ is chosen based on apriori knowledge that integers greater than the maximum possible in that number system will not occur. – vvg Oct 07 '20 at 17:07
  • On additional research, I found this paper: Chiang, Jen-Shiun & Lu, Mi. (1991). A general division algorithm for residue number systems. 76 - 83. 10.1109/ARITH.1991.145537. See: https://www.researchgate.net/publication/3517570_A_general_division_algorithm_for_residue_number_systems

    The paper describes signed division in a Residue Number System using a parity checker.

    – vvg Oct 14 '20 at 05:18
  • If for a residue number system we have a division algorithm then using it we can perform Euclidian algorithm to compute GCD of given numbers, isn't it? – Alex Ravsky Oct 18 '20 at 08:51

0 Answers0