Modulo Arithmetic Shortcut

117 Views Asked by At

Consider two numbers $x$ and $y$ such that $0<x<y<7500$. Consider a function $m(x,y)$, defined: $m(x,y)= (2019201913*x + 2019201949*y ) \bmod 2019201997$.

May this function be simplified?

Define $m(x,y) = (ax+by)/c$. I noticed that a, b, and c are equal to 8 orders of magnitude ($20192019 \_ \_$) .

1

There are 1 best solutions below

0
On BEST ANSWER

Given that:

  • $2019201913 ≡ -84 \pmod{2019201997}$
  • $2019201949 ≡ -48 \pmod{2019201997}$

$m(x,y)$ may be simplified to $m(x,y)= (-84x-48y) \bmod 2019201997 $. Given that $x,y \in (0,7500) $, $m(x,y)$ can be considered to be equal to $2019201997-84x-48y$. This, of course, may be further simplified to $2019201997−12(7+4)$.