分而治之的办法进行幂?分而治之、办法

2023-09-11 06:01:27 作者:清风绕指柔

由于功课,我应该实行分而治之的大整数幂的方法。我知道Karatsuba的算法乘法,我能学以致用分而治之算法,得到的X ^ Y,无论是大的整数的结果?

As homework, I should implement a divide and conquer approach for exponentiation of big integers. I know Karatsuba's algorithm for multiplication, what divide and conquer algorithm could I apply to get the result of x^y, both being large integers?.

推荐答案

有几个算法的名义下的广场和繁殖。你可以得到一些启发他们。

There are a couple of algorithms grouped together under the name square and multiply. You could get some inspiration from them.