Proving $f(n)+c=O(g(n))$ with $\lim_{n \to +\infty}f(n)=+\infty$

  • Context: MHB 
  • Thread starter Thread starter evinda
  • Start date Start date
Click For Summary
SUMMARY

The discussion centers on proving that if \( f(n) = O(g(n)) \) and \( \lim_{n \to +\infty} f(n) = +\infty \), then \( f(n) + c = O(g(n)) \) for any constant \( c > 0 \). Participants clarify that while \( f(n) + c \) can be shown to be \( O(g(n)) \), it does not necessarily imply \( f(n) = \Theta(g(n)) \). The proof involves limits and inequalities, demonstrating that as \( n \) approaches infinity, \( f(n) + c \) remains bounded by a constant multiple of \( g(n) \).

PREREQUISITES
  • Understanding of Big O notation and its mathematical implications
  • Familiarity with limits in calculus, specifically \( \lim_{n \to +\infty} \)
  • Knowledge of asymptotic notation, including \( \Theta \) notation
  • Basic algebraic manipulation of inequalities and limits
NEXT STEPS
  • Study the properties of Big O and \( \Theta \) notation in algorithm analysis
  • Learn about the implications of limits in asymptotic analysis
  • Explore examples of functions that demonstrate the differences between \( O \) and \( \Theta \)
  • Investigate the role of constants in asymptotic notation and their impact on proofs
USEFUL FOR

Mathematicians, computer scientists, and students studying algorithm complexity, particularly those focusing on asymptotic analysis and performance evaluation of algorithms.

evinda
Gold Member
MHB
Messages
3,741
Reaction score
0
Hi! (Smile)

I want to show that $f(n)=O(g(n))$ and $\lim_{n \to +\infty} f(n)=+\infty$ implies that $f(n)+c=O(g(n))$.

$f(n)=O(g(n))$ means that $\exists c_1>0, n_1 \in \mathbb{N}_0$ such that $\forall n \geq n_1$: $f(n) \leq c_1g(n)$.

$\lim_{n \to +\infty} f(n)=+\infty$ means that $\forall M>0 \exists n_2 \in \mathbb{N}_0$ such that $\forall n \geq n_2$: $f(n)>M$.

We want to show that $\exists c_2>0, n_0 \in \mathbb{N}_0$ such that $\forall n \geq n_0$: $f(n)+c<c_2 g(n)$

That's what I have tried:$$M<f(n) \leq c_1 g(n) \Rightarrow M+c < f(n)+c \leq c_1g(n)+c \Rightarrow \frac{M+c}{g(n)} < \frac{f(n)+c}{g(n)} \leq \frac{ c_1g(n)+c}{g(n)} \Rightarrow \lim_{n \to +\infty} \frac{M+c}{g(n)}< \lim_{n \to +\infty} \frac{f(n)+c}{g(n)} \leq \lim_{n \to +\infty} \frac{ c_1g(n)+c}{g(n)} \overset{\star}{\Rightarrow} 0<\lim_{n \to +\infty} \frac{f(n)+c}{g(n)} \leq c_1 \\ \Rightarrow \lim_{n \to +\infty} \frac{f(n)+c}{g(n)}=a \in (0,c_1] \Rightarrow f(n)+c=\Theta(g(n)) \Rightarrow f(n)+c=O(g(n)) $$$$ \star: f(n) \leq c_1 g(n) \wedge \lim_{n \to +\infty} f(n)=+\infty \Rightarrow \lim_{n \to +\infty} c_1 g(n)=+\infty \Rightarrow \lim_{n \to +\infty}g(n)=+\infty $$
 
Physics news on Phys.org
I think you proved too much. Take $c=0$. The fact that $f(n)=O(g(n))$ and $\lim_{n \to +\infty} f(n)=+\infty$ does not imply that $f(n)=\Theta(g(n))$.
 
Evgeny.Makarov said:
I think you proved too much. Take $c=0$. The fact that $f(n)=O(g(n))$ and $\lim_{n \to +\infty} f(n)=+\infty$ does not imply that $f(n)=\Theta(g(n))$.

I see (Nod) But it holds for all $c>0$.. Or am I wrong? (Thinking)
 
evinda said:
I see (Nod) But it holds for all $c>0$.
What do you see and what holds for all $c>0$?
 
For $c=0$ we don't have to show anything since $f(n)=O(g(n))$ and $\lim_{n \to +\infty} f(n)=+\infty$ trivially implies that $f(n)+c=O(g(n))$.

For $c>0$ that what I wrote holds, or not? (Thinking)
 
evinda said:
For $c=0$ we don't have to show anything since $f(n)=O(g(n))$ and $\lim_{n \to +\infty} f(n)=+\infty$ trivially implies that $f(n)+c=O(g(n))$.
Slowly exhales. Let's try this again.

Evgeny.Makarov said:
The fact that $f(n)=O(g(n))$ and $\lim_{n \to +\infty} f(n)=+\infty$ does not imply that $f(n)=\Theta(g(n))$.
I said this because you deduced $f(n)+c=O(g(n))$ from $f(n)+c=\Theta(g(n))$.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 27 ·
Replies
27
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K