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 $$