知识卡片

普通读书笔记卡 · 3700.a

中国剩余定理用基元素重建

理解等级:中级

设mᵢ=n/nᵢ,取cᵢ=mᵢ·(mᵢ⁻¹ mod nᵢ)。cᵢ在模nᵢ下为1、在其他模数下为0,因此给定余数aᵢ时,x=Σaᵢcᵢ mod n就是同时满足各同余式的唯一解。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

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

      , k. Equation (31.31) is well defined: since mi and ni are relatively prime (by Theorem 31.6), Corollary 31.26 guarantees that mod ni exists. Here is how to compute a as a function of the ai and ci: We now

    参考来源

    - 位置:《算法导论(第4版)》第31章《数论算法》(OEBPS/chapter031.xhtml,文本字符[45000,50000))。 - 结论依据:原文对中国剩余定理、模幂性质或重复平方法给出定理与算法;公式图已核对。 - 原始内容:We begin by defining m i = n / n i for i = 1, 2, …, k . Thus, m i is the product of all of the n j ’s other than n i : m i = n 1 n 2 ⋯ n i −1 n i +1 ⋯ n k . We next define for i = 1, 2, …, k . Equation (31.31) is well defined: since m i and n i are relatively prime (by Theorem 31.6), Corollary 31.26 guarantees that mod n i exists. Here is how to compute a as a function of the a i and c i : We now