divide and conquer approach for exponentiation?

andandandand picture andandandand · May 14, 2011 · Viewed 7.3k times · Source

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?.

Answer

Femaref picture Femaref · May 14, 2011

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