Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
4 views45 pages

Extracted MCQs Part1

Uploaded by

akashmitrasccv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views45 pages

Extracted MCQs Part1

Uploaded by

akashmitrasccv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

Extracted MCQs

Q1. State complexity of the recurrence relation T(n) = 8T(n/2) + n^2

Answer: O (n)

Q2. State which sorting algorithm has not the worst-case time complexity of O(n^2)?

Answer: Selection sort

Q3. Select which of the following statements is true about Prim's Algorithm?

Answer: It uses a depth-first search approach

Q4. Select the purpose of using Prim's algorithm?

Answer: To find the strongly connected components in a directed graph

Q5. Trace the data structure that is used in Prim's Algorithm

Answer: Linked List

Q6. Identify the time complexity of Prim's Algorithm.

Answer: O(V^2)

Q7. Select the main idea behind Prim's Algorithm.

Answer: Starting from the leaf nodes, select the edge with minimum weight and add it to the tree

Q8. Trace which of the following statements is true about Prim's Algorithm.

Answer: It uses a depth-first search approach

Q9. Select why Kruskal's algorithm is used for.

Answer: To find the strongly connected components in a directed graph

Q10. Select the name of the data structure used in Kruskal's Algorithm
Answer: Linked List

Q11. Identify the time complexity of Kruskal's Algorithm.

Answer: O(V^2)

Q12. Predict the main idea behind Kruskal's Algorithm.

Answer: Select the vertex with maximum degree and add all its incident edges to the tree

Q13. Select which of the following statements is true about Kruskal's Algorithm?

Answer: It uses a depth-first search approach

Q14. Identify, DFS of a graph G=(V,E) has running time

Answer: None of these

Q15. Trace, Dijkstra's Algorithm is used to solve _____________ problems.

Answer: Sorting

Q16. Select the most commonly used data structure for implementing Dijkstra's Algorithm

Answer: Min priority queue

Q17. Select the correct option, the Bellman Ford algorithm produces _______ value to return.

Answer:

Q18. Select how many solution/solutions are available for a graph having negative weight cycle

Answer:

Q19. Select the running time of Bellman Ford Algorithm?

Answer:

Q20. Indentify how many times the for loop in the Bellman Ford Algorithm gets executed?

Answer:
Q21. Trace the basic principle behind Bellman Ford Algorithm?

Answer:

Q22. Select the Floyd Warshall's Algorithm and it is used for solving ____________.

Answer:

Q23. Select, the maximum flow problem which can be solved for

Answer:

Q24. Select which one is called the source vertex

Answer:

Q25. Select, which algorithm is recommended to solve a maximum flow problem?

Answer:

Q26. Identify Ford- Fulkerson algorithm establish the idea of

Answer:

Q27. Select, "a simple acyclic path between source and sink which pass through only positive

weighted edges" is recommended to call

Answer:

Q28. Predict what time an augmented path can be found

Answer:

Q29. Identify which stage of algorithm development involves understanding the problem and its

requirements?

Answer: Proof of correctness

Q30. Tell,what is the purpose of designing an algorithm in algorithm development?


Answer: To simplify the problem

Q31. Define what is the purpose of proof of correctness in algorithm development?

Answer: To ensure the algorithm is correct

Q32. Select what is the purpose of identifying a suitable technique in algorithm development?

Answer: To make the algorithm more difficult to understand

Q33. State the purpose of designing of an algorithm in algorithm development?

Answer: To simplify the problem

Q34. Identify the purpose of proof of correctness in algorithm development?

Answer: To ensure the algorithm is correct

Q35. State the notation is used to analyze the running time of an algorithm as the input size

increases?

Answer: Master theorem

Q36. State the purpose of recurrence relation in algorithm development?

Answer: To identify a suitable technique for solving a problem

Q37. Select which method can be used to solve recurrence relations?

Answer: Describing the problem

Q38. Identify, which method can be used to solve recurrence relations when the Master Theorem

cannot be applied?

Answer: Proof of correctness

Q39. Predict the time complexity of Strassen's algorithm for matrix multiplication :

Answer: O(n^4)
Q40. Indicate, which of the following is a disadvantage of Strassen's algorithm for matrix

multiplication?

Answer: It always produces accurate results

Q41. Identify the advantage of Strassen's algorithm for matrix multiplication?

Answer: It has a lower space complexity compared to the conventional algorithm

Q42. Predict the time complexity of building a Huffman tree for a given set of symbols with their

frequencies?

Answer: O(n^3)

Q43. Identify the time complexity of solving the fractional knapsack problem using a greedy

algorithm?

Answer: O(n^3)

Q44. Select the time complexity of the dynamic programming algorithm for solving the matrix chain

multiplication problem?

Answer: O(n^3)

Q45. Show, what is the time complexity of the dynamic programming algorithm for finding the

longest common subsequence (LCS) of two strings of length m and n?

Answer: O(m + n)

Q46. Identify the time complexity of the backtracking algorithm for solving the N-Queens problem?

Answer:

Q47. Identify the time complexity of the dynamic programming algorithm for solving the Travelling

Salesman Problem with n cities?

Answer: O(2^n * n^2)


Q48. Predict the time complexity of the brute-force algorithm for solving the N-Queens problem?

