Science, asked by rupanm1984, 1 month ago

compare the order of growth n(n-1)/2 and n2 Co 2.5 (K5)​

Answers

Answered by sukhwinderabc307
5

Explanation:

Among exponentials, you can always convert them all to the same base and compare exponents; larger exponents beat smaller ones. Same for logarithms. so this is actually just a power. so that's the order of growth of the functions.

Answered by ssanskriti1107
4

Answer:

O(\frac{n(n-1)}{2} )  growth rate is slower than O(n^2).

Explanation:

The O notation, which is pronounced "big-oh," is used to express an asymptotic upper bound of a function, i.e., that a function f(n) cannot surpass another function g(n), and g(n) is therefore the upper bound of f(n).

As per the definition,

                   f(n) = O(g(n))                     , if f(n) \leq c.g(n).

Analyzing the Time Complexity,  

O(\frac{n(n-1)}{2} ) ,    \frac{n(n-1)}{2}=\frac{n^2-n}{2}

The order of growth for varying input sizes of 'n' is as follows:-

n^2                                               \frac{n(n-1)}{2}

1                                                  0

4                                                  1  

9                                                  3                                    

16                                                6

We can clearly see here that the growth rate of  O(\frac{n(n-1)}{2} )  is slower than O(n^2).

#SPJ3

Similar questions