<< What is math >> the remainder of the thing

Source: Internet
Author: User

<< What is math >> notes remainder those things



Today, stepping on the pit, feeling that all kinds of problems recursion down there is no end of the look ╮ (╯_╰) ╭


Or to return to the essence of mathematics ...

Just say math, you will be Gossing to cry ...


A general concept.

The concept of "congruence" and the notation (Gaussian creation) make this inference simple and clear as long as the problem of removing integers with a fixed integer d is encountered.

(great people are simplifying complex problems.)





Aha, look at the picture, the concept of "congruence" is very intuitive. When we see any integer being removed by 5, the remainder is 0,1,2,3,4, which is one of the five numbers. If two integers a and B are 5 apart with the same remainder , we call them modulo 5 congruence


The same as the remainder of the expression method, which is the congruence


The proposition equivalence:

1. A and B are modulo 5 congruence.

2. There is an integer n, a = b + nd;

3. D divisible by A-b


At first I was very suspicious (my IQ is low to despise.) ), for a = B + nd will be set up, if a, b with the words.

Okay, let's prove it.

For the proposition "If A, B is congruence, then the proof of a = C + nd":

Assuming A, b congruence, it can be assumed that their common remainder for modulo D is R.

Then there is a = R + x*d;

B = R + y*d;

Two equations do subtraction. A-B = (x-y) * D; Variant A = B + (x-y) *d. See, if you use N to represent X-y, you can get the proof of the proposition!


This same remainder representation of Gauss is convenient because it represents the same redundancy that satisfies many fundamental operator rules, plus, minus, multiply

The addition and subtraction here is for two pairs of the same remainder (that is, the same residual), rather than a pair of the same remainder (not a genius to slowly think about it, will have a deeper understanding)


Prove it:



Known, a = = A ' (mod d), b = = B ' (mod d)

A = R + d*x;

A ' = R + d*y;

b = p + d*m;

B ' = p + d*n;


Because:

A + b = (r + P) + d* (x + M)

A ' + b ' = (r + P) + d* (y + N)

Then we can know, a+b and a ' +b ' with the remainder!

Similarly can prove 5) and 6)









The proof of the famous GCD algorithm:

Here's what I've written about GCD's implementation.

http://blog.csdn.net/cinmyheart/article/details/39370553



The proof process is simply beautiful, there are wood! Super Handsome ~

I finally understand today ... Why did GCD write like that?


A very important rule: when a or b is a multiple of a prime number D, then their product is a multiple of d. Here the emphasis is actually on the emphasis that D must be prime.


When D is not a prime number, the above constraint is not necessarily true.



Fermat theorem:



Note that!p is a prime number and is still not divisible by a prime number.

2^2 = 1 (mod 3)

2^4 = 1 (mod 5)

This should be more of a feeling.


Proof of Fermat theorem:


Proof of the process for the "M1 m2 m3 ... mp-1 if the order is reordered, the corresponding remainder must be in the number 1 2 3 4 ... p-1" I don't understand here, if anyone knows why, I hope we can talk together.



Other remainder related in the back should also be update~











<< What is math >> the remainder of the thing

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.