连分数
连分数 | |
---|---|
术语名称 | 连分数 |
英语名称 | continued fraction |
有限连分数 | |
---|---|
术语名称 | 有限连分数 |
英语名称 | finite continued fraction |
别名 | terminated continued fraction |
无限连分数 | |
---|---|
术语名称 | 无限连分数 |
英语名称 | infinite continued fraction |
简单连分数 | |
---|---|
术语名称 | 简单连分数 |
英语名称 | simple continued fraction |
别名 | regular continued fraction |
普通连分数 | |
---|---|
术语名称 | 普通连分数 |
英语名称 | generalized continued fraction |
别名 | 一般连分数 |
部分商 | |
---|---|
术语名称 | 部分商 |
英语名称 | partial quotient |
别名 | coefficient, term |
连分数(continued fraction)是指对一个数不断重复,将其拆成(通常是)整数和小数部分,如果有小数部分则表示为另一个数的倒数。即形如:
[math]\displaystyle{ a_0 + \cfrac1{ a_1 + \cfrac1{ a_2 + \cfrac1{ \ddots + \cfrac1{a_n} }}} }[/math]
的形式。
若其中都是整数,称为简单(simple)连分数。 若其中都是有理数,称为普通(general)连分数。
如果本来是一个普通的分数,看成带余除法,得到的就是每次的部分商和分数形式的余数,并且把最后的除数和余数作为下一轮的被除数和除数,因此可以看作与 Euclid 算法类似的过程。此外无理数也可以表示成连分数形式。
定义
对实数列 [math]\displaystyle{ a_0, a_1, \cdots, a_n }[/math] ,其中 [math]\displaystyle{ a_j\gt 0, j\geq1 }[/math] ,将形如
[math]\displaystyle{ a_0 + \cfrac1{ a_1 + \cfrac1{ a_2 + \cfrac1{ \ddots + \cfrac1{a_n} }}} }[/math]
的表示式称为连分数(continued fraction),并记作 [math]\displaystyle{ [a_0; a_1, a_2, \cdots, a_n] }[/math] 或 [math]\displaystyle{ [a_0, a_1, a_2, \cdots, a_n] }[/math] 。将 [math]\displaystyle{ a_0, a_1, \cdots, a_n }[/math] 称为这个连分数的部分商(partial quotients/coefficients/terms),其中 [math]\displaystyle{ a_k }[/math] 称为第 [math]\displaystyle{ k }[/math] 个部分商([math]\displaystyle{ k }[/math]th partial quotient/coefficient/term)。
如果连分数的所有部分商都是整数,即 [math]\displaystyle{ a_0 }[/math] 是任意整数, [math]\displaystyle{ a_j, j\geq1 }[/math] 是正整数,则称这一连分数为简单连分数(simple continued fraction)。如果连分数的所有部分商都是有理数,或者说形如 [math]\displaystyle{ a_0 + \cfrac{b_1}{ a_1 + \cfrac{b_2}{ a_2 + \cfrac{b_3}{ \ddots + \cfrac{b_n}{a_n} }}} }[/math] 的,则称这一连分数为普通连分数(general continued fraction), [math]\displaystyle{ a_i }[/math] 和[math]\displaystyle{ b_i }[/math] 称为其部分分母和部分分子。如果允许部分商取任意复数或带有自变量的函数等,称为广义连分数(generalized continued fraction)。
如果实数列是有限的,即形如 [math]\displaystyle{ [a_0, a_1, \cdots, a_n] }[/math] 的连分数,被称为有限连分数(finite continued fraction/terminated continued fraction)。否则,若实数列是无限的,即形如 [math]\displaystyle{ [a_0, a_1, \cdots] }[/math] 的连分数,被称为 无限连分数(infinite continued fraction)。
性质
根据定义式,有:
- [math]\displaystyle{ [a_0, a_1, \cdots, a_k] = a_0 + \frac1{[a_1, \cdots, a_n]} }[/math]
- [math]\displaystyle{ [a_0, a_1, \cdots, a_k \cdots, a_n] = [a_0, a_1, \cdots, a_{k-1}, [a_k \cdots, a_n]] = \left[a_0, a_1, \cdots, a_{k-1}, a_k + \frac1{[a_{k+1}, \cdots, a_n]}\right] }[/math] ;
实数总是能被表示为简单连分数的形式,其中,表示形式为有限简单连分数当且仅当这个数是一个有理数,无限简单连分数当且仅当这个数是一个无理数。
有理数总是有等价表示 [math]\displaystyle{ [a_0, a_1, \cdots, a_{k-1}, a_k] = [a_0, a_1, \cdots, a_{k-1}, a_k-1, 1], k=0 \lor a_k \gt 1 }[/math] 。有理数总是有这样两个等价的表示形式,且对其中任意一种形式的表示均唯一。无限连分数也有唯一的表示形式,由于其没有最后一项,没有类似有限情况下的等价形式。
对于正数,有 [math]\displaystyle{ [a_0, a_1, \cdots]\gt 1 }[/math] 当且仅当 [math]\displaystyle{ a_0 \gt 0 }[/math] ,此时其倒数为 [math]\displaystyle{ [0, a_0, a_1, \cdots] }[/math] ;反过来,有 [math]\displaystyle{ 0\lt [a_0, a_1, \cdots]\lt 1 }[/math] 当且仅当 [math]\displaystyle{ a_0 = 0 }[/math] ,此时其倒数为 [math]\displaystyle{ [a_1, \cdots] }[/math] 。
如果考虑相反数,则有 [math]\displaystyle{ [a_0, a_1, a_2, a_3, \dots] }[/math] 的相反数通常是 [math]\displaystyle{ [-a_0-1, 1, a_1-1, a_2, a_3, \dots] }[/math] 。但考虑到系数必须是整数的问题,若其中 [math]\displaystyle{ a_1-1=0 }[/math] 则可以把这两个连续的倒数合并得到 [math]\displaystyle{ [-a_0-1, a_2+1, a_3, \dots] }[/math] ,特别地,如果没有 [math]\displaystyle{ a_2 }[/math] ,只有前一部分的 [math]\displaystyle{ [a_0, 1]=a_0 + 1 }[/math] ,则可以直接得到 [math]\displaystyle{ [-a_0-1] }[/math]。
连分数 | ||
---|---|---|
基本定义 | 连分数(简单、普通、广义;有限、无限) | 连分数算法 |
部分结构 | 渐近分数 | 完全商 |
分类 | 有限连分数 | 循环连分数、无限不循环连分数 |
最佳有理逼近 | ||
用连分数逼近 | 渐近分数 | 半渐近分数 |
用中间分数逼近 | Farey 数列 | Stern–Brocot 树 |