Answer: O(n^n)

Q49. Select the time complexity of the backtracking algorithm for solving the Travelling Salesman

Problem with n cities?

Answer: O(2^n)

Q50. State the set-covering problem?

Answer: A problem in which the goal is to find the largest set of edges that covers all vertices in a

graph.

Q51. Identify which of the following is a common algorithm for the set-covering problem?

Answer: Greedy algorithm.

Q52. Define the vertex cover problem?

Answer: A problem in which the goal is to find the largest set of edges that covers all vertices in a

graph.

Q53. Identify which of the following is a common algorithm for the vertex cover problem?

Answer: Greedy algorithm.

Q54. State ,in the greedy algorithm for the set-covering problem, what is the criterion for choosing

the next set to include in the cover?

Answer: Choose the set that contains the fewest uncovered edges.

Q55. Select the approximation ratio of the greedy algorithm for the set-covering problem?

Answer: N

Q56. Identify, which of the following is true about the vertex cover problem?

Answer: It is an NP-easy problem.


Q57. Select ,which of the following is true about the vertex cover problem in trees?

Answer: It can be solved in exponential time

Q58. State ,which of the following is an approximation algorithm for the vertex cover problem?

Answer: The dynamic programming algorithm

Q59. Calculate the runtime complexity of the greedy algorithm for the vertex cover problem?

Answer:

Q60. Choose,which of the following is true about the vertex cover problem?

Answer:

Q61. Choose ,which of the following is true about the vertex cover problem on a tree?

Answer:

Q62. Select,which of the following is true about the vertex cover problem on a bipartite graph?

Answer:

Q63. Explain what is K-center clustering?

Answer:

Q64. Write the objective of K-center clustering?

Answer:

Q65. Choose what is K-center clustering?

Answer:

Q66. Choose which of the following is a limitation of K-center clustering?

Answer:

Q67. Choose which of the following is a greedy algorithm for K-center clustering?
Answer:

Q68. Select, the greedy algorithm for K-center clustering has a performance guarantee of:

Answer: 1/2

Q69. Define, the hiring problem?

Answer: A problem in which we want to find the optimal allocation of resources among several

projects.

Q70. Select which of the following is a randomized algorithm for the hiring problem?

Answer: Select each candidate with equal probability and select the one with the lowest score.

Q71. Select, what is a cut in a graph?

Answer: A set of vertices and edges that disconnects the graph.

Q72. Select, what is the minimum cut in a graph?

Answer:

Q73. Select, what is the minimum cut in a graph?

Answer: The cut with the minimum sum of vertex degrees.

Q74. Predict, which of the following is a brute-force algorithm for finding the minimum cut in a

graph?

Answer: Use Prim's algorithm to find the minimum spanning tree of the graph.

Q75. Predict, which of the following is true about the performance of the randomized algorithm for

finding the minimum cut in a graph?

Answer:

Q76. Select which of the following is true about the class NP-hard?
Answer: The problems in NP-hard can be solved by probabilistic algorithms in polynomial time.

Q77. Identify which of the following is true about reducibility?

Answer: A problem A is reducible to problem B if both problems can be solved in exponential time.

Q78. Define the meaning of NP-complete?

Answer: NP-complete problems can be solved in polynomial time.

Q79. Identify the difference between NP-complete and NP-hard?

Answer: NP-hard problems can be solved in polynomial time.

Q80. Define vertex cover of a graph?

Answer: A set of vertices that are not connected by edges

Q81. Select which of the following is true about the size of a minimum vertex cover?

Answer: It is always greater than or equal to the number of vertices in the graph

Q82. Identify,which of the following is true about the vertex cover problem?

Answer: It is an NP-complete problem

Q83. Select,which of the following is true about the independent set of a graph?

Answer: A set of vertices that are not connected by edges

Q84. Examine which of the following is true about the size of a maximum independent set?

Answer: It is always greater than or equal to the number of vertices in the graph

Q85. Select which of the following is true about the independent set problem?

Answer: It is an NP-complete problem

Q86. Identify the maximum clique of a graph?

Answer: A set of vertices that are all connected to each other


Q87. Select which of the following is true about the size of a maximum clique?

Answer: It is always greater than or equal to the number of vertices in the graph

Q88. Select which of the following is true about the clique problem?

Answer:

Q89. Identify which of the following algorithms is commonly used to find maximum cliques in a

graph?

Answer:

Q90. Select which of the following is true about the time complexity of finding maximum cliques in a

graph?

Answer:

Q91. Solve which of the following is a brute-force approach to finding maximum cliques in a graph?

Answer:

Q92. Choose which of the following is true about the space complexity of finding maximum cliques

in a graph?

Answer:

Q93. Solve which of the following is an optimization problem related to finding cliques in a graph?

Answer:

Q94. Choose which of the following is true about NP-complete problems?

Answer:

Q95. Choose which of the following is true about the verification step in NP algorithms?

Answer:
Q96. State the current trend in algorithm design?

Answer: Decreasing use of heuristic algorithms.

Q97. Write a common feature of many modern algorithms?

Answer: They are designed to be scalable and work well on large datasets.

Q98. Choose which of the following is a popular optimization algorithm?

Answer: Random forest.

Q99. State the purpose of machine learning algorithms?

Answer: To simplify complex problems by reducing them to a set of rules.

Q100. Choose a key characteristic of genetic algorithms?

Answer: They are designed to work well only on small datasets.

Q101. Choose which of the following is an example of a clustering algorithm?

Answer: Support vector machine.

Q102. Select the purpose of optimization algorithms?

Answer: To randomly generate possible solutions to a problem

Q103. Select a common approach to designing algorithms for large datasets?

Answer: Heuristic algorithms.

Q104. Choose which of the following is a type of supervised learning algorithm?

Answer: Gradient descent.

Q105. Choose from the following the complexity of the recurrence relation T(n) = T(n/4) +T(n/2)+n^2

Answer: O (n)

Q106. State which sorting algorithm has the worst-case time complexity of O(n^2)?
Answer: Selection sort

Q107. Select the time complexity of algorithms in class P?

Answer: O(log n)

Q108. State which of the following is true about class P?

Answer: The problems in P can be solved by probabilistic algorithms in polynomial time.

Q109. Select which algorithm is used to solve the traveling salesman problem?

Answer: Held-Karp algorithm

Q110. Identify the time complexity of brute force algorithm?

Answer: O(2^n)

Q111. Choose the option which of the following problems can be solved using brute force

Answer: None of the above

Q112. Predict which algorithm is a brute force approach to find the longest common substring

between two strings?

Answer: Rabin-Karp algorithm

Q113. Show ,which of the following is an example of brute force approach to find the maximum

subarray sum?

Answer: Floyd-Warshall algorithm

Q114. Predict which of the following is a disadvantage of using brute force approach?

Answer: It is suitable for all types of problems

Q115. Indicate the Traveling Salesman problem (TSP)?

Answer: Finding the longest path that visits every node in a graph exactly once
Q116. Identify which of the following is an example of an approximate algorithm for solving the TSP?

Answer: Nearest neighbor algorithm

Q117. Which of the following is a heuristic algorithm for solving the TSP?

Answer: Floyd-Warshall algorithm

Q118. State which of the following statements is true for the TSP?

Answer: It is an example of a linear programming problem

Q119. Choose which algorithm is used to solve the TSP exactly for small instances?

Answer: Ant colony optimization algorithm

Q120. Explain the basic idea of the Divide and conquer approach?

Answer: Solving a problem by selecting the first feasible solution that is found

Q121. Predict which of the following is an example of a problem that can be solved using the Divide

and conquer approach?

Answer: Checking whether a number is prime or not

Q122. Select ,what is the time complexity of the Merge sort algorithm?

Answer: O(n log n)

Q123. Determine which of the following is not a step in the Divide and conquer approach?

Answer: Randomly select solutions until the optimal solution is found

Q124. Select the time complexity of algorithms in class NP?

Answer: Exponential

Q125. Choose which of the following algorithms uses the Divide and conquer approach to find the

closest pair of points in a plane?


Answer:

Q126. Examine which of the following is a disadvantage of using the Divide and conquer approach?

Answer:

Q127. Choose which of the following is an example of a problem that cannot be solved using the

Divide and conquer approach?

Answer:

Q128. Choose which algorithm uses the Divide and conquer approach to find the median of an

array?

Answer:

Q129. Cite how many solutions are available for a graph having negative weight cycle

Answer:

Q130. Explain the basic idea of the Greedy approach?

Answer:

Q131. Choose which of the following is an example of a problem that can be solved using the

Greedy approach?

Answer:

Q132. Choose which of the following is true about class NP?

Answer:

Q133. Choose which of the following is true about the class NP-complete?

Answer:

Q134. Identify which of the following algorithms uses the Greedy approach to find the shortest path
between two nodes in a graph?

Answer: Dijkstra's algorithm

Q135. Predict which of the following is a disadvantage of using the Greedy approach?

Answer: It has a high time complexity

Q136. Predict which of the following face with local maxima problem

Answer: Divide and Conquer Approach

Q137. Choose which of the following is an example of a problem that cannot be solved using the

Greedy approach?

Answer: Finding the optimal solution to the knapsack problem

Q138. Predict which of the following algorithms uses the Greedy approach to find the Huffman

codes of a set of characters?

Answer: Huffman coding algorithm

Q139. Choose which algorithm uses the Greedy approach to find the optimal sequence of activities

to be scheduled?

Answer:

Q140. Select which of the following is an example of a problem that can be solved using both the

Greedy approach and dynamic programming?

Answer:

Q141. Discuss Knight's Tour on chess?

Answer:

Q142. Explain what is a knight's move on a chessboard?

Answer: Moving two squares horizontally and one square vertically or vice versa
Q143. Identify the smallest chessboard on which a Knight's Tour is possible?

Answer: 10x10

Q144. Predict the maximum number of moves required to complete a Knight's Tour on an 8x8

chessboard?

Answer: 60

Q145. Select which of the following is a common algorithm used to solve the Knight's Tour problem?

Answer: Kruskal's algorithm

Q146. Identify which of the following is not a heuristic used to solve the Knight's Tour problem?

Answer:

Q147. Select which of the following is a key step in solving the Knight's Tour problem using

backtracking?

Answer:

Q148. Predict the time complexity of the brute force algorithm for solving the Knight's Tour problem?

Answer: O(n log n)

Q149. Select which of the following is a disadvantage of using the brute force algorithm for solving

the Knight's Tour problem?

Answer:

Q150. Estimate the time complexity of Strassen's algorithm for matrix multiplication : Calculate the

time complexity of Strassen's algorithm for matrix multiplication :

Answer:

Q151. int a = 0, b = 0; for (i = 0; i < N; i++) { a = a + rand(); } for (j = 0; j < M; j++) { b = b + rand(); }

Answer: O(N * M) time, O(N + M) space


Q152. Examine it's meaning when we say that an algorithm X is asymptotically more efficient than

Y?

Answer: X will always be a better choice for all inputs

Q153. Observe the time complexity of the following code: int a = 0, i = N; while (i > 0) { a += i; i /= 2;

Answer: O(log N)

Q154. Choose which of the following best describes the useful criterion for comparing the efficiency

of algorithms?

Answer: None of the above

Q155. Describe how is the complexity of time measured?

Answer: None of the above

Q156. Examine it is True or False: Algorithm A and B have a worst-case running time of O(n) and

O(logn), respectively. Therefore, algorithm B always runs faster than algorithm A.

Answer: FALSE

Q157. Cite an algorithm used for finding all pair shortest paths in a graph.

Answer: Floyd-Warshall Algorithm

Q158. Identify the primary focus of the Floyd-Warshall Algorithm.

Answer: Maximum flow in a network

Q159. Select a graph traversal technique used in the Ford-Fulkerson Algorithm.

Answer: Bellman-Ford Algorithm

Q160. Trace the steps involved in the Ford-Fulkerson Algorithm.

Answer: Compilation
Q161. Cite the algorithm known for solving the maximum flow problem in a network.

Answer: Dijkstra\'s Algorithm

Q162. Identify a key concept in flow networks.

Answer: Minimum cut

Q163. Select the correct statement about the Push-Relabel Algorithm.

Answer: It is used for maximum flow in a network

Q164. Trace the process of cycle canceling in the Cycle Cancelling Algorithm.

Answer: Compute shortest paths

Q165. Cite the algorithm commonly used for finding minimum cost flows in a network.

Answer: Cycle Cancelling Algorithm

Q166. Identify a disadvantage of the Ford-Fulkerson Algorithm.

Answer: It is a shortest path algorithm

Q167. Select a characteristic of the Push-Relabel Algorithm.

Answer: It maintains a preflow

Q168. Trace the role of augmenting paths in the Ford-Fulkerson Algorithm.

Answer: Compilation

Q169. Cite an application of the Floyd-Warshall Algorithm.

Answer: Sorting algorithms

Q170. Identify a limitation of the Cycle Cancelling Algorithm.

Answer: It is a shortest path algorithm

Q171. Select a property of flow networks.


Answer: The flow is constant throughout the network

Q172. Trace the primary objective of the Push-Relabel Algorithm.

Answer: Canceling cycles in the residual graph

Q173. Cite the algorithm used for finding the minimum cut in a flow network.

Answer: Ford-Fulkerson Algorithm

Q174. Identify a scenario where the Ford-Fulkerson Algorithm is commonly applied.

Answer: Minimum spanning tree

Q175. Select the correct statement about the Cycle Cancelling Algorithm.

Answer: It is a greedy algorithm

Q176. Trace the impact of augmenting the flow in the Ford-Fulkerson Algorithm.

Answer: Terminate the algorithm

Q177. Cite an advantage of the Push-Relabel Algorithm.

Answer: It is efficient for large graphs

Q178. Identify a situation where the Floyd-Warshall Algorithm is not the most efficient choice.

Answer: Small-sized networks

Q179. Select the correct statement about the Ford-Fulkerson Algorithm.

Answer: It is a shortest path algorithm

Q180. Trace the concept of residual graph in the Ford-Fulkerson Algorithm.

Answer: It is used for sorting

Q181. Cite a scenario where the Cycle Cancelling Algorithm is commonly used.

Answer: Network flow optimization


Q182. Identify a limitation of the Push-Relabel Algorithm.

Answer: It is inefficient for large graphs

Q183. Select a property of the residual graph in the Ford-Fulkerson Algorithm.

Answer: It contains edges with available capacity

Q184. Trace the role of the Cycle Cancelling Algorithm in solving network flow problems.

Answer: Sorting elements

Q185. Cite an example of a problem that can be modeled using flow networks.

Answer: Maximum flow problem

Q186. Identify a key aspect of the Ford-Fulkerson Algorithm.

Answer: It is used for sorting

Q187. Trace the significance of the residual graph in the Ford-Fulkerson Algorithm.

Answer: Canceling cycles in the residual graph

Q188. Cite an application of the Push-Relabel Algorithm.

Answer: Network flow optimization

Q189. Identify a key characteristic of the Cycle Cancelling Algorithm.

Answer: It is a greedy algorithm

Q190. Select a scenario where the Floyd-Warshall Algorithm is commonly used.

Answer: Dense graphs

Q191. Trace the process of augmenting paths in the Ford-Fulkerson Algorithm.

Answer: Compilation

Q192. Cite the key concept behind the Ford-Fulkerson Algorithm.


Answer: Sorting elements

Q193. Select a characteristic of flow networks.

Answer: The flow is constant throughout the network

Q194. select ,The worst-case efficiency of solving a problem in polynomial time is?

Answer: O(p(m log n))

Q195. Select the correct answer, _______ is the class of decision problems that can be solved by

non-deterministic polynomial algorithms.

Answer: Complete

Q196. The Euler's circuit problem can be explain in?

Answer: O(N2

Q197. Identify the class does the Euler's circuit problem belong?

Answer: Complete class

Q198. Select , Halting problem is an example for?

Answer: trackable problem

Q199. Indicate How many conditions have to be met if an NP- complete problem is polynomially

reducible?

Answer: 4

Q200. Select the following class does a CNF-satisfiability problem belong?

Answer: NP hard

Q201. Identify ,Which of the following problems is not NP complete?

Answer: Halting problem


Q202. Apply the Rabin-Karp Algorithm to find the first occurrence of the pattern "abc" in the text

"abcbabcbabccba".

Answer: The first occurrence of "abc" in the text is at index 1 and 2

Q203. Apply the Nave String Matching Algorithm to find all occurrences of the pattern "aba" in the

text "abababab".

Answer: Occurrences of "aba" in the text: (0, 2), (2, 1), (4, 6)

Q204. Select the primary objective of string matching algorithms from the following options?

Answer: The primary objective is to locate occurrences of a part of sub string within a text string.

Q205. Choose from the following the real life example of KMP algorithm

Answer: it will work not well in string matching

Q206. Determine the worst case complexity of KMP algorithm

Answer: O(m(n-m))

Q207. Identify which of the following algorithms is used to find the maximum flow in a network with

capacities that can be increased or decreased by a real number(Probable duplicate)

Answer: Kruskal's algorithm

Q208. Identify which of the following algorithms is used to find the shortest path between two

vertices in a graph with positive and negative edgese

Answer: Bellman-Ford algorithm

Q209. Identify which of the following algorithms is used to find the maximum matching in a general

graph

Answer: Dinic's algorithm

Q210. Examine which of the following algorithms is used to find the bridges in an undirected graph
Answer: Tarjan's algorithm

Q211. Identify which of the following algorithms is used to find the maximum flow in a network with

capacities that can be increased or decreased by a real number(Probable duplicate)

Answer: Kruskal's algorithm

Q212. State down all the cases of master theorem.

Answer:

Q213. State Recurrence relation with an example?

Answer:

Q214. Define complexity of an algorithm, with an example?

Answer:

Q215. Describe any three characteristics of an Algorithm?

Answer:

Q216. Define Space Analysis, explain with an example?

Answer:

Q217. How do we measure the correctness of an Algorithm?

Answer:

Q218. Define Time Complexity ? explain with an example

Answer:

Q219. State the differences between time complexity and space complexity.

Answer:

Q220. Analyze complexity of the recurrence relation T(n) = 4T(n/2) +n2


Answer:

Q221. Write the steps to sort using merge sort method: 5,3,8,1,4,6,2,7

Answer:

Q222. Explain algorithm.

Answer:

Q223. Analyze the result of the recurrences which fall under the first case of Master's theorem (let

the recurrence be given by T(n)=aT(n/b)+f(n) and f(n)=nc?

Answer:

Q224. Compare dynamic programming and divide and conquer approach

Answer:

Q225. Discuss dynamic programming approach.

Answer:

Q226. Discuss the criteria on which the measures of complexity depend.

Answer:

Q227. Explain the traveling salesman problem?

Answer:

Q228. Write the basic characteristic of dynamic programming?

Answer:

Q229. Explain the basic concept of divide & conquer algorithm.

Answer:

Q230. Calculate the min and max term of the following array using Divide and conquer approach
{9,6,4,7,10,14,8,11}

Answer:

Q231. Write the steps to solve the 4-queens problem by backtracking method. For each step draw

the 4x4 matrix showing the positions of queens in it.

Answer:

Q232. Explain the basic concept of divide & conquer algorithm

Answer:

Q233. Explain the concept of divide & conquer algorithm with an example.

Answer:

Q234. Analyze how backtracking related with recursion

Answer:

Q235. Analyze the steps involved for the 4-queen problem using Backtracking

Answer:

Q236. T(n) = 2T(n/2) + O(n) where n>0, T(n) = 1 where n = 0. Explain the recurrence relation using

substitution method

Answer:

Q237. Write the algorithm of application of merge sort.

Answer:

Q238. Define KMP algorithm.

Answer:

Q239. Define Rabin-Karp algorithm


Answer:

Q240. Write down the KMP Algorithm for String Matching Problem and define the time complexity of

it.

Answer:

Q241. Discuss Substitution Method with an example?

Answer:

Q242. Solve for the all pair of shortest path using Floyd's Algorithm

Answer:

Q243. Explain traveling salesman problem?

Answer:

Q244. Compute the differences between Bellman Ford and Dijkstra algorithm?

Answer:

Q245. Describe maximum clique.

Answer:

Q246. Describe NP Hard.

Answer:

Q247. Describe NP Complete.

Answer:

Q248. Define 3SAT.

Answer:

Q249. Define complexity classes.


Answer:

Q250. Define reducibility in the context of computational complexity?

Answer:

Q251. Define the SAT problem?

Answer:

Q252. Is Vertex Cover in NP-complete? Explain

Answer:

Q253. Explain the Vertex Cover problem?

Answer:

Q254. Explain independent set.

Answer:

Q255. Explain Class P

Answer:

Q256. Define K-center clustering problem?

Answer:

Q257. Define hiring problem?

Answer:

Q258. Define global minimum cut of a graph?

Answer:

Q259. State minimum cut of a graph?

Answer:
Q260. State set-covering problem related to vertex cover?

Answer:

Q261. Justify approximation algorithm?

Answer:

Q262. Explain graph traversal algorithm.

Answer:

Q263. Identify the optimal parenthesization of a matrix chain product whose sequence of

dimensions is (5, 10, 3, 12, 5, 50, 6). Give an algorithm of the above procedure. Analyze its

complexity.

Answer:

Q264. Explain knapsack problem, and their types.

Answer:

Q265. Write the general Knapsack problem. Derive its time complexity.

Answer:

Q266. Examine the optimal solution using greedy criteria for Knapsack having capacity 100 kg for

the following list of items having values and weights as shown in the table

Answer:

Q267. Items

Answer:

Q268. Value

Answer:
Q269. Weight

Answer:

Q270. Summarize What is the main objective of approximation algorithms in the context of the

set-covering problem?

Answer:

Q271. Illustarte advanced number theoretic Algorithm.

Answer:

Q272. Explain Chinese Reminder Theorem

Answer:

Q273. Illustrate advanced number theoretic Algorithm

Answer:

Q274. Explain Fast Fourier theorem

Answer:

Q275. Explain few applications of spanning trees with example

Answer:

Q276. List the main limitation of the Nave String Matching Algorithm.

Answer:

Q277. Explain the fundamental idea behind the Knuth-Morris-Pratt (KMP) algorithm.

Answer:

Q278. Differentiate between the Rabin-Karp Algorithm and the Nave String Matching Algorithm.

Answer:
Q279. Compare and contrast the time complexity of the Nave String Matching Algorithm and the

KMP algorithm.

Answer:

Q280. Analyze the impact of pattern length on the performance of the Rabin-Karp Algorithm.

Answer:

Q281. Evaluate the significance of preprocessing in the KMP algorithm and its effect on overall

efficiency.

Answer:

Q282. Examine the advantages and disadvantages of using the Rabin-Karp Algorithm for multiple

pattern searches

Answer:

Q283. Design a pseudocode implementation for the Nave String Matching Algorithm.

Answer:

Q284. Compare and contrast the time complexity of the Nave String Matching Algorithm and the

Rabin-Karp Algorithm.

Answer:

Q285. Explain why the Knuth-Morris-Pratt (KMP) algorithm is more efficient than the Nave String

Matching Algorithm.

Answer:

Q286. Differentiate between the Rabin-Karp Algorithm and the Nave String Matching Algorithm in

terms of their approach to pattern matching.

Answer:
Q287. Critically judge the impact of text length and pattern length on the performance of the Nave

String Matching Algorithm.

Answer:

Q288. Examine the way of application of the Nave String Matching Algorithm to find all occurrences

of a pattern within a given text string?

Answer:

Q289. Describe a scenario where you would prefer to use the Rabin-Karp Algorithm over the Nave

String Matching Algorithm.

Answer:

Q290. Write why the Nave String Matching Algorithm called "nave"?

Answer:

Q291. Explain the basic idea behind the Nave String Matching Algorithm?

Answer:

Q292. Write the difference between 0/1 Knapsack and Fractional Knapsack ?

Answer:

Q293. Compare Floyd-Warshall and Ford-Fulkerson algorithms.

Answer:

Q294. Describe the Flow Networks concept.

Answer:

Q295. Differentiate between Push-Relabel and Cycle Cancelling algorithms.

Answer:
Q296. Discuss the concept of graph traversal techniques.

Answer:

Q297. Distinguish between Maximum Flows and Minimum Cost Flows.

Answer:

Q298. Explain the Floyd-Warshall algorithm.

Answer:

Q299. Express the idea of Ford-Fulkerson algorithm.

Answer:

Q300. Illustrate the concept of Network Flows.

Answer:

Q301. Select the appropriate algorithm for finding all pair shortest paths in a weighted graph.

Answer:

Q302. Show how the Ford-Fulkerson algorithm works.

Answer:

Q303. Summarize the main idea behind the Push-Relabel algorithm.

Answer:

Q304. Compare the efficiency of Cycle Cancelling and Ford-Fulkerson algorithms.

Answer:

Q305. Describe the concept of Minimum Cost Flows.

Answer:

Q306. Discuss the significance of Floyd-Warshall algorithm in real-world applications.


Answer:

Q307. Choose the appropriate algorithm for finding the maximum flow in a network.

Answer:

Q308. Compare Floyd-Warshall and Push-Relabel algorithms in terms of their efficiency.

Answer:

Q309. Decide between Ford-Fulkerson and Push-Relabel algorithms for finding maximum flows.

Answer:

Q310. Distinguish between Ford-Fulkerson and Cycle Cancelling algorithms.

Answer:

Q311. Define the difference between linear and binary search with example

Answer:

Q312. Define the different types of complexity of algorithms and also define the criteria on which the

measures of complexity depends?

Answer:

Q313. Define an algorithm with an example and state the characteristics of the Algorithm.

Answer:

Q314. Define the different stages of algorithm for solving a problem with suitable example

Answer:

Q315. Define recurrence relation using recursion tree method

Answer:

Q316. Analyze all asymptotic notations with diagrams.


Answer:

Q317. Analyze recursive and non-recursive method with proper example

Answer:

Q318. Analyze recurrence relation with Masters theorem.

Answer:

Q319. Analyze Substitution method using suitable example

Answer:

Q320. Analyze different types of recursion with proper examples.

Answer:

Q321. Explain divide and conquer method to find maximum and minimum in a given array.

Answer:

Q322. Explain backtracking technique using 4x4 N queen's problem.

Answer:

Q323. Explain Huffman coding technique for data compression with example.

Answer:

Q324. Explain Matrix chain multiplication using dynamic programming method

Answer:

Q325. Explain Traveling salesman problem using Dynamic programming method A is the Starting

Node.

Answer:

Q326. Compare greedy and dynamic programming techniques in knapsack problems


Answer:

Q327. Compare 0/1 knapsack problem with fractional knapsack problem

Answer:

Q328. Compare Brute Force Algorithm,Greedy technique and dynamic programming method in

solving traveling salesman problem.

Answer:

Q329. Compare Naive and KMP string matching techniques.

Answer:

Q330. Discuss all pair shortest path using Floyd Warshall Algorithm.

Answer:

Q331. Discuss Network flows with example

Answer:

Q332. Discuss maximum flow in a flow network with a graph diagram

Answer:

Q333. Discuss minimum cost flows with example

Answer:

Q334. Discuss the usage of maximum flow and minimum flow cost with example

Answer:

Q335. Analyze Cycle Cancelling Algorithm with proper example

Answer:

Q336. Analyze Maximum flows and minimum cost flows with suitable problem
Answer:

Q337. Analyze Push Relabel algorithm with proper example

Answer:

Q338. Discuss how to find the complexity classes of an algorithm

Answer:

Q339. Discuss the features of different complexity classes

Answer:

Q340. Discuss whether 3-SAT is NP-complete or not

Answer:

Q341. Discuss Maximum clique in complexity class and also state maximum size of a clique

Answer:

Q342. Discuss reducibility in NP-completeness

Answer:

Q343. Analyze vertex cover problem with suitable example

Answer:

Q344. Analyze independent set in complexity classes

Answer:

Q345. Analyze the difference between 3-SAT and SAT techniques in complexity classes.

Answer:

Q346. Define Approximation Algorithm

Answer:
Q347. Define Randomized Algorithm

Answer:

Q348. Evaluate the set covering problem using Greedy Approximation method

Answer:

Q349. How to evaluate k-center clustering algorithm

Answer:

Q350. Evaluate the probabilistic analysis of the hiring problem

Answer:

Q351. How to evaluate the Global Minimum Cut Problem

Answer:

Q352. Evaluate vertex cover problem in approximation algorithm with an example

Answer:

Q353. Evaluate probabilistic analysis in design and analysis of algorithm

Answer:

Q354. Evaluate job hiring problem to implement randomization technique

Answer:

Q355. Discuss traveling salesman problem using dynamic programming is NP complete or not

Answer:

Q356. Discuss employee hiring problem in a company using randomized algorithm

Answer:

Q357. Solve to find the minimum number ofoperations required for the following matrixchain
multiplication using dynamicprogramming and also find complexityA(10X30) * B(30X50) * C(50X10)

*D(10X90)

Answer:

Q358. Solve for the all pair of shortest path using Floyd's Algorithm and also find complexity

Answer:

Q359. Solve the following table using greedy method for fractional Knapsack having capacity 60 kg

for the following list of items having values and weights as shown in the table

Answer:

Q360. Items

Answer:

Q361. Value

Answer:

Q362. Weight

Answer:

Q363. Solve the following to compress the data using Huffman Coding The Characters are

F,E,C,B,D,A having frequency 6,10,13,14,17,46 respectively

Answer:

Q364. Define What is matroid? Illustrate any two greedy algorithm techniques

Answer:

Q365. Write an algorithm to compute maximum weight and minimal independent set.

Answer:
Q366. Illustrate prims technique with an algorithm

Answer:

Q367. Write an algorithm to find out the maximum matching in graphs

Answer:

Q368. Illustrate what is the augmenting path. How it is computed with the Edmonds Blossom

Algorithm

Answer:

Q369. Explain a few applications of spanning trees with an example

Answer:

Q370. Illustrate any three graph applications with algorithms.(Probable duplicate)

Answer:

Q371. Discuss the difference between the following a)Chromatic numbers in scheduling [6M]

b)Directed acyclic graphs in planning activities

Answer:

Q372. Evaluate the Set-Covering problem in the context of approximation algorithms with example.

Answer:

Q373. Explain the concept of Vertex Cover in graph theory and its relevance in approximation

algorithms.

Answer:

Q374. Analyze the hiring problem as a randomized algorithm.

Answer:
Q375. Summarize the K-center clustering problem and elaborate on its significance in data

clustering and approximation algorithms.

Answer:

Q376. Evaluate the concept of finding the global Minimum Cut in graph theory and algorithm design.

Answer:

Q377. Discriminate the approaches used in approximation algorithms for solving the Vertex Cover

problem and the K-center clustering problem.

Answer:

Q378. Explain the following in detail a)Huffman coding and compression b)Travelling salesperson

problem

Answer:

Q379. Illustrate any three graph applications with algorithms.(Probable duplicate)

Answer:

Q380. Illustrate Chromatic numbers in scheduling

Answer:

Q381. Illustrate directed acyclic graphs in planning activities

Answer:

Q382. Illustrate the Edmond-Karp maximum-flow algorithm

Answer:

Q383. Illustrate matroid. Illustrate any two greedy algorithm techniques

Answer:
Q384. Explain interpolation problem in detail.

Answer:

Q385. Illustrate polynomial multiplication and division algorithms

Answer:

