1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Big-O Notation

  1. Jul 8, 2009 #1
    1. The problem statement, all variables and given/known data
    Hi, I have been having huge problems with dealing with these kinds of problems, I would appreciate atleast some guidance in dealing with these sorts of problems, I think the major problem is just how I learned to solve them, I have been looking for resources on the net, but it just gets to complicated, and I need someone to help me start with simple stuff first.

    A very simple problem I am starting with will be this one:

    Is x^4 + 9x^3 + 4x + 7 O(x^4) ?

    2. Relevant equations
    Well obviously start with:

    |x^4 + 9x^3 + 4x + 7| ≤ C|x^4|

    3. The attempt at a solution

    Now if I try working this out

    |x^4 + 9x^3 + 4x + 7| ≤ C|x^4| for all x > k
    x^4 + 9x^3 + 4x + 7 ≤ 1x^4 + 9x^4 4x^4 7x^4 for all x > 1
    f(x) ≤ 21x^4 for all x > 1
    so for C=21 and k=1 f(x) = O(x^4).

    Now the solution in the textbook says the constants are C=4, k=9.
    Am I wrong or do the constants matter, I know there are infinite amount of constants if the statement is true, but why choose those ones anyway then?

    Any help would be appreciated.
    Thank You.
  2. jcsd
  3. Jul 8, 2009 #2
    I like your way. Simple and direct. The actual constants don't matter.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook