Question about Big-O functions.

  • Context: Undergrad 
  • Thread starter Thread starter reef
  • Start date Start date
  • Tags Tags
    Functions
Click For Summary

Discussion Overview

The discussion revolves around the concept of big-O notation in mathematics, specifically regarding the establishment of witnesses for big-O functions. Participants explore the definitions and implications of big-O, little-o, big-Omega, and big-Theta, as well as the conditions under which a function can be classified as big-O of another function.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant questions whether the goal is to find the lowest possible value of k such that x > k when establishing witnesses for big-O functions.
  • Another participant suggests using the limit \lim_{x\to\infty} \frac{f(x)}{x^2} = 0 as a criterion for determining big-O classification.
  • Some participants argue that both approaches to establishing big-O are valid, emphasizing that the sharpness of estimates is not crucial in big-O notation.
  • A later reply asserts that the function f(x) = 17x + 11 is not O(x^2) but rather o(x^2), indicating a misunderstanding of the definitions involved.
  • Another participant clarifies that for big-O, one must find k and C such that |x^2| <= C|17x + 11| for x > k, which they claim is impossible in this case.
  • One participant references a definition from Wikipedia, stating that f(x) = O(g(x)) requires finding a single K > 0 such that |f(x)| <= K|g(x)| for all x > x0, suggesting that f(x) could still be classified as O(x^2).
  • Another participant summarizes the definitions of big-O, big-Omega, and big-Theta, indicating a broader understanding of the relationships between these classifications.

Areas of Agreement / Disagreement

Participants express disagreement regarding the classification of f(x) = 17x + 11 as either O(x^2) or o(x^2). Some argue for its classification as big-O, while others maintain it is little-o, indicating that the discussion remains unresolved.

Contextual Notes

There are varying interpretations of the definitions of big-O and little-o notation, leading to confusion about the conditions required for classification. The discussion highlights the importance of understanding the limits and criteria involved in these mathematical concepts.

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 [itex]\lim_{x\to\infty} \frac{f(x)}{x^2} = 0[/itex]?
 
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 [itex]f(x)= 17x+ 11[/itex] is NOT O(x^2). It is "[itex]o(x^2)[/itex]" ("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
[tex]\lim_{x\to\infty} \frac{f(x)}{g(x)}[/tex]
as Preno suggests.

If
[tex]\lim_{x\to\infty} \frac{f(x)}{g(x}}= 0[/tex]
so that "f(x) goes to 0 faster than g(x)",
which is the case with [itex]f(x)= 17x+ 11[/itex] and [itex]g(x)= x^2[/itex], 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 [itex]f(x)= 17x+ 11[/itex] is NOT O(x^2). It is "[itex]o(x^2)[/itex]" ("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
 

Similar threads

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