首页 > 编程语言 >Miller-Rabin 素性测试算法

Miller-Rabin 素性测试算法

时间:2022-11-30 16:34:46浏览次数:47  
标签:dots 素性 Miller 算法 测试 Rabin

Miller-Rabin 素性测试算法需要如下两个引理:

1. 费马小定理

设 \(p\) 是素数,\(a\) 为整数,且 \((a,p)=1\),则 \(a^{p-1}\equiv1\pmod{p}\)
证明:考虑 \(1,2,3,\dots,(p-1)\) 这 \(p-1\) 个数字,同时乘 \(a\) 得 \(a,2a,3a,\dots,(p-1)a\)。

\[\because \therefore \]

标签:dots,素性,Miller,算法,测试,Rabin
From: https://www.cnblogs.com/As-Snow/p/16938849.html

相关文章