The Gateway to Computer Science Excellence

First time here? Checkout the FAQ!

x

+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

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

- All categories
- General Aptitude 1.2k
- Engineering Mathematics 4.8k
- Digital Logic 2k
- Programming & DS 3.5k
- Algorithms 3k
- Theory of Computation 3.8k
- Compiler Design 1.5k
- Databases 2.8k
- CO & Architecture 2.5k
- Computer Networks 2.9k
- Non GATE 940
- Others 1.2k
- Admissions 320
- Exam Queries 409
- Tier 1 Placement Questions 17
- Job Queries 52
- Projects 8

34,170 questions

40,847 answers

115,884 comments

39,703 users