I would like to know if anyone could teach me how to solve this type of Mathematical functions: Finding the Big Oh for the following two.
Thanks for any suggestions.

f(n) = 2 + 4 + 8 + . . . + 2^n


f(n) = n!

Recommended Answers

All 2 Replies

There are many 'big Oh's for these functions. In particular, in each case, f(n) is in O(f(n)).

The first one is obviously a geometric series, google is your friend if you haven't had that level of math yet.

Don't mess with the second one. n! is O(n!), and it is also O(n^n) (but not Big-Theta of n^n).

-Fredric

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.