简体   繁体   English

Dasgupta的算法(教科书)。 概率。 1.36平方根

[英]Algorithms (textbook) by Dasgupta. Prob. 1.36 Square Roots

To begin I want to say that this is NOT a homework problem. 首先,我想说的不是作业问题。 I know stackoverflow condemns people who ask for homework solutions. 我知道stackoverflow谴责了寻求作业解决方案的人。 I merely doing this problem out of interest. 我只是出于兴趣解决这个问题。

This is the question that I am working on: 这是我正在研究的问题:

Need help with part (b), not (a) 需要(b)部分而不是(a)帮助

I believe I understand (a); 我相信我了解(a); I had my own answer but I managed to compare my solution with a Chegg preview solution (it doesn't show part (b)). 我有自己的答案,但我设法将自己的解决方案与Chegg预览解决方案进行了比较(未显示(b)部分)。 So far from my understanding of part (b) is the following: 到目前为止,我对(b)部分的理解仍是:

when they say 当他们说

x is a square root of a modulo p if a = x^2(mod p)

they mean: x = sqrt(a mod p) IF a = x^2(mod p). 他们的意思是: x = sqrt(a mod p) IF a = x^2(mod p).

Now, where it says, 现在,它说,

if a has a square root modulo p, then a^((p+1)/4) is such a square root 如果a的平方根为p,则a^((p+1)/4)就是这样的平方根

confuses me a lot. 让我很困惑 I'm not really sure what this line means! 我不太确定这行是什么意思!

if a has a square root modulo p, then a^((p+1)/4) is such a square root

= =

If there exists K such that K^2 mod p = a , 如果存在K使得K^2 mod p = a

then 然后

a^((p+1)/4) mod p = K

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM