CUET-PG SERIES
Data-science-a-i-cyber-security-and-computer-sci

Algorithm

11 previous year questions.

Volume: 11 Ques
Yield: Medium

High-Yield Trend

11
2024

Chapter Questions
11 MCQs

01
PYQ 2024
medium
data-science-a-i-cyber-security-and-computer-sci ID: cuet-pg-
Consider the quicksort algorithm. Suppose there is a procedure for finding a pivot element which splits the list into two sub-lists, one of which contains one-fifth of the elements and the remaining elements are contained in the other sub-list. Let T(n) be the number of comparisons required to sort n elements. Then:
1
T(n) ≀ 2T(n/5) + n
2
T(n) ≀ T(n/5) + T(4n/5) + n
3
T(n) ≀ 2T(4n/5) + n
4
T(n) ≀ 2T(n/2) + n
02
PYQ 2024
medium
data-science-a-i-cyber-security-and-computer-sci ID: cuet-pg-
Let A be the problem of finding a Hamiltonian cycle in a graph G = (V, E) with |V| divisible by 3, and B be the problem of determining if a Hamiltonian cycle exists in such graphs. Which one of the following is true?
1
Both A and B are NP-hard
2
A is NP-hard but B is not
3
B is NP-hard but A is not
4
Neither A nor B is NP-hard
03
PYQ 2024
medium
data-science-a-i-cyber-security-and-computer-sci ID: cuet-pg-
Rank the following functions by order of growth (Highest running time to lowest running time):
1.
2.
3.
4.
5.
Choose the correct answer from the options given below:
1
(E), (A), (D), (C), (B)
2
(D), (A), (E), (B), (C)
3
(D), (E), (A), (B), (C)
4
(E), (D), (A), (B), (C)
04
PYQ 2024
medium
data-science-a-i-cyber-security-and-computer-sci ID: cuet-pg-
Match List I with List II;
LIST ILIST II
(A) Bucket sort(I) O(nΒ²)
(B) Matrix chain multiplication(II) O(nΒ³)
(C) Huffman codes(III) O(n log n)
(D) Dijkstra’s Algorithm(IV) O(n)
Choose the correct answer from the options given below:
1
(A) - (II), (B) - (III), (C) - (I), (D) - (IV)
2
(A) - (II), (B) - (III), (C) - (IV), (D) - (I)
3
(A) - (IV), (B) - (III), (C) - (I), (D) - (II)
4
(A) - (III), (B) - (II), (C) - (IV), (D) - (I)
05
PYQ 2024
medium
data-science-a-i-cyber-security-and-computer-sci ID: cuet-pg-
Let G be a directed graph whose vertex set is the set of numbers from 1 to 100. There is an edge from a vertex i to j if and only if either j = i + 1 or j = 3i. The minimum number of edges in a path in G from vertex 1 to vertex 100 is:
1
4
2
7
3
23
4
99
06
PYQ 2024
medium
data-science-a-i-cyber-security-and-computer-sci ID: cuet-pg-
A list of n strings, each of length n, is sorted into lexicographic order using the merge-sort algorithm. The worst-case running time of this computation is:
1
O(n log n)
2
O(n^2 log n)
3
O(n^2 + log n)
4
O(n^2)
07
PYQ 2024
medium
data-science-a-i-cyber-security-and-computer-sci ID: cuet-pg-
Match List I with List II
LIST ILIST II
(A) Floyd-Warshall algorithm for all pair shortest paths(I) Divide and Conquer
(B) Prim’s algorithm(II) Greedy Paradigm
(C) Hamiltonian Circuit(III) Backtracking
(D) Merge Sort(IV) Dynamic Programming paradigm
Choose the correct answer from the options given below:
1
(A) - (IV), (B) - (III), (C) - (II), (D) - (I)
2
(A) - (IV), (B) - (II), (C) - (III), (D) - (I)
3
(A) - (II), (B) - (III), (C) - (I), (D) - (IV)
4
(A) - (III), (B) - (II), (C) - (IV), (D) - (I)
08
PYQ 2024
medium
data-science-a-i-cyber-security-and-computer-sci ID: cuet-pg-
Match List I with List II
LIST ILIST II
(A) limxβ†’1(1 βˆ’ x)1/x(I) e
(B) limxβ†’0 1/x ln(1 βˆ’ x)(II) 1
(C) limx→0 (1 + x2)1/x(III) 0
(D) limxβ†’βˆž (1 + 1/x)x(IV) 2
1
(A) - (III), (B) - (IV), (C) - (I), (D) - (II)
2
(A) - (IV), (B) - (III), (C) - (II), (D) - (I)
3
(A) - (IV), (B) - (II), (C) - (III), (D) - (I)
4
(A) - (IV), (B) - (II), (C) - (I), (D) - (III)
09
PYQ 2024
medium
data-science-a-i-cyber-security-and-computer-sci ID: cuet-pg-
Which of the following statement(s) is/are not true?
1. Optimal binary search tree construction can be performed efficiently using dynamic programming.
2. BFS cannot be used to find connected components of a graph.
3. Given the prefix and postfix walks over the binary tree, the binary tree cannot be uniquely constructed.
4. DFS can be used to find connected components of a graph.
Choose the correct answer from the options given below:
1
(A) and (C) only
2
(B) and (D) only
3
(D) only
4
(B) only
10
PYQ 2024
medium
data-science-a-i-cyber-security-and-computer-sci ID: cuet-pg-
Match List I with List II.
LIST ILIST II
(A) A* Algorithm(I) Space complexity is O4, where d = depth of the deepest optimal solution.
(B) Recursive Best First Search(II) Incomplete even if the search space is finite.
(C) Recursive Best First Search(III) Optimal, if the optimal solution is reachable, otherwise returns the best reachable optimal solution.
(D) SMA* Algorithm(IV) Computation and space complexity is too high.
Choose the correct answer from the options given below:
1
(A) - (II), (B) - (IV), (C) - (III), (D) - (I)
2
(A) - (III), (B) - (II), (C) - (I), (D) - (IV)
3
(A) - (II), (B) - (III), (C) - (I), (D) - (IV)
4
(A) - (IV), (B) - (I), (C) - (III), (D) - (II)
11
PYQ 2024
medium
data-science-a-i-cyber-security-and-computer-sci ID: cuet-pg-
Equation x2 βˆ’ 1 = 0 is required to be solved using Newton Raphson’s method with an initial guess x0 = βˆ’1. Then after one step of Newton’s method, the estimate x1 of the solution will be given by
1
0.71828
2
0.36784
3
0.20587
4
0.0000