Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it Polynomial time algorithm

Tags:

algorithm

np

If an algorithm's input size is 2^n and the algorithm runs in $O(n2^n)$ time. In this case, can we say that the algorithm runs in polynomial time with respect to input size?

like image 431
NARAYAN CHANGDER Avatar asked May 06 '26 14:05

NARAYAN CHANGDER


1 Answers

Yes, that would be an O(k log k)-time algorithm, where k = 2^n.

like image 180
David Eisenstat Avatar answered May 09 '26 10:05

David Eisenstat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!