Parity of the result of modular multiplication and modular multiplicative inverse

modular arithmeticparityprime numbers

I want to know the parity of the result of applying modular multiplication and modular multiplicative inverse with a prime modulo knowing only the operands, i.e. without performing the actual operation.

Is this possible?

EXAMPLE

Given $a$, $b$, $c$, $d$, and $p$. Knowing $even(a)$, $even(b)$, $odd(c)$, $odd(d)$, $odd(p)$, and $prime(p)$. Given $modmul_p(x, y)$ being the modular multiplication of $x$ and $y$ modulo $p$, and $modinv_p(x)$ being the modular multiplicative inverse of $x$ modulo $p$. What will be the parity of the following operations?

$$modinv_p(a)$$
$$modinv_p(c)$$

$$modmul_p(a,b)$$
$$modmul_p(a,c)$$
$$modmul_p(c,a)$$
$$modmul_p(c,d)$$

Best Answer

The information specified is insufficient to determine the desired parities.

For each of the parities in question, we can find two examples, each satisfying the given conditions, but where the parities of the results are not the same.

For the question of the parity of $(x^{-1}\;\text{mod}\;p)$, let $p=5$.$\;$Then

    For $a=2$, we get $(a^{-1}\;\text{mod}\;p)=3$.

    For $a=4$, we get $(a^{-1}\;\text{mod}\;p)=4$.

    For $c=1$, we get $(c^{-1}\;\text{mod}\;p)=1$.

    For $c=3$, we get $(c^{-1}\;\text{mod}\;p)=2$.

For the question of the parity of $(xy\;\text{mod}\;p)$, let $p=7$.$\;$Then

    For $a=2,\,b=4$, we get $(ab\;\text{mod}\;p)=1$.

    For $a=4,\,b=4$, we get $(ab\;\text{mod}\;p)=2$.

    For $a=4,\,c=3$, we get $(ac\;\text{mod}\;p)=5$.

    For $a=4,\,c=5$, we get $(ac\;\text{mod}\;p)=6$.

    For $c=1,\,d=1$, we get $(cd\;\text{mod}\;p)=1$.

    For $c=3,\,d=3$, we get $(cd\;\text{mod}\;p)=2$.

Thus, as shown by the above examples, the parity, mod $p$, of products and inverses, is not uniquely determined by the parities, mod $p$, of the operands.

Suggestion: In the future, do some initial testing to avoid asking questions about the truth of statements which are so easily proven false.

Related Question