The traditional Karatsuba algorithm for the multiplication of polynomials and multi-precision integers has a time complexity of and a space complexity of . Roche proposed an improved algorithm with the same time complexity but with a much reduced space complexity. In Roche’s paper details were provided for multiplication of polynomials, but not for multi-precision integers. Multi-precision integers differ from polynomials by the presence of carries, which poses difficulties in implementing Roche’s scheme in multi-precision integers. This paper provides a detailed solution to these difficulties. Finally, numerical comparisons between the schoolbook, traditional Karatsuba, and space-efficient Karatsuba algorithms are provided.

生成讲解博客的中文版本

生成AI智能校验的中文版本