Ascalgo

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Consider the following functions from positive integers to real

numbers:

10, n, n, , 100/n

The CORRECT arrangement of the above functions in increasing


order of asymptotic complexity is:

Answer is below
---------------------------------------------------------------------------------

First take n=210

Compare and log 2 and also with 100/n to find which is


greater
square on both sides
2
() =n*n= 210 *210 = 1048576 is greater

(log 2 210 )2 =10*10=100

(100/2^10)2=(100/1024)2=(0.09765625)2=0.00953674316

-------------------------------------------------------------------------------------

Answer is

In ascending order: 100/n,10, log 2 , ,n


---------------------------------------------------------------------------
EASY CORNER

Let T be a tree with 10 vertices. The sum of the degrees of all the
vertices in T is _______
Tree with n vertices which means n-1 edges.
n = 10
edges = n - 1 = 9.
Sum of degree of all vertices = 2E= 2*9 = 18

You might also like