Skip to content

Commit

Permalink
fix(binius): fix typos of the squaring equation
Browse files Browse the repository at this point in the history
  • Loading branch information
gy001 committed Sep 29, 2024
1 parent 3f027ff commit ae04d30
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions fri-binius/binius-01.md
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,12 @@ $$
The inversion operation of $d_5$ can be recursively calculated layer by layer along the Extension Tower. The main computational cost in the recursive process is three multiplication operations. There's also the squaring operation of $d_3$, which can also be calculated recursively:

$$
a_1^2 = (e_0 + e_1\cdot\alpha_{i-1})^2 = e_0^2 + e_0\cdot e_1\cdot\alpha_{i-1} + e_1^2\cdot\alpha_{i-1}^2
= (e_0^2 + e_1^2) + (e_1^2\alpha_{i-2})\cdot\alpha_{i-1}
\begin{split}
a_1^2 &= (e_0 + e_1\cdot\alpha_{i-1})^2 \\
& = e_0^2 + e_1^2\cdot\alpha_{i-1}^2 \\
& = e_0^2 + e_1^2\cdot(\alpha_{i-2}\alpha_{i-1} + 1) \\
& = (e_0^2 + e_1^2) + (e_1^2\alpha_{i-2})\cdot\alpha_{i-1} \\
\end{split}
$$

For detailed recursive efficiency analysis, please refer to [FP97]. Overall, the computational complexity is comparable to the Karatsuba algorithm, thus greatly reducing the algorithmic complexity of inversion.
Expand Down
8 changes: 6 additions & 2 deletions fri-binius/binius-01.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,12 @@ $$
其中 $d_5$ 的求逆运算可以沿着 Extension Tower 逐层递归,递归过程中的主要运算开销为三次乘法运算。还有 $d_3$ 的平方运算,它也可以递归地计算:

$$
a_1^2 = (e_0 + e_1\cdot\alpha_{i-1})^2 = e_0^2 + e_0\cdot e_1\cdot\alpha_{i-1} + e_1^2\cdot\alpha_{i-1}^2
= (e_0^2 + e_1^2) + (e_1^2\alpha_{i-2})\cdot\alpha_{i-1}
\begin{split}
a_1^2 &= (e_0 + e_1\cdot\alpha_{i-1})^2 \\
& = e_0^2 + e_1^2\cdot\alpha_{i-1}^2 \\
& = e_0^2 + e_1^2\cdot(\alpha_{i-2}\alpha_{i-1} + 1) \\
& = (e_0^2 + e_1^2) + (e_1^2\alpha_{i-2})\cdot\alpha_{i-1} \\
\end{split}
$$

详细的递归效率分析可以参考 [FP97]。总体上,这个计算复杂度和 Karatsuba 算法复杂度相当,从而很大程度上降低了求逆的算法复杂度。
Expand Down

0 comments on commit ae04d30

Please sign in to comment.