知识卡片
欧拉函数计数可逆剩余类
欧拉函数φ(n)是0到n−1中与n互素的整数个数,也就是模n乘法群的大小。
若p遍历n的不同素因子,则φ(n)=n∏(1−1/p);当n为素数时φ(n)=n−1。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 第31章 数论算法 · 查看原书依据
The size of is denoted ϕ(n). This function, known as Euler’s phi function, satisfies the equation so that p runs over all the primes dividing n (including n itself, if n is prime). We won’t prove this formula here. Intuitively, begin with a list of the n remainders {0, 1,
参考来源
- 位置:《算法导论(第4版)》第31章《数论算法》(OEBPS/chapter031.xhtml,文本字符[30000,35000))。
- 结论依据:原文定义 φ(n)=|ℤₙ*|;公式图 Art_P1172 的式(31.21)为 φ(n)=n∏_{p为n的不同素因子}(1−1/p)。原书明确此处不证明乘积式;素数特例由 Art_P1174–P1175 给出。
- 原始内容:The size of is denoted ϕ ( n ). This function, known as Euler’s phi function , satisfies the equation so that p runs over all the primes dividing n (including n itself, if n is prime). We won’t prove this formula here. Intuitively, begin with a list of the n remainders {0, 1, …, n – 1} and then, for each prime p that divides n , cross