Consider the following statements

S1: f(n) = n^3

S2: g(n)= n^2 logn

S3: h(n)= n!

Which of the following statements is represented asymptotically correct?

f(n) is not O(h(n)) and g(n) is not O(h(n))
f(n) is not O(h(n)) and h(n) is O(g(n))
g(n) is O(h(n)) and f(n) is O(g(n))
g(n) is O(h(n)) and h(n) is Ω(f(n))
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Follow the given conditions

  1. Bob can run 100 meters in a maximum of 13 seconds.
  2. Alice can run 100 meters in a maximum of 15 seconds.

  1. John can run 100 meters in a maximum of 14 seconds.

Based on the given conditions which are asymptotically correct?

Bob=Ω(Alice) and Alice=O(John)
Alice=O(John) and John≠O(Bob)
John=O(Bob) and Bob=Ω(Alice)
John=O(Alice) and Alice≠O(Bob)
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Find the time complexity of a given recurrence relation using recursion tree method.

T(n)= T(n/4) + T(n/2) + n^2

O(n)
O(nlogn)
O(n^2)
O(n^2 logn)
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
The time complexity of an algorithm T(n), where n is input size is given by

T(n)= T(n-1)+1/n, if n>1

= 1, otherwise

The order of this algorithm is

O(logn)
O(n)
O(nlogn)
O(1)
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Consider the following function

Bob(int n)

{

for(i=n; i>=1; i=i/2)

for(j=1; j<=n; j=j*2)

printf("GATE 2021");

}

What is the complexity for the above given function?

O(n)
O(log^2 n)
O(nlogn)
O(loglog^2n)
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Find the most appropriate matching for the following pairs

P-4, Q-1, R-3, S-2
P-6, Q-5, R-2, S-2
P-4, Q-1, R-3, S-2
P-6, Q-1, R-2, S-3
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Find the recurrence relation and its time complexity for given code segment

int Bob(int n)

{

if(n==-1 || n==0 || n==1)

return 1;

if((n%2)==0)

return Bob(n/2)+Bob(n/2);

else

return 3*Bob(n/2)+Bob(n/2);

}

2T(n/2)+1 and O(n)
3T(n/2)+1 and O(n^2)
4T(n/2)+1 and O(logn)
3T(n/2)+1 and O(n)
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Find the worst case time complexity for given code segment

O(n^6)
O(n^7)
O(n^4)
O(n^5)
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Find the worst case time complexity of a given algorithm?

O(log2n)
O(log2n * log2log2n)
O(n^2 logn)
O(n^3)
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Find the time complexity of a given recursion code segment is ___?

Bob(int n, int a, int b, int c)

{

if(n==1)

return 1;

else

{

Bob((n-1), a, c, b)

printf(“GATE 2021’);

Bob((n-1), c, b, a)

}

}

O(log2n)
O(2^n)
O(nlogn)
None of the above
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
What is the worst case time complexity of below code segment

O(n^3log^2n)
O(n^3)
O(n^4)
O(n^2 log^2n)
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
State TRUE/FALSE for given statements

S1: 2T(n/2)-4T(n/2)+1 is solvable by using the master's theorem.

S2: If for an algorithm time complexity is given by O((3⁄2)^n) then complexity will be linear.

S1-TRUE and S2-TRUE
S1-FALSE and S2-FALSE
S1-TRUE and S2-FALSE
S1-FALSE and S2-TRUE
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Arrange the following functions in decreasing asymptotic order.

f4(n) > f1(n) > f3(n) > f5(n) > f2(n)
f4(n) > f3(n) > f1(n) > f5(n) > f2(n)
f3(n) > f4(n) > f1(n) > f2(n) > f5(n)
f3(n) > f4(n) > f1(n) > f5(n) > f2(n)
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
The given diagram shows the flowchart for a recursive function A(n). Assume that all statements, except for the recursive calls, have O(1) time complexity. If the worst case time complexity of this function is O(n𝛼)), then the least possible value (accurate upto two decimal positions) of α is _________.

Flowchart for recursive function A(n):

1
1.77
1.87
1.56
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Given recurrence relation

T(n) = √(4) T(n/2) + √n

T(1) = 1

Find the worst case time complexity of given recurrence relation is O(n^𝛼)), then the least possible value (accurate upto two decimal positions) of α is _________.

1.00
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00