Files
python/TangDou/AcWing/NumberTheory/裴蜀定理.md
HuangHai 1f397eca87 'commit'
2025-08-30 18:35:01 +08:00

9 lines
667 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#### 裴蜀等式
裴蜀定理$ax+by=gcd(a,b)$
> 同样是看名字一脸懵的定理,还有这个字念"pei",不知打错了多少次“翡”)得名于法国数学家艾蒂安·裴蜀
说明了对任何整数$a、b$和它们的最大公约数$gcd(a,b)$,关于未知数 $x$ 和 $y$ 的线性二元一次不定方程(称为**裴蜀等式**):
一定存在整数$x,y$,使$ax+by=gcd(a,b)$成立。
它的一个重要推论是:$a,b$互质的充要条件是存在整数 $x,y$ 使$ax+by=1$ 。证明我就略去了,来讲一下扩展欧几里得算法怎么得到裴蜀等式的一个解(有多个解,求出一个解可以写出通解)。