知识卡片
最大公约数是最小正整数组合
对不同时为零的整数a、b,所有ax+by(x、y为整数)中的最小正值恰为gcd(a,b)。这给出贝祖等式gcd(a,b)=ax+by,并把“公共因子”连接到可构造的线性组合。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 第31章 数论算法 · 查看原书依据
Theorem 31.2 If a and b are any integers, not both zero, then gcd(a, b) is the smallest positive element of the set {ax + by : x, y ∈ ℤ} of linear combinations of a and b. Proof Let s be the smallest positive such linear combination of a and b, and let s = ax + by for some x, y ∈ ℤ. Let q = ⌊a/s⌋. Equation (3.11) on page 64 then implies a mod s = a – qs = a – q(ax + by
参考来源
- 位置:《算法导论(第4版)》第31章《数论算法》(OEBPS/chapter031.xhtml,文本字符[5000,10000))。
- 结论依据:原文定义整除、素数、余数、同余类和最大公约数,或给出相应定理;公式图已核对。
- 原始内容:Theorem 31.2 If a and b are any integers, not both zero, then gcd( a , b ) is the smallest positive element of the set { ax + by : x , y ∈ ℤ } of linear combinations of a and b . Proof Let s be the smallest positive such linear combination of a and b , and let s = ax + by for some x , y ∈ ℤ . Let q = ⌊ a / s ⌋ . Equation (3.11) on page 64 then implies a mod s = a – qs = a – q ( ax + by