知识卡片
大素数随机试探期望对数次
素数定理给π(n)≈n/ln n。
随机选接近n的整数,命中素数的概率约为1/ln n,几何分布下期望约试ln n次;若只试奇数,约可减半,但每次仍须做素性判定。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 第31章 数论算法 · 查看原书依据
The process of randomly selecting an integer n and determining whether it is prime is really just a Bernoulli trial (see Section C.4). By the prime number theorem, the probability of a success—that is, the probability that n is prime—is approximately 1/ln n. The geometric distribution says how many trials must occur to obtain a success, and by equation (C.36) on page 1197, the expected number of trials is
参考来源
- 位置:《算法导论(第4版)》第31章《数论算法》(OEBPS/chapter031.xhtml,文本字符[70000,75000))。
- 结论依据:原书第31.7–31.8节的公钥、RSA或素数定理推导,结合对应图式核对。
- 原始内容:The process of randomly selecting an integer n and determining whether it is prime is really just a Bernoulli trial (see Section C.4 ). By the prime number theorem, the probability of a success—that is, the probability that n is prime—is approximately 1/ln n . The geometric distribution says how many trials must occur to obtain a success, and by equation (C.36) on page 1197, the expected number of trials is