小编isa*_*dos的帖子

有人可以用简单的术语解释这个米勒-拉宾素性测试伪代码吗?

这里是...

\n\n
Input: n > 3, an odd integer to be tested for primality;\nInput: k, a parameter that determines the accuracy of the test\nOutput: composite if n is composite, otherwise probably prime\nWrite n \xe2\x88\x92 1 as (2^s)\xc2\xb7d with d odd by factoring powers of 2 from n \xe2\x88\x92 1\nWitnessLoop: repeat k times:\n   pick a random integer a in the range [2, n \xe2\x88\x92 2]\n   x \xe2\x86\x90 a^d mod n\n   if x = 1 or x = n \xe2\x88\x92 1 then …
Run Code Online (Sandbox Code Playgroud)

vb.net algorithm primes pseudocode primality-test

4
推荐指数
1
解决办法
5202
查看次数

标签 统计

algorithm ×1

primality-test ×1

primes ×1

pseudocode ×1

vb.net ×1