Aspire Faculty ID #17489 · Topic: UGC NET Computer Science August 2024 (Paper II) · Just now
UGC NET Computer Science August 2024 (Paper II)

Arrange the following recurrence relations in increasing order of their time complexity.

(A) $T(n) = T(n/2) + 1$

(B) $T(n) = 2T(n/2) + n$

(C) $T(n) = 3T(n/3) + n$

(D) $T(n) = 2T(n/2) + \sqrt{n}$

(E) $T(n) = T(n-1) + 1$

Solution

Using Master Theorem / recurrence expansion:

(A)
$T(n) = T(n/2) + 1$
Complexity → $O(\log n)$

(E)
$T(n) = T(n-1) + 1$
Complexity → $O(n)$

(D)
$T(n) = 2T(n/2) + \sqrt{n}$

$n^{\log_2 2} = n$

Since $\sqrt{n} < n$

→ $O(n)$

(B)
$T(n) = 2T(n/2) + n$

$n^{\log_2 2} = n$

→ $O(n \log n)$

(C)
$T(n) = 3T(n/3) + n$

$n^{\log_3 3} = n$

→ $O(n \log n)$

Increasing order

$O(\log n) < O(n) < O(n) < O(n\log n) < O(n\log n)$

Previous 10 Questions — UGC NET Computer Science August 2024 (Paper II)

Nearest first

Next 10 Questions — UGC NET Computer Science August 2024 (Paper II)

Ascending by ID
1
Match List-I with List-II.&nbsp;List-IList-II&nbsp;&nbsp;A. Representation of bits&nbsp;I. Transport layer&nbsp;B. Phys…
Topic: UGC NET Computer Science August 2024 (Paper II)
2
Find the correct sequence of the storage devices in ascending order based on their access time.A. RegistersB. Magnetic …
Topic: UGC NET Computer Science August 2024 (Paper II)
3
Match List-I with List-II.&nbsp;List-I (Testing Type)&nbsp;List-II (Description)&nbsp;A. Unit testing&nbsp;I. Testing i…
Topic: UGC NET Computer Science August 2024 (Paper II)
4
Arrange the following Language Classes in ascending order according to their expressive power, as defined by Chomsky hi…
Topic: UGC NET Computer Science August 2024 (Paper II)
5
Arrange the following Language Classes in ascending order according to their expressive power, as defined by Chomsky hi…
Topic: UGC NET Computer Science August 2024 (Paper II)
6
Match List-I with List-II.&nbsp;List-I&nbsp;List-II&nbsp;A. Dijkstra’s Algorithm&nbsp;I. Find the shortest path between…
Topic: UGC NET Computer Science August 2024 (Paper II)
7
Arrange the given steps required for a Direct Memory Access (DMA) transfer in the correct order.(A) Initiate DMA transf…
Topic: UGC NET Computer Science August 2024 (Paper II)
8
A graph $G$ with number of vertices greater and equal than three i.e. $(n \ge 3)$ is a Hamiltonian graph, if the degree…
Topic: UGC NET Computer Science August 2024 (Paper II)
9
Arrange the following steps in a proper sequence for the typical process of a DNS query :(A) Query authoritative DNS Se…
Topic: UGC NET Computer Science August 2024 (Paper II)
10
In a schema $R(A, B, C, D, E, F, G, H)$, each field of $R$ contains only atomic values.$F = {CH \rightarrow C, A \right…
Topic: UGC NET Computer Science August 2024 (Paper II)
Ask Your Question or Put Your Review.

loading...