How to solve $x^x = y^y \mod p$?

857 Views Asked by At

Let $p>5$ be a prime.

How to solve $x^x = y^y \mod p$? How many solutions are there for a given $p$ such that $x,y < p$?

I know the discrete logarithm and the theory of quadratic residues, but I'm not sure if that helps.


Question 2

How many $p$ exist such that at least $(p-1)/2$ residues are of the form

$$ r = a^b = b^a \mod p $$

2

There are 2 best solutions below

0
On

question 1: $x\equiv y$ is the trivial answer. knowing parity arguments seems more useful, odd mod odd is opposite the integer multiplier for example. So $3^3$ is 6 mod 7 so it's multiplier is odd (3 in fact). $3^5$ is 5 mod 7 so it's multiplier is even (34 which is 6 mod 7 in this case). So odd pairs (x,y) depend on being in the same parity multiplier. You can do similar mod 3 etc. That will narrow it down.

0
On

COMMENT.- It seems that there is no efficient algorithm to calculate solutions and it is almost certain that there is no direct formula for this. In general we can assure that $1^1=(p-1)^{p-1}=1$ but it seems that there are several solutions in many cases for example for $p = 11$ we have $9^9=8^8=3^3=6^6=5$