Q386. Discuss any Randomized algorithms

Answer:

Q387. Write in detail about Interior point Method

Answer:

Q388. Apply the Knuth-Morris-Pratt (KMP) algorithm to find the first occurrence of the pattern "aba"

in the text "ababababab". Provide a detailed explanation of the algorithm's steps, including

preprocessing, character comparisons, and the determination of shifts.

Answer:

Q389. Analyze the advantages and disadvantages of using the Rabin-Karp Algorithm for multiple

pattern searches within a single text string. Discuss its efficiency, potential challenges, and factors

influencing its performance.

Answer:

Q390. Apply the Nave String Matching Algorithm to find all occurrences of the pattern "aba" in the

text "abababab". Demonstrate the steps involved, including comparisons made at each step and any

shifts in the pattern.

Answer:

Q391. Analyze the significance of preprocessing in the Knuth-Morris-Pratt (KMP) algorithm and its

impact on overall efficiency. Discuss how preprocessing helps reduce unnecessary comparisons
and improves the algorithm's performance.

Answer:

Q392. Apply the Knuth-Morris-Pratt (KMP) algorithm to find all occurrences of the pattern "aba" in

the text "ababababab". Illustrate the steps involved, including preprocessing and character

comparisons.

Answer:

Q393. Analyze the impact of pattern length on the performance of the Rabin-Karp Algorithm.

