Are these two equations: $$ \ (g^a Mod\ p)^b\, $$

$$ \ (g^a)^b (Mod\ p)\, $$ one and the same? If yes then how And if no then how to solve the first equation?

  • $\begingroup$ I assume by $x \bmod y$ you mean the remainder when $x$ is divided by $y$? (do you take the remainder in $0 \leq r < y$?) And by "solve" are you just asking how to do arithmetic, or is there more you haven't written? If it's just arithmetic, you do it the way you normally do: one operation at a time, possibly with shortcuts if you see the possibility to use them. (e.g. computing a modular exponentiation rather than computing an exponentiation followed by a remainder, because you know both ways give the same value) $\endgroup$ – Hurkyl Apr 13 '13 at 9:51
  • $\begingroup$ i want to know,how do we solve this (3^5 Mod 7)^11 step by step ? and is it true that (3^5 Mod 7)^11 is equivalent to "(3^5)^11 (Mod 7)" which is "3^55 (Mod 7)" or "x^ab (Mod p)" $\endgroup$ – Varun Parikh Apr 13 '13 at 10:11
  • $\begingroup$ Go quickly to the FAQ section and read how to write properly mathematics in this site using LaTeX, otherwise your question runs the risk of not being read, leave alone addressed, by many people. $\endgroup$ – DonAntonio Apr 13 '13 at 10:38
  • $\begingroup$ Notice that there are no equations in your question. $\endgroup$ – Lubin Apr 13 '13 at 14:36

Your question is addressed by a repeated application of the following easily proved fact:

If $a\equiv a'\pmod n$ and $b\equiv b'\pmod n$, then $ab\equiv a'b'\pmod n\,$.

  • 1
    $\begingroup$ sorry, i am still confused! can you please elaborate on how does it solve my problem. Thank you. $\endgroup$ – Varun Parikh Apr 13 '13 at 14:49

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.