0

I was wondering what methods exist for computing the inverse of Y mod X? Of these, which is the most efficient (time-wise)?

I am aware of the Extended Euclidean Algorithm already, just curious what else is out there.

Additionally, do we have a discrete derivative for the inverse of Y mod X?

Thanks!

  • 2
    Please ask only one question per post. See the linked posts (and their links) for most all of the common methods for computing modular inverses and fractions. Generally the extended Euclidean algorithm is quickest, but other methods may be quicker in special cases. For the final question you should post a new question with much further detail, e.g. the definition of discrete derivative, and further context. – Bill Dubuque Jun 14 '21 at 00:18
  • None of the linked questions are directly concerned with the same thing I’m asking (though similar answers therein maybe applicable) – Ryan Pierce Williams Jun 14 '21 at 00:21
  • 2
    They answer your first question "what methods exist ..." and likely allow you to infer an answer to your second question about efficiency. Please review them, then post any further questions you may have - one per post. It is expected that you search for answers before posting questions, in order to help prevent the site from being overwhelmed by rampant duplication. – Bill Dubuque Jun 14 '21 at 00:23
  • Since there’s no other question requesting this same information- it’s not a duplicate. Answers spread throughout the other questions maybe applicable, but that doesn’t make them conveniently searchable - not concerned with directly answering questions of relative efficiency – Ryan Pierce Williams Jun 14 '21 at 00:30
  • Re: the final question, we can in fact use derivatives to compute modular inverses, via Newton's method (Hensel lifiting), e.g. see here and here – Bill Dubuque Jun 14 '21 at 00:34

0 Answers0