分而治之的办法进行幂? [英] divide and conquer approach for exponentiation?

查看:123
本文介绍了分而治之的办法进行幂?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于功课,我应该实行分而治之的大整数幂的方法。我知道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.

这篇关于分而治之的办法进行幂?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