Discard the Nine-way method, number theory and remainder Study Notes

Source: Internet
Author: User

In number theory, there is such a method that can easily determine whether the result obtained after the two numbers are multiplied is correct, and this method is to discard the nine method. In the final analysis, abandoning the Nine-way method also uses some basic features of the same remainder.

So what is "discard nine methods? Let's start by multiplying two numbers. For example, is the result 28997*29459 = 11441912613 correct? Because the Nine-way method has been used a lot

Only. First, let's talk about the concept of coincidences.

What is cool?


In this sense, if both A and B are integers, M is a fixed positive integer. Then when M | (a-B), that is, when m can divide (a-B), we say a, B, for m with the remainder as a ≡ B (mod m), in fact, it can be simply understood that a mod m = B mod m, MOD indicates taking the remainder. Soon we can conclude that B has a (mod m) and AK has BK (mod m ).


We can launch it soon.


A between B (mod m), B between C (mod m) then there is a between C (mod m) that is the same as the remainder of the nature of the transfer.


Below is a simple proof of the transfer nature.


The proof is as follows: because a between B (mod m), a-B = MT (1) is defined, and T is an integer. Because B has c (mod m), according to the definition there is B-c = MS (2), s is an integer. Obtained from (1) + (2): a-c = m (S + T) = Mk, K is an integer. Therefore, a challenge C (mod m ). .

The following describes the important attributes of the delimiter.

If a branch B (mod m), c Branch D (mod m), then a + c = B + d (mod m) a-C branch B-d (mod m) and AC branch BD (mod m ).


A + C = B + d (mod m), a-c uniform
B-d (mod m) proof method is similar to above. The following describes how to use the AC transport BD (mod m) method.


Because a between B (mod m), AC between BC (mod m ). Because C has D (mod m), BC has BD (mod m ). All ac-BC = Mt, BC-BD = Mk, T, and K are integers. The formula ac-BD = M (t + k) = ML and L is an integer. So the AC has BD (mod m.

So we know from a branch B (mod m), and AC branch BD (mod m) that when a = C, B = D, there is a ^ 2 = B ^ 2 (mod m), which can be easily proved by mathematical induction:

A ^ n then B ^ N (mod m), n is a non-negative integer.

In addition, when n = 0, 1 then 1 (mod m) is obviously true. Because 10 then 1 (mod
9), we can know that 10 ^ n then 1 (mod 9), n is a non-negative integer, which means that 10 ^ n-1 can be divisible by 9 and can be directly proved in mathematical language. You don't have to worry about it.

Now let's take a look at the topic and discard the nine methods.

Any N and K decimal integers A and B can represent the product of the power of the right and the corresponding base.

That is, a = Σ ai10 ^ I, I = 0, 1, 2, 3, 4, 5... NB = Σ bi10 ^ I, I = 0, 1, 2, 3, 4, 5 .... K is set to C = AB = Σ ci10 ^ I, I = ,... q.

The above properties are as follows:

Because 10 ^ n Limit 1 (mod 9) {= 10 ^ N (mod 9 )},

So there are ai10 ^ I (mod 9) = AI (mod 9) * 1 (mod 9) = AI (mod 9) So:

A queue (An + an-1 +... A1 + a0) (mod
9 ). Similarly, both B and C can be written in this form.

Because c = AB, there are:

C = AB notation (An + an-1 +... A1 + a0) * (BN + bn-1 +... b1 + B0) (mod
9)

California (CN + cn-1 +... C1 + C0) (mod
9)

So (CN + cn-1 +... C1 + C0) hour (An +
An-1 + ...... A1 + a0) * (BN + bn-1 +... b1 + B0) (mod
9 ).

Haha: in this way, 28997*29459 = 11441912613 can be used to check the result.

Because 2 + 8 + 9 + 9 + 7 = 35, 2 + 9 + 4 + 5 + 9 = 29,1 + 1 + 4 + 4 + 1 + 9 + 1 + 2 + 6 + 1 + 3
= 33

In this case, you only need to judge whether 35*29 then 33 (mod 9) is correct or not, and you can quickly check whether the results are correct.

Based on the second form, you only need to judge 35*29 mod 9 = 33 mod 9.

Because 35*29 mod 9 = (35 mod 9) * (29 mod 9) mod 9 = 8*2 mod 9 = 7 = 33mod 9 = 6. So the result is an error.

However, the above judgment method is only a necessary and inadequate condition for the result calculation.

For example, the above calculation result should actually be 28997*29459 = 11441912623. If it is calculated as: 28997*29459 = 11441912533, the above method may not work. The result is incorrect.


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.