Daa
Daa
State complexity of the recurrence relation T(n) = 8T(n/2) + n^2 O (n^2 )(N)
O ( log n)(N)
O (n^3 )(Y)
O (n)(N)
State which sorting algorithm has not the worst-case time Quick sort(N)
complexity of O(n^2)?
Merge sort(Y)
Insertion sort(N)
Selection sort(N)
Select which of the following statements is true about Prim's It is a greedy algorithm(Y)
Algorithm?
Select the purpose of using Prim's algorithm? To find the shortest path between
two nodes in a graph(N)
Stack(N)
Heap(Y)
Linked List(N)
O(E^2)(N)
O(V^2)(N)
Select the main idea behind Prim's Algorithm. Starting from any vertex, select the
edge with minimum weight and
add it to the tree(Y)
Trace which of the following statements is true about Prim's It is a greedy algorithm(Y)
Algorithm.
Select why Kruskal's algorithm is used for. To find the shortest path between
two nodes in a graph(N)
Stack(N)
Heap(Y)
O(E^2)(N)
O(V^2)(N)
Predict the main idea behind Kruskal's Algorithm. Starting from any vertex, select the
edge with minimum weight and
add it to the tree(N)
Select which of the following statements is true about Kruskal's It is a greedy algorithm(Y)
Algorithm?
O(|E|)(N)
Identify, DFS of a graph G=(V,E) has running time
O(|V|)(N)
None of these(N)
Trace, Dijkstra’s Algorithm is used to solve _____________ All pair shortest path(N)
problems.
Network flow(N)
Sorting(N)
Select the most commonly used data structure for implementing Max priority queue(N)
Dijkstra’s Algorithm
Stack(N)
Circular queue(N)
Select the correct option, the Bellman Ford algorithm produces Boolean
_______ value to return.
(Y)
Integer
(N)
String
(N)
Double
(N)
Select how many solution/solutions are available for a graph One solution
having negative weight cycle
(N)
Two solutions
(N)
No solution
(Y)
Infinite solutions
(N)
(N)
O(V2)
(N)
O(ElogV)
(N)
O(VE)
(Y)
Indentify how many times the for loop in the Bellman Ford V times
Algorithm gets executed?
(N)
Indentify how many times the for loop in the Bellman Ford
Algorithm gets executed?
V-1
(Y)
(N)
E-1
(N)
(N)
Extrapolation
(N)
Regression
(N)
Relaxation
(Y)
Select the Floyd Warshall’s Algorithm and it is used for solving All pair shortest path problems
____________.
(Y)
(N)
Sorting problems
(N)
Select, the maximum flow problem which can be solved for finding a flow between source and
sink that is maximum
(Y)
(N)
(N)
(N)
Select which one is called the source vertex Vertex with no incoming edges
(Y)
(N)
Centre vertex
(N)
(N)
Select, which algorithm is recommended to solve a maximum Prim’s algorithm
flow problem?
(N)
Kruskal’s algorithm
(N)
Dijkstra’s algorithm
(N)
Ford-Fulkerson algorithm
(Y)
Identify Ford- Fulkerson algorithm establish the idea of Naïve greedy algorithm approach
(N)
Residual graphs
(N)
Minimum cut
(Y)
(N)
Select, "a simple acyclic path between source and sink which augmenting path
pass through only positive weighted edges” is recommended to
call
(Y)
Critical path
(N)
residual path
(N)
maximum path
(N)
Predict what time an augmented path can be found O(|E| log |V|)
(N)
O(|E|)
(Y)
O(|E|2)
(N)
(N)
Identify which stage of algorithm development involves Describing the problem (Y)
understanding the problem and its requirements?
Proof of correctness(N)
Define what is the purpose of proof of correctness in algorithm To ensure the algorithm is
development? efficient(N)
Select what is the purpose of identifying a suitable technique in To make the algorithm more
algorithm development? complex (N)
State the notation is used to analyze the running time of an Proof of correctness(N)
algorithm as the input size increases?
Asymptotic notation(Y)
Recurrence relation(N)
Master theorem(N)
State the purpose of recurrence relation in algorithm To analyze the running time of an
development? algorithm(Y)
Select which method can be used to solve recurrence relations? Proof of correctness(N)
Substitution method(Y)
Select which method can be used to solve recurrence relations?
Design of an algorithm(N)
Identify, which method can be used to solve recurrence relations Substitution method(N)
when the Master Theorem cannot be applied?
Proof of correctness(N)
O(n^2)(N)
O(n^3)(Y)
O(n^4)(N)
Indicate, which of the following is a disadvantage of Strassen’s It has a high space complexity(N)
algorithm for matrix multiplication?
O(n^2)(N)
O(n^3)(N)
O(n^2) (N)
O(n^3)(N)
O(n^2) (N)
O(n^3) (Y)
Show, what is the time complexity of the dynamic programming O(m) (N)
algorithm for finding the longest common subsequence (LCS) of
two strings of length m and n?
O(n) (N)
O(mn) (Y)
O(m + n)(N)
O(n log n)
(N)
O(n^2)
(N)
O(n^n)
(Y)
O(n^2) (N)
O(n^2)(N)
O(n^n)(Y)
Select the time complexity of the backtracking algorithm for O(n) (N)
solving the Travelling Salesman Problem with n cities?
O(n!)(Y)
O(2^n)(N)
Identify which of the following is a common algorithm for the Dijkstra's algorithm.(N)
set-covering problem?
Identify which of the following is a common algorithm for the
set-covering problem?
Kruskal's algorithm.(N)
Greedy algorithm.(Y)
Identify which of the following is a common algorithm for the Dijkstra's algorithm.(N)
vertex cover problem?
Prim's algorithm.(N)
Greedy algorithm.(Y)
State ,in the greedy algorithm for the set-covering problem, what Choose the set that contains the
is the criterion for choosing the next set to include in the cover? most uncovered vertices. (Y)
Select the approximation ratio of the greedy algorithm for the 1(N)
set-covering problem?
2(Y)
In(n) (N)
N(N)
Identify, which of the following is true about the vertex cover It is an NP-hard problem. (N)
problem?
It is an NP-easy problem.(N)
Select ,which of the following is true about the vertex cover It can be solved in polynomial
problem in trees? time(Y)
It is an NP-hard problem.(N)
It is an NP-complete problem(N)
Calculate the runtime complexity of the greedy algorithm for the O(n)
vertex cover problem?
(Y)
O(n log n)
(N)
O(n^2)
(N)
O(2^n)
(N)
Choose,which of the following is true about the vertex cover It is a special case of the set-
problem? covering problem.
(N)
(N)
(Y)
Choose ,which of the following is true about the vertex cover The optimal vertex cover has size
problem on a tree? n/2, where n is the number of
vertices in the tree.
(Y)
(N)
(N)
(N)
Select,which of the following is true about the vertex cover The optimal vertex cover has size
problem on a bipartite graph? n/2, where n is the number of
vertices in the graph.
(Y)
(N)
The optimal vertex cover has size
2, regardless of the number of
vertices in the graph
(N)
(N)
(N)
(Y)
(N)
(N)
(N)
To maximize the distance between
data points in each cluster.
(N)
(Y)
(N)
(N)
(Y)
(N)
(N)
Choose which of the following is a limitation of K-center It cannot handle non-convex
clustering? clusters.
(N)
(N)
(N)
(Y)
Choose which of the following is a greedy algorithm for K- Select the data point farthest from
center clustering? all existing centers and add it as a
new center
(Y)
(N)
(N)
(N)
Select, the greedy algorithm for K-center clustering has a 2(Y)
performance guarantee of:
3/2(N)
1(N)
1/2(N)
Select which of the following is a randomized algorithm for the Always select the first candidate as
hiring problem? the best candidate.(N)
Select, what is the minimum cut in a graph? A path between two vertices.
(N)
(N)
(Y)
(N)
Select, what is the minimum cut in a graph? The cut with the minimum number
of edges. (N)
Predict, which of the following is a brute-force algorithm for Enumerate all possible cuts and
finding the minimum cut in a graph? select the one with the minimum
weight.(Y)
Predict, which of the following is true about the performance of It always finds the minimum cut.
the randomized algorithm for finding the minimum cut in a
graph?
(N)
(N)
(Y)
Select which of the following is true about the class NP-hard? The problems in NP-hard can be
solved by deterministic algorithms
in polynomial time. (N)
A problem A is reducible to
problem B if an algorithm for A
can be used to solve B. (N)
A problem A is reducible to
problem B if both problems can be
solved in polynomial time. (N)
A problem A is reducible to
problem B if both problems can be
solved in exponential time. (N)
Identify the difference between NP-complete and NP-hard? NP-complete problems are a
subset of NP-hard pro,blems. (Y)
Select which of the following is true about the size of a It is always equal to the number of
minimum vertex cover? vertices in the graph (N)
minimum vertex cover?
Identify,which of the following is true about the vertex cover It can be solved in polynomial
problem? time for any graph (N)
Select,which of the following is true about the independent set A set of vertices that are not
of a graph? adjacent to each other(N)
Examine which of the following is true about the size of a It is always equal to the number of
maximum independent set? vertices in the graph (N)
maximum independent set?
Select which of the following is true about the independent set It can be solved in polynomial
problem? time for any graph (N)
It is an NP-complete problem(Y)
Identify the maximum clique of a graph? A set of vertices that are not
adjacent to each other(N)
Select which of the following is true about the size of a It is always equal to the number of
maximum clique? vertices in the graph (N)
maximum clique?
Select which of the following is true about the clique problem? It can be solved in polynomial
time for any graph
(N)
(N)
It is an NP-hard problem
(Y)
It is an NP-complete problem
(N)
Depth-first search
(Y)
Dijkstra's algorithm
(N)
Kruskal's algorithm
(N)
Select which of the following is true about the time complexity It can always be done in
of finding maximum cliques in a graph? polynomial time
(N)
It is always an NP-complete
problem
(N)
(Y)
(N)
Dijkstra's algorithm
(N)
Kruskal's algorithm
(N)
(Y)
Choose which of the following is true about the space It is always polynomial in the size
complexity of finding maximum cliques in a graph? of the graph
(N)
(N)
(Y)
It is always constant
(N)
Solve which of the following is an optimization problem related Finding the shortest path between
to finding cliques in a graph? two vertices
(N)
(N)
(N)
(Y)
Choose which of the following is true about NP-complete They are easier to solve than NP
problems? problems
Choose which of the following is true about NP-complete
problems?
(N)
(Y)
(N)
(N)
Choose which of the following is true about the verification step It is used to find a solution to the
in NP algorithms? problem
(N)
(Y)
(N)
(N)
State the current trend in algorithm design? Increasing reliance on brute force
approaches. (N)
Focusing on optimization
techniques. (Y)
Increasing use of machine learning
algorithms.(N)
Write a common feature of many modern algorithms? They are designed to work well on
small datasets. (N)
Gradient descent.(Y)
Select a common approach to designing algorithms for large Brute force methods(N)
datasets?
Select a common approach to designing algorithms for large
datasets?
Choose which of the following is a type of supervised learning K-means clustering (N)
algorithm?
Choose from the following the complexity of the recurrence θ (n^2 ) (Y)
relation T(n) = T(n/4) +T(n/2)+n^2
O ( log n)(N)
O (n^3 )(N)
O (n)(N)
State which sorting algorithm has the worst-case time Quick sort (N)
complexity of O(n^2)?
O(n^2) (N)
O(n) (Y)
O(log n) (N)
State which of the following is true about class P? The problems in P can be solved
by deterministic algorithms in
polynomial time. (N)
Select which algorithm is used to solve the traveling salesman Kruskal's algorithm(N)
problem?
Bellman-Ford algorithm(N)
Floyd-Warshall algorithm(N)
Held-Karp algorithm(Y)
O(log n) (N)
O(n^2)(N)
O(2^n) (Y)
Choose the option which of the following problems can be Traveling salesman problem(N)
solved using brute force
Knapsack problem(N)
Predict which algorithm is a brute force approach to find the Boyer-Moore algorithm (N)
longest common substring between two strings?
Naive algorithm(Y)
Rabin-Karp algorithm(N)
Show ,which of the following is an example of brute force Divide and conquer algorithm(N)
approach to find the maximum subarray sum?
Kadane's algorithm(Y)
Floyd-Warshall algorithm(N)
Predict which of the following is a disadvantage of using brute It is easy to implement (N)
force approach?
Indicate the Traveling Salesman problem (TSP)? Finding the shortest path between
two nodes in a graph(N)
Identify which of the following is an example of an approximate Brute force algorithm (N)
algorithm for solving the TSP?
Dijkstra's algorithm(N)
Which of the following is a heuristic algorithm for solving the Brute force algorithm (N)
TSP?
State which of the following statements is true for the TSP? It is a polynomial time solvable
problem(N)
It is an NP-hard problem(Y)
It is an NP-complete problem(N)
It is an example of a linear
programming problem (N)
Choose which algorithm is used to solve the TSP exactly for Branch and bound algorithm(Y)
small instances?
Explain the basic idea of the Divide and conquer approach? Solving a problem by dividing it
into smaller subproblems, solving
each subproblem recursively, and
combining the solutions of the
subproblems(Y)
Predict which of the following is an example of a problem that Sorting a list of numbers (N)
can be solved using the Divide and conquer approach?
Select ,what is the time complexity of the Merge sort algorithm? O(n) (N)
O(log n) (N)
O(n^2)(N)
Determine which of the following is not a step in the Divide and Divide the problem into smaller
conquer approach? subproblems (Y)
O(n^2)(N)
O(n)(N)
Exponential(Y)
Choose which of the following algorithms uses the Divide and Insertion sort
conquer approach to find the closest pair of points in a plane?
(N)
Quick sort
(N)
Merge sort
(N)
(Y)
(N)
(N)
Choose which of the following is an example of a problem that Finding the greatest common
cannot be solved using the Divide and conquer approach? divisor of two numbers
(N)
(N)
(N)
(Y)
Choose which algorithm uses the Divide and conquer approach Quick sort
to find the median of an array?
(N)
Merge sort
(N)
Binary search
(Y)
Heap sort
(N)
Cite how many solutions are available for a graph having One solution
negative weight cycle
Cite how many solutions are available for a graph having
negative weight cycle
(N)
Two solution
(N)
No solution
(N)
Infinite solution
(Y)
Explain the basic idea of the Greedy approach? Solving a problem by dividing it
into smaller subproblems, solving
each subproblem recursively, and
combining the solutions of the
subproblems
(N)
(N)
(Y)
(N)
Choose which of the following is an example of a problem that Finding the shortest path between
can be solved using the Greedy approach? two nodes in a graph
Choose which of the following is an example of a problem that
can be solved using the Greedy approach?
(Y)
(N)
(N)
(N)
Choose which of the following is true about class NP? The problems in NP can be solved
by deterministic algorithms in
polynomial time.
(N)
(Y)
(N)
(N)
Choose which of the following is true about the class NP- The problems in NP-complete can
complete? be solved by deterministic
algorithms in polynomial time.
Choose which of the following is true about the class NP-
complete?
(N)
(N)
(Y)
(N)
Identify which of the following algorithms uses the Greedy Depth-first search (N)
approach to find the shortest path between two nodes in a graph?
Predict which of the following is a disadvantage of using the It is difficult to implement (N)
Greedy approach?
Choose which of the following is an example of a problem that Finding the minimum spanning
cannot be solved using the Greedy approach? tree of a graph (N)
Predict which of the following algorithms uses the Greedy Quick sort(N)
approach to find the Huffman codes of a set of characters?
Choose which algorithm uses the Greedy approach to find the Depth-first search
optimal sequence of activities to be scheduled?
(N)
optimal sequence of activities to be scheduled?
Breadth-first search
(N)
Kruskal's algorithm
(N)
(Y)
Select which of the following is an example of a problem that Finding the shortest path between
can be solved using both the Greedy approach and dynamic two nodes in a graph
programming?
(N)
(N)
(N)
(Y)
(N)
(Y)
A strategy for winning a game of
chess
(N)
(N)
6x6 (N)
8x8 (N)
10x10 (N)
62(N)
61(N)
60(N)
Dijkstra's algorithm(N)
Identify which of the following is not a heuristic used to solve Warnsdorff's rule
the Knight's Tour problem?
(N)
Least-recently-visited rule
(N)
Greedy approach
(Y)
Backtracking
(N)
Select which of the following is a key step in solving the Choosing the square with the
Knight's Tour problem using backtracking? fewest number of unvisited
neighbors
(N)
(Y)
Choosing the square with the
smallest number
(N)
(N)
Predict the time complexity of the brute force algorithm for O(n!) (Y)
solving the Knight's Tour problem?
O(2^n)(N)
O(n^2)(N)
Select which of the following is a disadvantage of using the It requires a lot of memory
brute force algorithm for solving the Knight's Tour problem?
(N)
(Y)
It is too slow
(N)
(N)
O(n^2)
(N)
O(n^3)
(Y)
O(n^4)
(N)
int a = 0, b = 0; for (i = 0; i < N; i++) { a = a + rand(); } for (j = O(N * M) time, O(1) space (N)
0; j < M; j++) { b = b + rand(); }
Examine it's meaning when we say that an algorithm X is X will always be a better choice
asymptotically more efficient than Y? for small inputs (N)
Observe the time complexity of the following code: int a = 0, i = O(N) (N)
N; while (i > 0) { a += i; i /= 2; }
Observe the time complexity of the following code: int a = 0, i =
N; while (i > 0) { a += i; i /= 2; }
O(Sqrt(N))(N)
O(N / 2)(N)
O(log N)(Y)
Choose which of the following best describes the useful criterion Time (N)
for comparing the efficiency of algorithms?
Space (N)
FALSE(Y)
Cite an algorithm used for finding all pair shortest paths in a Kruskal\'s Algorithm(N)
graph.
Prim\'s Algorithm(N)
Cite an algorithm used for finding all pair shortest paths in a
graph.
Dijkstra\'s Algorithm(N)
Floyd-Warshall Algorithm(Y)
Identify the primary focus of the Floyd-Warshall Algorithm. Minimum spanning tree(N)
Breadth-First Search(Y)
Dijkstra\'s Algorithm(N)
Bellman-Ford Algorithm(N)
Augmentation(Y)
Termination(N)
Compilation(N)
Cite the algorithm known for solving the maximum flow Bellman-Ford Algorithm(N)
problem in a network.
Kruskal\'s Algorithm(N)
Cite the algorithm known for solving the maximum flow
problem in a network.
Ford-Fulkerson Algorithm(Y)
Dijkstra\'s Algorithm(N)
Maximum flow(Y)
Shortest path(N)
Minimum cut(N)
Select the correct statement about the Push-Relabel Algorithm. It is a greedy algorithm(N)
Trace the process of cycle canceling in the Cycle Cancelling Identify augmenting paths(N)
Algorithm.
Cite the algorithm commonly used for finding minimum cost Prim\'s Algorithm(N)
flows in a network.
Cite the algorithm commonly used for finding minimum cost
flows in a network.
Dijkstra\'s Algorithm(N)
Bellman-Ford Algorithm(N)
It maintains a preflow(Y)
Termination(N)
Compilation(N)
Cite an application of the Floyd-Warshall Algorithm. Shortest path in a graph(N)
Sorting algorithms(N)
Identify a limitation of the Cycle Cancelling Algorithm. It only works for acyclic
graphs(N)
Cite the algorithm used for finding the minimum cut in a flow Dijkstra\'s Algorithm(N)
network.
Bellman-Ford Algorithm(N)
Kruskal\'s Algorithm(N)
Ford-Fulkerson Algorithm(Y)
Sorting algorithms(N)
Select the correct statement about the Cycle Cancelling It is used for finding shortest
Algorithm. paths(N)
It is a greedy algorithm(N)
Trace the impact of augmenting the flow in the Ford-Fulkerson Decrease the overall flow in the
Algorithm. network(N)
Trace the impact of augmenting the flow in the Ford-Fulkerson
Algorithm.
It is a greedy algorithm(N)
Dense graphs(N)
Sorting algorithms(N)
Small-sized networks(N)
Select the correct statement about the Ford-Fulkerson It guarantees optimality in all
Algorithm. cases(N)
Trace the concept of residual graph in the Ford-Fulkerson It represents the original graph(N)
Algorithm.
Cite a scenario where the Cycle Cancelling Algorithm is Maximum flow problem(N)
commonly used.
Sorting algorithms(N)
Select a property of the residual graph in the Ford-Fulkerson It contains only backward
Algorithm. edges(N)
Select a property of the residual graph in the Ford-Fulkerson
Algorithm.
It is acyclic(N)
Trace the role of the Cycle Cancelling Algorithm in solving Finding all pair shortest paths(N)
network flow problems.
Sorting elements(N)
Cite an example of a problem that can be modeled using flow Sorting elements(N)
networks.
Image processing(N)
Sorting algorithms(N)
Identify a key characteristic of the Cycle Cancelling Algorithm. It guarantees optimality in all
cases(N)
It is a greedy algorithm(N)
Sorting algorithms(N)
Dense graphs(N)
Termination(N)
Compilation(N)
Cite the key concept behind the Ford-Fulkerson Algorithm. Maximum flow in a network(Y)
Sorting elements(N)
O(p(n2))(N)
P(N)
Hard(N)
Complete(N)
O( N log N)(N)
O(log N)(N)
O(N2(Y)
Identify the class does the Euler’s circuit problem belong? P class(Y)
NP class(N)
Partition class(N)
Complete class(N)
undecidable problem(Y)
complete problem(N)
trackable problem(N)
2(Y)
3(N)
4(N)
P class(N)
NP complete(Y)
NP hard(N)
Bin packing(N)
Partition problem(N)
Halting problem(Y)
Apply the Rabin-Karp Algorithm to find the first occurrence of The first occurrence of "abc\" in
the pattern "abc" in the text "abcbabcbabccba". the text is at index 0(Y)
Apply the Naïve String Matching Algorithm to find all Occurrences of "aba" in the text:
occurrences of the pattern "aba" in the text "abababab". (0, 2), (2, 4), (4, 6)(Y)
Select the primary objective of string matching algorithms from The primary objective is to locate
the following options? occurrences of a pattern within a
text string.(Y)
Choose from the following the real life example of KMP text editors, search engines, and
algorithm DNA sequencing(Y)
Choose from the following the real life example of KMP
algorithm
O((n-m+1))(N)
O(m(m+1))(N)
O(m(n-m))(N)
Identify which of the following algorithms is used to find the Push-Relabel algorithm(Y)
maximum flow in a network with capacities that can be
increased or decreased by a real number(Probable
duplicate)
Bellman-Ford algorithm(N)
Dijkstra’s algorithm(N)
Kruskal’s algorithm(N)
Identify which of the following algorithms is used to find the Dijkstra’s algorithm(N)
shortest path between two vertices in a graph with positive and
negative edgese
Floyd-Warshall algorithm(N)
Kruskal’s algorithm(N)
Bellman-Ford algorithm(Y)
Identify which of the following algorithms is used to find the Hopcroft-Karp algorithm(N)
maximum matching in a general graph
Prim’s algorithm(N)
Floyd-Warshall algorithm(N)
Dinic’s algorithm(Y)
Examine which of the following algorithms is used to find the Dijkstra’s algorithm(N)
bridges in an undirected graph
Hopcroft-Tarjan algorithm(N)
Bellman-Ford algorithm(N)
Tarjan’s algorithm(Y)
Identify which of the following algorithms is used to find the Push-Relabel algorithm(Y)
maximum flow in a network with capacities that can be
increased or decreased by a real number(Probable
duplicate)
Bellman-Ford algorithm(N)
Dijkstra’s algorithm(N)
Kruskal’s algorithm(N)
Explain algorithm.
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?
Calculate the min and max term of the following array using
Divide and conquer approach {9,6,4,7,10,14,8,11}
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.
Solve for the all pair of shortest path using Floyd’s Algorithm
Describe NP Hard.
Describe NP Complete.
Define 3SAT.
Explain Class P
Items I1 I2 I3 I
4 I5
Value 10 20 30 40 50
Weight 15 25 35 45 55
Summarize What is the main objective of approximation
algorithms in the context of the set-covering problem?
Items I1 I2 I3 I4 I
5
Value 30 40 45 77 90
Weight 5 10 15 22 25
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