-1

In Big Theta notation, do the constants c1 and c2 differ for each value of n?.

Definition:

Theta(g(n)) = {f(n): there exist c1 >= 0, c2 > 0 and n0 > 0
                     such that for all n >= n0,
                     0 <= c1, g(n) <= f(n) <= c2 * g(n)}
Blender
  • 289,723
  • 53
  • 439
  • 496
sparth
  • 137
  • 4
  • 1
    This is maths only, not good on SO. –  Sep 08 '12 at 04:52
  • 1
    This might be better posted on the Theoretical Computer Science StackExchange: http://cstheory.stackexchange.com/ – Maz Sep 08 '12 at 04:54
  • I think the constants are for each function `f`. A function `f` is in that set iff there exist `c1`, `c2` and `n0` s.t. `0 <= c1`, `g(n) <= f(n) <= c2 * g(n)` for all `n >= n0`. – Blender Sep 08 '12 at 04:55

2 Answers2

4

c1 and c2 are not different for each value of n. If they were, they would be dependent on n, and wouldn't be constants.

Matthew Adams
  • 9,426
  • 3
  • 27
  • 43
  • If there are three functions n, n^2 and n^3 and for each value of n in the function n^2, we have the functions n and n^3 differing by a constant proportion..Do we refer to these as the constants c1 and c2?? – sparth Sep 08 '12 at 05:06
  • But `n` and `n^3` aren't different by a constant; for any constant `c`, `cn < n^3` for some value of `n`. – Matthew Adams Sep 08 '12 at 05:09
  • Yes, I am getting that n and n^3 aren't different by a constant. However, I am not able to grasp your idea about the constants. Can you please be more detail and also give an example? – sparth Sep 08 '12 at 05:13
  • @sai constants defined here are nothing but some fixed real value which will not vary with n. For any n these constants will remain same. – Akashdeep Saluja Sep 08 '12 at 05:54
  • Well, say that `c1` was allowed to vary for different values of `n`. Let's say it varies so that when `n = 2`, `c1 = 4`, and when `n = 3`, `c1 = 9`. In fact, let's have `c1` always equal to `n^2`; that makes `c1*n = n^3`. But we know that "`n` and `n^3` aren't different by a constant." See the problem with having `c1` and `c2` vary? – Matthew Adams Sep 08 '12 at 06:08
1
Theta(g(n)) = {f(n): for all n >= n0, there exist c1 >= 0, c2 > 0 and n0 > 0
                 such that 0 <= c1, g(n) <= f(n) <= c2 * g(n)}

I don't think the quantifiers in your definition are correct. It should be

Theta(g(n)) = {f(n): there exist c1 >= 0, c2 > 0 and n0 > 0
                 such that for all n >= n0, c1 * g(n) <= f(n) <= c2 * g(n)}
Keith Randall
  • 22,985
  • 2
  • 35
  • 54