Discuss how longer patterns affect the efficiency of the algorithm and potential challenges

encountered.

Answer:

Q394. Apply the Nave String Matching Algorithm to find all occurrences of the pattern "aba" in the

text "ababababab". Provide a step-by-step explanation of your approach, including the comparisons

made at each step.

Answer:

Q395. Analyze the efficiency of the Knuth-Morris-Pratt (KMP) algorithm compared to the Nave String

Matching Algorithm when searching for a pattern in a text. Provide insights into why the KMP

algorithm is more efficient and discuss its time complexity.

Answer:

Q396. Discuss important problem types that you face during Algorithm Analysis.

Answer:

Q397. Define is matroid. Illustrate any two greedy algorithm techniques

Answer:
Q398. Write an algorithm to find out maximum matching in graphs

Answer:

Q399. Write notes on augmenting path. How it is computed with Edmonds Blossom Algorithm.

Answer:

Q400. Illustrate few applications of spanning trees with example

Answer:

Q401. Illustrate Edmond-Karp maximum-flow algorithm

Answer:

Q402. Illustarate LUP-Decomposition in detail

Answer:

Q403. Write notes on pre-flow push maximum algorithm

Answer:

Q404. Write notes on Bipatite matching problem

Answer:

Q405. Describe the Floyd-Warshall algorithm.

