多元一次不定方程
多元一次不定方程是普遍的一次不定方程的形式,具有形式 [math]\displaystyle{ a_1 x_1 + a_2 x_2 + \dots + a_n x_n = a_0 }[/math] ,其中 [math]\displaystyle{ a_0, a_1, a_2, \dots, a_n }[/math] 是给定整数。
定义
形如 [math]\displaystyle{ a_1 x_1 + a_2 x_2 + \dots + a_n x_n = a_0 }[/math] ,其中 [math]\displaystyle{ a_0, a_1, a_2, \dots, a_n }[/math] 为整数的不定方程,称为一次不定方程。
解
未知数数量大于 2 的一次不定方程 [math]\displaystyle{ a_1 x_1 + a_2 x_2 + \dots + a_n x_n = a_0 }[/math] 可被处理为 [math]\displaystyle{ (n-1) }[/math] 个二元一次不定方程构成的不定方程组。
[math]\displaystyle{ \begin{cases} a_1 x_1 + a_2 x_2 = d_2 b_2 {\color{lightgray} = \operatorname{gcd}(a_1, a_2) b_2 } \\ d_2 b_2 + a_3 x_3 = d_3 b_3 {\color{lightgray} = \operatorname{gcd}(a_1, a_2, a_3) b_3 } \\ \dots \\ d_{n-2} b_{n-2} + a_{n-1} x_{n-1} = d_{n-1} b_{n-1} {\color{lightgray} = \operatorname{gcd}(a_1, a_2, \dots, a_{n-1}) b_n } \\ d_{n-1} b_{n-1} + a_n x_n = a_0 \end{cases} }[/math]
,其中 [math]\displaystyle{ d_s = \operatorname{gcd}(a_1, a_2, \dots, a_s) }[/math] 。因此可以通过二元一次不定方程的解的情况来解这个不定方程组。
有解条件
一次不定方程 [math]\displaystyle{ a_1 x_1 + a_2 x_2 + \dots + a_n x_n = a_0 }[/math] 有整数解,当且仅当 [math]\displaystyle{ \operatorname{gcd}(a_1, a_2, \dots, a_n) \mid a_0 }[/math] 。
解法
考虑这 [math]\displaystyle{ (n-1) }[/math] 个不定方程的整数通解。
前 [math]\displaystyle{ (n-2) }[/math] 个不定方程 [math]\displaystyle{ d_{s-1} b_{s-1} + a_s x_s = d_s b_s }[/math] ,其中 [math]\displaystyle{ s = 2, 3, \dots, n-1 }[/math] 。这些方程对变量 [math]\displaystyle{ b_{s-1}, x_s }[/math] ,由于 [math]\displaystyle{ d_s }[/math] 是 [math]\displaystyle{ \operatorname{gcd}(d_{s-1},a_s) }[/math] 可以约去得到 [math]\displaystyle{ d'_{s-1} b_{s-1} + a'_s x_s = b_s }[/math] ,其右侧是关于 [math]\displaystyle{ b_s }[/math] 的代数式,且左侧没出现,必然不可消去,其特解必然符合 [math]\displaystyle{ \begin{cases}b_{s-1,0} = u_s b_s \\ x_{s,0} = v_s b_s \end{cases} }[/math] 的形式,且回代后满足 [math]\displaystyle{ d'_{s-1} u_s {\color{lightgray} b_s} + a'_s v_s {\color{lightgray} b_s} = 1 {\color{lightgray} b_s} }[/math] 。同时方程的整数通解中还会引入一个自由变量 [math]\displaystyle{ t_s }[/math] 。因此其整数通解解会符合 [math]\displaystyle{ \begin{cases} b_{s-1} = u_s b_s + a_s t_s \\ x_s = v_s b_s - d_{s-1} t_s \end{cases} }[/math] 的形式。
可注意到最后的不定方程 [math]\displaystyle{ d_{n-1} b_{n-1} + a_n x_n = a_0 }[/math] 不含变量,有 [math]\displaystyle{ \begin{cases} b_{n-1} = u_n + a_n t_n \\ x_n = v_n - d_{n-1} t_n \end{cases} }[/math] 的形式。
最后,依次将 [math]\displaystyle{ b_s, s=2,3,\dots, n-1 }[/math] 的通解形式其代入不定方程 [math]\displaystyle{ d_{s-1} b_{s-1} + a_s x_s = d_s b_s }[/math] 的整数通解 [math]\displaystyle{ \begin{cases} b_{s-1} = u_s b_s + a_s t_s \\ x_s = v_s b_s - d_{s-1} t_s \end{cases} }[/math] 中,得到 [math]\displaystyle{ b_{s-1} }[/math] 和 [math]\displaystyle{ x_s }[/math] 的表达式。
因此, [math]\displaystyle{ x_s }[/math] 最终的表达式是含有 [math]\displaystyle{ t_s, t_{s+1}, \dots, t_n }[/math] 的线性多项式。
非负解、正解
当未知数数量大于 2 时,多元一次不定方程的非负解或正解情况,是一个未解决问题,称为弗罗贝尼乌斯问题(Frobenius problem)。
不定方程 | ||
---|---|---|
一次 | 一次不定方程 | 二元一次不定方程、多元一次不定方程 |
齐次 | 齐次不定方程 | 商高方程、Fermat 大定理 |
指数 | - | |
其他结论 | Lagrange 四平方和定理 | Fermat 二平方定理 |