Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 39

Questions about asymptotic notations such as Big-O, Omega, etc.

11 votes
Accepted

Big-O and not little-o implies theta?

Let's start with the simple case $g = 1$, and $f$ having positive values only (that's all we care about with functions that represent complexity). $f \in O(1)$ means that $f$ is bounded: there exist …
Gilles 'SO- stop being evil''s user avatar
7 votes
Accepted

Can I simplify log(n+1) before showing that it is in O(log n)?

Simplifying the left-hand side is a good strategy. You aren't going to find a simpler expression that's equal to $\log(n+1)$, though. However, since you're only interested in proving that $\log(n+1)$ …
Gilles 'SO- stop being evil''s user avatar
2 votes
Accepted

Papadimitrou and standard landau notation

The two definitions are not equivalent. However, the case where they aren't equivalent is one that we aren't interested in for algorithm analysis. The standard definition implies the Papadimitriou de …
Gilles 'SO- stop being evil''s user avatar
11 votes

Justification for neglecting constant factors in Big O

First, as other answers have already explained, $O(3n) = O(n)$, or to put it in words, a function is $O(3n)$ if and only if it is $O(n)$. $f = O(3n)$ means that there exists a point $N$ and a factor $ …
Gilles 'SO- stop being evil''s user avatar
5 votes

Infinite chain of big $O's$

Yes, it's possible to have an infinite chain. I'm sure you're already familiar with some examples: $$ O(x) \subseteq O(x^2) \subseteq \ldots \subseteq O(x^{42}) \subseteq \ldots $$ You have an infin …
Gilles 'SO- stop being evil''s user avatar
8 votes

Why is $3^n = 2^{O(n)}$ true?

$3^n$ grows faster than any exponential function with a base of $2$. True. This implies that $3^n = O(2^n)$ cannot be true. But what you have here is $2^{O(n)}$. Recall that $O(f(n))$ is really …
Gilles 'SO- stop being evil''s user avatar
8 votes

Error in the use of asymptotic notation

You've omitted a few steps. It looks like you're attempting to prove by induction that $T(n) = O(n)$, and your proof goes: Suppose $T(k) = O(k)$ for $k<n$. This means $T(k) \le c \, k$ for some $c …
Gilles 'SO- stop being evil''s user avatar
47 votes

How does one know which notation of time complexity analysis to use?

Big O: upper bound “Big O” ($O$) is by far the most common one. When you analyse the complexity of an algorithm, most of the time, what matters is to have some upper bound on how fast the run time¹ g …
Gilles 'SO- stop being evil''s user avatar