Efficient algorithm: $(y+1)^n$

55 Views Asked by At

Given $y,n\in\mathbb{N}$ and knowing the value $y^n$, is there an efficient way to calculate $(y+1)^n$? Anything faster than the binomial theorem is welcome.

1

There are 1 best solutions below

1
On BEST ANSWER

I believe, that the knowledge of $y^n$ cannot speed up $O(\log n)$ algorithm of exponentiation by squaring. Binomial theorem will give you $O(n)$ at best.