GATE CSE
First time here? Checkout the FAQ!
x
0 votes
47 views

HOW ARE C1,C2 VALUES CALCULATED ? 

asked in Algorithms by (447 points)   | 47 views

1 Answer

+2 votes
f(n) = $\Theta (g(n))$

if c1.g(n) $\leq$ f(n) $\leq$ c2.g(n)

f(n) =  $\frac{n^2}{2} - \frac{n}{2}$  and g(n) = $n^2$

f(n) $\leq$ 1.g(n)  as $\frac{n^2}{2} - \frac{n}{2}$ $\leq$ $n^2$, hence we have found C2 as 1.

now find C1 such as $C1.n^2$ $\leq$ $\frac{n^2}{2} - \frac{n}{2}$

As given in solution above C1 = $\frac{1}{5}$ will staisfy our condition
answered by Veteran (11.2k points)  

Related questions



Top Users Sep 2017
  1. Habibkhan

    7184 Points

  2. Warrior

    2664 Points

  3. Arjun

    2582 Points

  4. rishu_darkshadow

    2520 Points

  5. A_i_$_h

    2280 Points

  6. nikunj

    1980 Points

  7. manu00x

    1856 Points

  8. makhdoom ghaya

    1770 Points

  9. Bikram

    1744 Points

  10. SiddharthMahapatra

    1718 Points


26,151 questions
33,733 answers
79,971 comments
31,120 users