Solving Inequalities Arising from Algorithms Study

Click For Summary

Discussion Overview

The discussion revolves around understanding the selection of bounds for inequalities arising from the analysis of algorithms, specifically in the context of proving that the expression a n^2 + b n + c belongs to the set Ω(n^2). Participants explore the implications of the coefficients a, b, and c, and the conditions under which the inequalities hold.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant expresses confusion over the selection of the lower limit for n, given the constants c_1 and c_2 proposed in the book.
  • Another participant suggests that the quadratic term can be transformed to show it is bounded above and below by multiples of n^2, contingent on the coefficients being non-negative.
  • A later reply clarifies that a > 0 is a necessary condition for the analysis and that the inequalities must be shown rather than assumed.
  • Some participants propose that for large enough n, the term a n^2 dominates the expression, allowing for certain bounds on c_1 and c_2.
  • There is a discussion about the conditions under which the inequalities hold, with references to ε and N, indicating that the proof requires careful handling of limits and bounds.
  • One participant acknowledges the need to work backwards from the inequalities to establish the necessary conditions for n.

Areas of Agreement / Disagreement

Participants generally agree on the necessity of proving the inequalities but express differing views on the methods and assumptions required to do so. The discussion remains unresolved regarding the formalization of the proof and the exact conditions needed for the bounds.

Contextual Notes

Limitations include the dependence on the assumptions about the coefficients a, b, and c, as well as the need for formal proofs of the inequalities rather than informal justifications.

scorpion4377
Messages
9
Reaction score
0
Hey everybody,

I'm a little embarrassed to be asking this question as I feel it is extremely easy, but I will do so anyway. I'm self studying some algorithms, and the book that I'm using claims that

[itex]a n^2 + b n + c \in \Omega(n^2)[/itex]

Of course, this is equivalent to saying that there exists [itex]c_1, c_2 \in ℝ^+[/itex] such that

[itex]0 \leq c_1 n^2 \leq a n^2 + b n + c \leq c_2 n^2[/itex] for all [itex]n \geq n_0^*[/itex]

In order to verify this, the book says that I should let [itex]c_1 = a/4[/itex], [itex]c_2 = 7a/4[/itex] and [itex]n \geq 2 \cdot max(|b|/a, \sqrt{|c|/a})[/itex]. This would imply that

[itex]0 \leq a n^2/4 \leq a n^2 + b n + c \leq 7a n^2/4[/itex] for all [itex]n \geq n_0^*[/itex]

I understand that they picked [itex]c_1[/itex] and [itex]c_2[/itex] (almost) arbitrarily. However, I just can't see how they picked their lower limit on [itex]n[/itex] given these two constants. I've been messing around with the quadratic equation for a little while now and I just fail to see it.

Any help would be appreciated! I just want to understand the logic of their selection of [itex]n_0^*[/itex]. THanks!
 
Physics news on Phys.org


Hey scorpion4377 and welcome to the forums.

I'm thinking that it has to do with the quadratic term of taking an^2 + bn + c into (SQRT(a)n + d)^2 + e for some d and e. You can then show that that this term is greater than or equal to an^2 but less than or equal to some other multiple of n^2.

Do you have any extra information for the coeffecients? I'm assuming (but this may be wrong) that a,b,c are all >= 0 and if this is the case you can get an upper bound for a constant that bounds the expression.

One example to bound the upper limit is to take say (xn + y)^2 and choose a value of (zn)^2 where zn > xn + y which implies z > (xn + y)/n = (xn/n) + (y/n) = x + y/n.
 


Thanks for your response! I'll take a closer look at it when I get out of work =P

The problem states that a > 0, but there are no restrictions on the other two coefficients.
 


For large enough n, an2 completely dominates the quadratic, so c1<a<c2. will always work.
 


mathman said:
For large enough n, an2 completely dominates the quadratic, so c1<a<c2. will always work.

That's exactly what the "informal" use of theta notation shows. I totally understand (and believe) the informal justification, but I'm having trouble with showing it formally.
 


scorpion4377 said:
That's exactly what the "informal" use of theta notation shows. I totally understand (and believe) the informal justification, but I'm having trouble with showing it formally.

For any ε > 0 and n > N(ε), |bn + c| < εn2, so c1 = a-ε and c2 = a+ε
 


scorpion4377 said:
I'm self studying some algorithms, and the book that I'm using claims that
[itex]a n^2 + b n + c \in \Omega(n^2)[/itex]
Of course, this is equivalent to saying that there exists [itex]c_1, c_2 \in ℝ^+[/itex] such that

[itex]0 \leq c_1 n^2 \leq a n^2 + b n + c \leq c_2 n^2[/itex] for all [itex]n \geq n_0^*[/itex]

In order to verify this, the book says that I should let [itex]c_1 = a/4[/itex], [itex]c_2 = 7a/4[/itex] and [itex]n \geq 2 \cdot max(|b|/a, \sqrt{|c|/a})[/itex].
First, need to specify that a > 0.
This would imply that
[itex]0 \leq a n^2/4 \leq a n^2 + b n + c \leq 7a n^2/4[/itex] for all [itex]n \geq n_0^*[/itex]
No, it doesn't imply that exactly. I does suggest that this is what you need to show.
Let's work that backwards a bit for [itex]a n^2/4 \leq a n^2 + b n + c[/itex]. It would follow from [itex]0 \leq 3a n^2 + 4b n + 4c[/itex]. The form of the lower bound for n suggests we need to break the b and c terms apart so that we have two expressions each ≥ 0, one involving a and b, the other involving a and c:
[itex]3a n^2 + 4b n + 4c = (2a n^2 + 4b n) + (a n^2 + 4c)[/itex]
[itex]2a n^2 + 4b n \geq 4|b|n + 4bn \geq 0[/itex]
See if you can apply this approach to get the rest.
 


Oops. I didn't mean to imply that it's already true, but instead that it is what I still have to show. I see where you are coming from now.

[itex]2a n^2 + 4b n \geq 4|b|n + 4bn \geq 0[/itex] is true if [itex]2a n^2 \geq 4|b|n[/itex]. This would be true assuming that [itex]n \geq 2|b| / a[/itex]. On the other hand:
[itex]an^2 + 4c \geq 4|c|+ 4c \geq 4 ( |c| + c ) \geq 0[/itex] if [itex]an^2 \geq 4|c|[/itex] This would imply that [itex]n \geq 2\sqrt{|c|/a}[/itex].

And now, I see that both inequalities are true if [itex]n \geq 2 max( |b|/a, \sqrt{|c|/a})[/itex].

Working backwards, I could now show that the first inequality is true. I guess I would have to apply the same techniques to the other side, and I'm sure that I'd get the same bounds on [itex]n[/itex]. I will work this out on a piece of paper on my own in a bit.

Thank you so much for your help! I really appreciate everybody's advice!
 
Last edited:


mathman said:
For any ε > 0 and n > N(ε), |bn + c| < εn2, so c1 = a-ε and c2 = a+ε

Again, that's what I'm trying to prove. If I could prove this, the original theorem would be trivial for me.

I really do appreciate the help, of course! Thanks for pointing me in the right direction.
 
  • #10


|bn + c|/n2 ≤ |b|/n +|c|/n2 -> 0 monotonically.
Fix ε, find N satisfying |b|/N +|c|/N2 < ε.

I don't know how to formalize any further.
 
Last edited:
  • #11


I see now. Sorry for the misunderstanding!
 

Similar threads

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