知识卡片

普通读书笔记卡 · 3695.a.6.c.2.a

误判率不等于后验素数概率

理解等级:高级

给定合数时米勒拉宾误报素数的概率上界是2^{−s};

但随机候选通过测试后为素数的概率还依赖候选本来为素数的比例。

需用贝叶斯公式结合素数密度计算后验,不能把前一个误判率直接当后验错误率。

补充教学演示:假设候选中素数先验只有1%,检验不会拒绝素数,但合数以1/1024的概率通过。则通过者为合数的后验上界为(0.99/1024)÷(0.01+0.99/1024)≈8.8%,而不是1/1024≈0.098%。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 第31章 数论算法 · 查看原书依据

      But what is Pr{A | B}, the probability that n is prime, given that MILLER-RABIN has returned PRIME? By the alternate form of Bayes’s theorem (equation (C.20) on page 1189) and approximating , we have This probability does not exceed 1/2 until s exceeds 1g(ln n – 1). Intuitively, that many initial trials are needed just for the confidence derived from failing to find a witness to the

    参考来源

    - 位置:《算法导论(第4版)》第31章《数论算法》(OEBPS/chapter031.xhtml,文本字符[90000,95000))。 - 结论依据:第31章给出“在n为合数的条件下”每s轮都漏检的概率上界2^{−s};这与“已通过时n为合数”的后验条件相反。数值算例是依据贝叶斯公式补充的教学演示,只用于说明先验的影响。 - 原始内容:But what is Pr{ A | B }, the probability that n is prime, given that M ILLER -R ABIN has returned P RIME ? By the alternate form of Bayes’s theorem (equation (C.20) on page 1189) and approximating , we have This probability does not exceed 1/2 until s exceeds 1g(ln n – 1). Intuitively, that many initial trials are needed just for the confidence derived from failing to find a witness to the