The effect of multiplicative inverse element

Source: Internet
Author: User

First of all, I think that. The most important function of multiplicative inverse is to divide the division into multiplication and then modulo when dividing by a number and then modulo. Because the division, for example, with 16/5 should be 3.2, but the computer will be counted as 3 ... Error is not, with double, not to mention, the number of large there must be errors, so, with the inverse of the yuan ....


If x is present for the number a,c, so that a * X = 1 (mod C), then the x is the multiplicative inverse of a to C. The function of the inverse element. Let's take a look at the following example:
12/4 MoD 7 =? Well, apparently, the result is 3.
We are now on the pair (4,7), we can know X = 2 is 4 to 7 multiplication inverse is 2*4=1 (mod 7)
Then we have (12/4) * (4 * 2) = (?) * (1) (mod 7)
Division is transformed perfectly to multiply
Theory:
f/a mod C =?
If present a*x = 1 (mod C)
So the 2 sides multiply at the same time, get F * X =? (mod C)
Conditions of Incorporation
(1) modulo equation A * X = 1 (mod C) existence solution
(2) A | F (f% A = = 0)
To come down Baidu Encyclopedia:
If Ax=1 MoD F is called a the multiplication inverse of modulo f is x. Can also be expressed as ax≡1 (mod f).
When a and f mutual element, a on the modulo f multiplication inverse has the unique solution. If there is no reciprocity, then there is no solution. If f is prime, then any number from 1 to F-1 is the same as the F-element, i.e. between 1 and f-1 there is a multiplicative inverse of modulo f.
For example, for the multiplication inverse of 5 on modulo 14:
14=5*2+4
5=4+1
Note 5 and 14, the existence of 5 on the multiplication of 14 inverse element.
1=5-4=5-(14-5*2) =5*3-14
Therefore, the multiplication inverse of 5 on modulo 14 is 3.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.