Are These Statements True for Big O and Little o Notation?

  • Thread starter Thread starter hotcommodity
  • Start date Start date
  • Tags Tags
    Notation
Click For Summary

Homework Help Overview

The discussion revolves around the properties of Big O and little o notation, specifically examining statements related to the relationships between two functions T1(N) and T2(N) that are both bounded by a function f(N). The original poster seeks clarification on the validity of several assertions regarding these relationships.

Discussion Character

  • Conceptual clarification, Assumption checking, Exploratory

Approaches and Questions Raised

  • The original poster attempts to analyze the truth of various statements regarding the functions T1(N) and T2(N), expressing uncertainty about parts b, c, and d. Some participants suggest considering specific cases, such as when T1 and T2 are equal, to explore implications for the statements. Others discuss the meaning of constants in the context of Big O notation and how they affect the relationships between the functions.

Discussion Status

Participants are actively engaging with the problem, offering insights and questioning assumptions. There is recognition that part a is true, while uncertainty remains regarding the other parts. Some guidance has been provided regarding the interpretation of constants in Big O notation, but no consensus has been reached on the validity of the remaining statements.

Contextual Notes

The original poster indicates a need for clarity in understanding the implications of the definitions of Big O and little o notation, particularly in the context of analyzing running times of algorithms. There is a mention of constraints in finding functions that do not satisfy the O relationship in part 2 of the problem.

hotcommodity
Messages
434
Reaction score
0

Homework Statement



1) Suppose T1(N) = O(f(N)) and T2(N) = O(f(N)). Which of the following are true?

a) T1(N) + T2(N) = O(f(N))
b) T1(N) - T2(N) = o(f(N))
c) \frac{T_1(N)}{T_2(N)} = O(1)
d) T1(N) = O(T2(N))

2) Find two functions f(N) and g(N) such that neither f(N) = O(g(N)) nor g(N) = O(f(N)).

Just for clarity, I'm having to use these functions to analyze the running times of programs, with big O being the worst case running time.

Homework Equations



None.

The Attempt at a Solution



For problem 1, I know that letter "a" is true, but I'm having trouble with the rest. For letter "b", I know that T1(N) - T2(N) implies f(N) - f(N), which would be zero. So I believe letter "b" is false, because it's possible that T1(N) > T2(N). For part "c", if T2(N) is much smaller than T1(N), then the division would result in something much larger than 1, so I believe it to be fasle. Plus, I read that constants don't count in big O notation, so wouldn't O(1) just be O(0)? For part "d", T1(N) could be larger than T2(N) by the initial big O definitions, and thus I believe this to be false.

For problem 2, I don't even know where to begin, because the problem implies that I must find two functions such that one is not greater than the other, and they cannot equal each other either, right?

Any help is appreciated.

Edit: I changed my thoughts on part "b".
 
Last edited:
Physics news on Phys.org
Well, O(p) just means "within an error of a constant multiple of p".

So it may help to write T_1 (N) = C_1 \cdot f(n), T_2 (N) = C_2 \cdot f(n).

That way, for a) the replacements make it become (C_1 +C_2)\cdot f(n). And Since the new coefficient is just another constant, a) is also O(f(n)).
 
Thanks for the reply. I've already figured out that letter "a" is true, but it's the rest that I'm having trouble with. I'm still stuck...
 
Ok Let's think about this. For B) What if T_1 and T_2 are equal? They need not necessarily be, but let's take the case they are. Is it still O(f(n))?

For c) From your attempt - as long as T_2 is only smaller than T_1 by a constant, then you get perhaps a big number but still a constant! And O(1) just means a constant! If T_2 is smaller than T_1 by so much that the number is infinitely large, then this contradicts that both are O( f(n) ).
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
3
Views
2K