In a recent lecture, we were told that an algorithm has a time complexity of exp(O(n)), and that that was different to a time complexity of O(exp(n)). I am interested in the following:
- How do we read a time complexity of
exp(O(n))and what does it imply? - What is the difference between an
exp(O(n))andO(exp(n))time complexity?
I assume the first question will answer the second one as well, but an explicit answer would be very appreciated.
To clarify, the time complexities we were presented with were actually in Big-Theta, not Big-O, notation, but I assumed the same relevant properties would hold for both, and this would be a more useful way of phrasing the question (since I feel like people search for Big-O more than they do for Big-Theta).
For those who are curious, the algorithm in question is the brute-force method for finding a minimum cost path between nodes on a regular lattice. We were comparing it to a the much more efficient (Θ(n^2)) dynamic programming approach. The module I am taking is on computational biology, and the topic is global sequence matching for DNA and proteins.