Answer:

Q406. Differentiate between Ford-Fulkerson and Push-Relabel.

Answer:

Q407. Discuss the concept of flow networks.

Answer:

Q408. Distinguish between Ford-Fulkerson and Cycle Cancelling


Answer:

Q409. Explain the Ford-Fulkerson algorithm.

Answer:

Q410. Express the concept of maximum flows.

Answer:

Q411. Illustrate the Push-Relabel algorithm.

Answer:

Q412. Select an appropriate algorithm for minimum cost flows.

Answer:

Q413. Show the application of Floyd-Warshall algorithm.

Answer:

Q414. Decide which algorithm is more suitable for finding the minimum cost flow in a given network.

Answer:

Q415. Distinguish between the Ford-Fulkerson algorithm and the Push-Relabel algorithm.

Answer:

Q416. Evaluate the significance of graph traversal techniques in various applications.

Answer:

Q417. Justify the use of the Floyd-Warshall algorithm over other algorithms for certain problems.

Answer:

Q418. Compare the computational complexity of the Ford-Fulkerson algorithm with the

Push-Relabel algorithm.
Answer:

Q419. Judge the effectiveness of the Ford-Fulkerson algorithm compared to the Push-Relabel

algorithm for finding maximum flows in flow networks.

Answer:

You might also like