Quadratic Residue determination method - Gauss lemma (lower)

EDITORIAL: Recommended materials for "information security foundations of mathematics" to enrich the book knowledge, but many details are described in enough place

Hope that through their own interpretation, to help you save some time to understand the meaning of these things.

Part we saw, can be judged by the residual negative Aa minimum absolute number is not a quadratic residue

Doing so, however Criterion Bi Oula more tired, so the value of this theorem there?

Today's topic Expand

We continue to investigate the array Aa = {1a, 2a, ...... (p-1) a / 2}, we first introduce a function of T

Let p is an odd prime number, T (a, p) = sum ([Aa / p])

Look at a few examples

T(2,7)=[2*1/7]+[2*2/7]+[2*3/7]=0

T(4,7)=[4*1/7]+[4*2/7]+[4*3/7]=2

T(5,7)=[5*1/7]+[5*2/7]+[5*3/7]=3

The first time I saw it in a book of this function confused for a long time, thinking back again a few weeks later, they would understand the real meaning of the function of T, say it is very simple, is to protect the parity modulo.

How a protection laws? Look at an example:

If you want to use to determine the parity of 9 7 die, you'll find 9 becomes 2, an even number, so 9 is an even number? ? funny!

Correct operation, the introduction of a protection bit [9/7], 9 = 9% 7 + [9/7] mod 2, very intuitive way, odd prime modulus, over a period of change to a parity, we add the number of cycles can protect the parity.

T function is to protect the parity array Aa, we T (5,7) as an example:

5 + 10 + 15 = 5 + 3 + 1 + T (5,7) mod 2 = 5 + 3 + 1 + 3 = 12mod2 is even!

You might ask do not toss Well, yes, but at least it gives the molding method we use to determine parity.

 Let's look at how to use it to Gauss overcome problems!

We examine sum (Aa) parity, we note 1 to (p-1) / 2 for the sum S ((p-1) / 2):

Direct Summation: sum (Aa) = a * S ((p-1) / 2) mod 2 ·························· ???? (0)

Modulo method: sum (Aa) = sum (Aa% p) + T (a, p) mod 2 ························· ( 1)

sum (Aa% p) = sum (Aa minimum absolute residual) + the number of negative * p ··················· (2)

sum (Aa minimum absolute residual) = sum (| Aa minimum absolute residual |) ················· (3)

sum (| Aa minimum absolute residual |) = S ((p-1) / 2) ····························· ········ (4)

It is not like a recursive program, after all programming for many years, became head stack haha

Back up, get

sum (Aa) = S ((p-1) / 2) + the number of negative * p + T (a, p) mod 2

p is odd does not affect the number of negative parity, parity and the number of negative and Legendre symbol consistent (see above a)

即 sum(Aa)=S((p-1)/2)+Legendre(a,p)+T(a,p) mod 2

0 into the formula, thereby obtaining a * S ((p-1) / 2) = S ((p-1) / 2) + Legendre (a, p) + T (a, p) mod 2

Transposition to give (a-1) * S ((p-1) / 2) = Legendre (a, p) + T (a, p) mod 2 ··············· ·· (INF)

This formula is the core, we are labeled as INF

If a is odd, a-1 is even, Legendre (a, p), and T (a, p) parity consistent

If a is 2, unfortunately T (2, p) is the dead 0 ([2 / p] + [4 / p] + ....... + [(p-1) / p] = 0)

Legendre(a,p)=S((p-1)/2) mod 2

 

Finally, a few words with emotion:

I am very sad, because in the laboratory read, read computer running out of power, so mistaken Ctrl + s will be able to save, and then back to the dorm to get off the computer charger, turn on the computer found got nothing, to remind everyone.

And put on a small wish, hope to meet some friends love to explore the knowledge of the details in the blog garden, digging the problem in the end! I love many of my classmates always made their own wheels dissatisfied, that I learn something silly

While I do write code full of loopholes, but a bit not in control of their own to fill in, you can not feel at ease, after all, it is to seek knowledge from. Take this screen name, but also a state of mind, although he

Weak, but without prejudice to the tireless forward and explore, talk about their understanding of knowledge, even if every day were lower efficiency, even if they despise what I do.

 

Guess you like

Origin www.cnblogs.com/qishihaohaoshuo/p/11927056.html