0
$\begingroup$

$$f(x)=3^x \mod{17}$$

How to find the pre-image of the set if this function maps from real numbers to real numbers. What command would I use, to see the pre-image if the function would map from integers to integers.

It is easy to compute with mathematica, but the command to find the pre-image I cannot find.

What I tried, and there are no methods available to solve it:

Solve[y == 3^x - 17 Floor[3^x/17], x]

Output: enter image description here

$\endgroup$
4
  • 2
    $\begingroup$ Not sure why you'd want the pre-image for the reals. For integers, it's a discrete logarithm using MultiplicativeOrder like this: pri = Table[MultiplicativeOrder[3, 17, i], {i, 17 - 1}] and you can verify with Table[Mod[3^y, 17], {y, pri}] $\endgroup$
    – flinty
    Commented May 8, 2021 at 16:42
  • 1
    $\begingroup$ You might also look at PowerMod e.g. PowerMod[3, x, 17] $\endgroup$
    – mikado
    Commented May 8, 2021 at 16:44
  • $\begingroup$ Ok, but how to get it back, if I only know the function and the image for example. $\endgroup$
    – VLC
    Commented May 8, 2021 at 16:51
  • 1
    $\begingroup$ Partial success: domain = -1 < u < 60; range = 3 < y < 5; Reduce[y == PiecewiseExpand[Mod[u, 17], domain] && domain && range /. u -> 3^x, {x}, {y}, Reals]. Let someone else take it from here. $\endgroup$
    – Michael E2
    Commented May 8, 2021 at 18:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.