Algorithms
Complexity Analysis and Asymptotic Notations
Marks 1Marks 2
Searching and Sorting
Marks 1Marks 2
Divide and Conquer Method
Marks 1Marks 2
Greedy Method
Marks 1Marks 2
P and NP Concepts
Marks 1Marks 2
Dynamic Programming
Marks 1Marks 2
1
GATE CSE 2024 Set 1
MCQ (Single Correct Answer)
+2
-0.66

Consider the following recurrence relation:

$$T(n) = \begin{cases} \sqrt{n} T(\sqrt{n}) + n & \text{for } n \ge 1, \\ 1 & \text{for } n = 1. \end{cases}$$

Which one of the following options is CORRECT?

A

$$T(n) = \Theta(n \log \log n)$$

B

$$T(n) = \Theta(n \log n)$$

C

$$T(n) = \Theta(n^2 \log n)$$

D

$$T(n) = \Theta(n^2 \log \log n)$$

2
GATE CSE 2023
MCQ (More than One Correct Answer)
+2
-0

Consider functions Function_1 and Function_2 expressed in pseudocode as follows:

Function 1
   while n > 1 do
     for i = 1 to n do
       x = x + 1;
     end for
     n = n/2;
   end while

Function 2
  for i = 1 to 100 ∗ n do
    x = x + 1;
  end for

Let $$f_1(n)$$ and $$f_2(n)$$ denote the number of times the statement "$$x=x+1$$" is executed in Function_1 and Function_2, respectively.

Which of the following statements is/are TRUE?

A
$${f_1}(n) \in \Theta ({f_2}(n))$$
B
$${f_1}(n) \in o({f_2}(n))$$
C
$${f_1}(n) \in \omega ({f_2}(n))$$
D
$${f_1}(n) \in O(n)$$
3
GATE CSE 2022
MCQ (More than One Correct Answer)
+2
-0

Consider the following recurrence :

f(1) = 1;

f(2n) = 2f(n) $$-$$ 1, for n $$\ge$$ 1;

f(2n + 1) = 2f(n) + 1, for n $$\ge$$ 1;

Then, which of the following statements is/are TRUE?

A
f(2n $$-$$ 1) = 2n $$-$$ 1
B
f(2n) = 1
C
f(5 . 2n) = 2n + 1 + 1
D
f(2n + 1) = 2n + 1
4
GATE CSE 2021 Set 2
MCQ (Single Correct Answer)
+2
-0.66

For constants a â‰¥ 1 and b > 1, consider the following recurrence defined on the non-negative integers :

$$T\left( n \right) = a.T\left( {\frac{n}{b}} \right) + f\left( n \right)$$

Which one of the following options is correct about the recurrence T(n)?

A
If f(n) is $$\frac{n}{{{{\log }_2}(n)}}$$, then T(n) is Î¸(log2(n)).
B
If f(n) is n log2(n), then T(n) is Î¸(n log2(n)).
C
If f(n) is O(nlogb(a) - Ïµ) for some Ïµ > 0, then T(n) is Î¸(nlogb(a)).
D
If f(n) is Î¸(nlogb(a)), then T(n) is Î¸(nlogb(a))
GATE CSE Subjects
Theory of Computation
Operating Systems
Algorithms
Digital Logic
Database Management System
Data Structures
Computer Networks
Software Engineering
Compiler Design
Web Technologies
General Aptitude
Discrete Mathematics
Programming Languages
Computer Organization