I have 4 equations with mods and I need to find the params to build the function $h(x)$. Is there a method to find these?

$h(x) = ((ax + b)$ mod $c) $mod $3$

$h(0) = 0$;

$h(1) = 2$;

$h(2) = 1$;

$h(3) = 0$;


  • $\begingroup$ Example, $a=2,b=0$ and $c=3$. $\endgroup$ – Jo' May 2 at 0:16
  • $\begingroup$ How do you find them?. Just testing values? $\endgroup$ – emee May 2 at 0:17
  • $\begingroup$ $c=3$ is something to start, first and last condition says $b$ is not necessary, and then it follows $a=2$. $\endgroup$ – Jo' May 2 at 0:23
  • $\begingroup$ Problem is there are infinitely many values that fit the data. $\endgroup$ – Roddy MacPhee May 3 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.