Question about Big-O functions.

  • Thread starter Thread starter reef
  • Start date Start date
  • Tags Tags
    Functions
Click For Summary
SUMMARY

This discussion focuses on the application of big-O notation in analyzing the function f(x) = 17x + 11 to determine its growth rate relative to g(x) = x^2. The conclusion drawn is that f(x) is not O(x^2) but rather o(x^2), as it does not satisfy the condition |f(x)| <= C|g(x)| for any constant C when x is sufficiently large. The participants clarify the definitions of big-O, little-o, big-Omega, and big-Theta, emphasizing the importance of understanding the limits and inequalities involved in these classifications.

PREREQUISITES
  • Understanding of asymptotic notation: big-O, little-o, big-Omega, and big-Theta.
  • Familiarity with limits and inequalities in calculus.
  • Basic knowledge of functions and their growth rates.
  • Experience with mathematical proofs and inequalities.
NEXT STEPS
  • Study the definitions and properties of big-O and little-o notation in detail.
  • Learn how to apply limits to determine the growth rates of functions.
  • Explore examples of big-O, big-Omega, and big-Theta classifications in various functions.
  • Practice solving inequalities to establish bounds for functions in asymptotic analysis.
USEFUL FOR

Students, mathematicians, and computer scientists who are learning about algorithm complexity, performance analysis, and asymptotic behavior of functions.

reef
Messages
6
Reaction score
0
I'm not really sure which section to post this in. I'm having trouble establishing witnesses for big-O functions. Basically I'm wondering if you are looking to solve the inequality for the lowest possible value of k, such that x > k.

Here's an example of what I'm talking about.

Eg. Determine whether f(x) is O(x^2) given the function f(x)=17*x+11.
|f(x)|<=C*|g(x)| where x>k.
|(17*x+11)|
=17*x+11
<=17*x+x where x>11
=18*x
<=x^2 where x>18
Therefore, f(x) is O(x^2) with witnesses C=1 and k=18.

My friend from class tells me that there are multiple correct solutions, but the answer given to me by my instructor is as follows:

|f(x)|<=17*x^2+11*x^2 where x>1
=28*x^2
Therefore, f(x) is O(x^2) with witnesses C=28 and K=1.

Any help/insight would be appreciated. This isn't a homework thread.
 
Physics news on Phys.org
Why can't you just say that \lim_{x\to\infty} \frac{f(x)}{x^2} = 0?
 
Both answers are correct. It doesn't matter at all how sharp your estimates are. That's the point of big-O-notation: you only care about some limiting behaviour.

Preno's approach is equally valid, but I suspect that you haven't seen (or aren't allowed to use) this criterion.
 
reef said:
I'm not really sure which section to post this in. I'm having trouble establishing witnesses for big-O functions. Basically I'm wondering if you are looking to solve the inequality for the lowest possible value of k, such that x > k.

Here's an example of what I'm talking about.

Eg. Determine whether f(x) is O(x^2) given the function f(x)=17*x+11.
|f(x)|<=C*|g(x)| where x>k.
|(17*x+11)|
=17*x+11
<=17*x+x where x>11
=18*x
<=x^2 where x>18
Therefore, f(x) is O(x^2) with witnesses C=1 and k=18.
Well, the problem is that f(x)= 17x+ 11 is NOT O(x^2). It is "o(x^2)" ("little o") which is what |17x+11|<= x^2 shows. But for "big O", you must also find k and C such that |x^2|<= C|17x+ 11| for x> k and that is impossible.

My friend from class tells me that there are multiple correct solutions, but the answer given to me by my instructor is as follows:

|f(x)|<=17*x^2+11*x^2 where x>1
=28*x^2
Therefore, f(x) is O(x^2) with witnesses C=28 and K=1.

Any help/insight would be appreciated. This isn't a homework thread.
Roughly speaking, to say that f(x)= O(g(x)) (as x goes to infinity) means that f and g have the same behaviour as x goes to infinity. And that can be determined by looking at
\lim_{x\to\infty} \frac{f(x)}{g(x)}
as Preno suggests.

If
\lim_{x\to\infty} \frac{f(x)}{g(x}}= 0
so that "f(x) goes to 0 faster than g(x)",
which is the case with f(x)= 17x+ 11 and g(x)= x^2, then f(x)= o(g(x)).

If that limit is some finite but non-zero number, so that "f(x) and g(x) go to 0 at the same rate", then f(x)= O(g(x)).
 
HallsofIvy said:
Well, the problem is that f(x)= 17x+ 11 is NOT O(x^2). It is "o(x^2)" ("little o") which is what |17x+11|<= x^2 shows. But for "big O", you must also find k and C such that |x^2|<= C|17x+ 11| for x> k and that is impossible.
I don't have much experience with these little and big O things, but it seems you are using a different definition than the one on wikipedia.

It says: f(x)= O(g(x)) as x->\infty iff there exists a K>0 and x0 such that |f(x)|\leq K|x^2| for all x>x0.

So you just have to find ONE K>0 such that this holds, while for little-o you must do this for EVERY K>0. So according to this definition it seems that certainly f(x)=O(x^2).
 
Last edited:
Thanks for the replies. I've done quite a few exercises since I posted this and I think I've got it. In response to HallsofIvy, you're thinking of big-Omega which is defined as you said. There are three different types of these functions.

Big-O: f(x) is O(g(x)) if |f(x)|<=C*|g(x)| where x>k.

Big-Omega: f(x) is Ω(g(x)) if |f(x)|>=C*|g(x)| where x>k.

Big-Theta: f(x) is Θ(g(x)), if f(x) is O(g(x)) and g(x) is O(f(x)). Here you choose x>max(k1,k2).

I wish I knew how to type quantifiers and subscripts and what not. :P
 
If there are an infinite number of natural numbers, and an infinite number of fractions in between any two natural numbers, and an infinite number of fractions in between any two of those fractions, and an infinite number of fractions in between any two of those fractions, and an infinite number of fractions in between any two of those fractions, and... then that must mean that there are not only infinite infinities, but an infinite number of those infinities. and an infinite number of those...

Similar threads

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