The recurrence equation T(n) = T(n/2) + 1 represents the time complexity of which algorithmic paradigm?
Divide and Conquer
A recurrence relation is an equation that describes the running time of an algorithm based on its running time on smaller inputs. The given recurrence relation is T(n) = T(n/2) + 1. Let's break down what this means in terms of algorithm performance and the underlying algorithmic paradigm.
So, the recurrence relation T(n) = T(n/2) + 1 describes an algorithm that solves a problem of size n by solving one subproblem of size n/2 and performing a constant amount of additional work. This pattern is a strong indicator of a specific type of algorithmic approach.
Let's consider the common algorithmic paradigms and see which one typically exhibits a time complexity described by a recurrence relation like T(n) = T(n/2) + 1.
The four options provided are:
The Divide and Conquer paradigm involves breaking a problem into smaller, independent subproblems of the same type, solving these subproblems recursively, and then combining their solutions to get the solution for the original problem. The general form of a recurrence relation for Divide and Conquer is often T(n) = aT(n/b) + f(n), where:
Comparing T(n) = T(n/2) + 1 to the general form T(n) = aT(n/b) + f(n), we see that a=1, b=2, and f(n)=1 (constant time). This perfectly matches the structure of algorithms like Binary Search, which is a classic example of a Divide and Conquer algorithm. Binary search divides the search space in half at each step and performs constant work (comparison) before potentially recurring on one half.
Let's briefly look at why the other options are less likely to be represented by this specific recurrence relation:
The recurrence relation T(n) = T(n/2) + 1 accurately describes the time complexity of algorithms that solve a problem by reducing its size by half in one recursive call and performing a constant amount of work. This structure is characteristic of the Divide and Conquer algorithmic paradigm. Algorithms like Binary Search have this time complexity.
In the following table, the left column contains the names of standard graph algorithms and the right column contains the time complexities of the algorithms. Here, n and m are number of vertices and edges, respectively. Match each algorithm with its time complexity.
| List I | List II | ||
| Standard graph algorithms | Time complexities | ||
| A. | Bellman‐Ford algorithm | I. | O(m*log n) |
| B. | Kruskal’s algorithm | II. | O(n 3) |
| C. | Floyd‐Warshall algorithm | III. | O(n*m) |
| D. | Topological sorting | IV. | O(n + m) |
Choose the correct answer from the options given below :
How many cards must be selected from a standard deck of 52 cards to guarantee that at least three hearts are present among them?
Match List 1 with List 2 and choose the correct answer from the code given below:
List I (Graph Algorithm) | List II (Time Complexity) |
a) Dijkstra’s algorithm | i) Θ(E log E) |
b) Kruskal’s algorithm | ii) Θ(V 3) |
c) Floyd-Warshall algorithm | iii) Θ(V 2) |
d) Topological sorting | iv) Θ(V + E) |
Where V and E are the number of vertices and edges in graph respectively.
The solution of recurrence relation: T(n)=2T(sqrt(n)) + lg(n) is
Modulus of elasticity of concrete, E is calculated using: