Time Complexity Algorithm Proof

Click For Summary
SUMMARY

This discussion focuses on proving that if f(n) and g(n) are non-negative functions such that f(n) = O(g(n)), then f(n) + g(n) = Ω(g(n)). The proof utilizes the formal definition of Big-Oh, establishing that there exist positive constants c and n0 satisfying 0 ≤ f(n) ≤ c(g(n)) for all n ≥ n0. The participants also explore the implications of this relationship, noting that it leads to the conclusion that f(n) + g(n) = O(g(n)), which is a more complex result requiring the initial condition f(n) = O(g(n)).

PREREQUISITES
  • Understanding of Big-Oh notation
  • Familiarity with non-negative functions
  • Knowledge of asymptotic notation (Ω and Θ)
  • Basic principles of algorithm analysis
NEXT STEPS
  • Study the formal definitions of Big-Oh, Big-Omega, and Big-Theta notations
  • Explore examples of algorithm complexity proofs using Big-Oh notation
  • Learn about the implications of asymptotic analysis in algorithm design
  • Investigate Knuth's definitions of asymptotic notations for deeper insights
USEFUL FOR

Students and professionals in computer science, particularly those studying algorithms and data structures, as well as educators teaching algorithm complexity concepts.

enigmatic01
Messages
8
Reaction score
1
Homework Statement
Use the formal definition of Big-Oh to prove that if f (n) and g(n) are nonnegative functions such that f (n) = O(g(n)), f (n) + g(n) = Ω(g(n))
Relevant Equations
...
Use the formal definition of Big-Oh to prove that if f (n) and g(n) are nonnegative functions such that f (n) = O(g(n)), f (n) + g(n) = Ω(g(n)).

By the definition of Big-Oh:

If f(n) and g(n) are non-negative functions such that f(n) = O(g(n)) there must be positive constants c and n0 such that 0 ≤ f(n) ≤ c(g(n)) for all n ≥ n0

Would this be correct:

If 0 ≤ f(n) ≤ c(g(n)) and f(n) and g(n) are non-negative functions we know g(n) ≤ ( f(n) + g(n) ).

Since g(n) ≤ f(n) + g(n) there must be a constant c, namely 0 < c ≤ 1, such that c(g(n) ≤ g(n). We could then say 0 ≤ c(g(n)) ≤ f(n) + g(n) which is the definition of f (n) + g(n) = Ω(g(n))
 
Physics news on Phys.org
That doesn't even use f(n) = O(g(n)) but it looks correct (assuming you use Knuth's definition of Ω).

A more interesting result to show (one that needs f(n) = O(g(n))) would be f (n) + g(n) = O(g(n))
 
mfb said:
That doesn't even use f(n) = O(g(n)) but it looks correct (assuming you use Knuth's definition of Ω).

A more interesting result to show (one that needs f(n) = O(g(n))) would be f (n) + g(n) = O(g(n))

That was actually the other homework problem!
 
  • Haha
Likes   Reactions: mfb

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K