Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 Help Me ! » Help with Big-O notation » 2010-01-18 15:31:14

yinyinchen2001
Replies: 0

Hi everyone,

I'm having problems with Big-O notation, I'm somewhat understand how to solve the K and the C but I'm not quite sure how to solve this particular question

f(n) is O(g(n))
First question:
f(n) = n^2
when n is even then g(n) = n
when n is odd then g(n) = n^3

Second question:
f(n) = n^2 + 1000n
when n <= 100 then g(n) = n
when n > 100 then g(n) = n^3

The question is do I need to solve two k and two c or one k and one c will be okay for each question.
Do I need to look at the question as a whole or two separate entities. mad

Can someone kindly tell me how to solve these questions

Thank you in advance big_smile

Board footer

Powered by FluxBB