• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 19 pages
Exam (elaborations)

Algorithms Final Questions With Answers

Document preview thumbnail
Preview 3 out of 19 pages

Algorithms Final Questions With Answers. Complete set of exam questions with correct answers for Algorithm Design and Analysis exam preparation and revision. Ideal for reviewing key concepts and practicing before your test.

Content preview

Algorithms Final Questions With Answers
Question 1.
Correct Answer:

Question 2.
All decidable problems are tractable.
Correct Answer: False

Question 3.
All computational problems are decidable if provide unlimited computational resources.
Correct Answer: False

Question 4.
A non-deterministic polynomial algorithm contains a guess step, and a polynomial time
verification step.
Correct Answer: True

Question 5.
A problem is NP-hard if it at least NP-complete.
Correct Answer: True

Question 6.
Both 3SAT and set cover problems are NP-complete.
Correct Answer: True

Question 7.
In NP-completeness, the "NP" stands for Non-Polynomial.
Correct Answer: True

Question 8.
If one NP-complete problem is tractable, then all NP-complete problems are tractable.
Correct Answer: True

Question 9.
One should not try to solve any NP-hard problems because they are rarely appear in real
world applications.
Correct Answer: False

Question 10.
One may apply both greedy and dynamic programming to tackle NP-hard problems for
approximated solutions.
Correct Answer: True

Question 11.
There are definitely no polynomial algorithms to solve any NP-hard problem.
Correct Answer: False

,Question 12.
To prove a problem is NP-hard, one only need to show it is at least NP-complete.
Correct Answer: True

Question 13.
Both paradigms of divide-and-conquer and dynamic programming need to solve
sub-problems to obtain a solution.
Correct Answer: True

Question 14.
Both paradigms of divide-and-conquer and dynamic programming solve a problem
top-down.
Correct Answer: False

Question 15.
Sub-problems in divide-and-conquer have no overlap. But, there are overlapped
sub-problems in DP.
Correct Answer: True

Question 16.
Algorithms developed with dynamic programming paradigm can be illustrated as branch
trees
Correct Answer: False

Question 17.
Algorithms developed with dynamic programming paradigm may be illustrated as a dag
in its topological order.
Correct Answer: True

Question 18.
Dynamic programming is a top-down paradigm in algorithm development.
Correct Answer: False

Question 19.
With dynamic programming, one may solve some initially looks like intractable problems
in simple code.
Correct Answer: True

Question 20.
The graph below on the left is a DAG. The graph on the right linearizes the DAG in its
topological order. To find shortest paths from S in the graph with dynamic programming,
it is better to use the graph on the right.
Correct Answer: True

,Question 21.
Provided a sequence: A = (5, 2, 8, 6, 3, 6, 7, 9). The longest decreasing subsequence
ended at 3 depends on the lengths of decreasing subsequences ended at 5, 8, and 6,
respectively.
Correct Answer: True

Question 22.
Let x[1,2, ... , i] and y[1, 2, ..., j] be two strings. Then, the edit distance between x and y is
E(i,j) = 1 + min { E(i-1, j), E(i, j-1}, E(i-1, j-1)}.
Correct Answer: False

Question 23.
A greedy approach always makes the choice that looks best at the moment
Correct Answer: True

Question 24.
With greedy approach, we can always find the best solution.
Correct Answer: False

Question 25.
Let G(V, E) be a connected weighted graph with more than |V| -1 edges. If there is a
unique heaviest edge in G, then this edge cannot be a part of a minimum spanning tree
(do not make any other assumptions.)
Correct Answer: False

Question 26.
The shortest path tree obtained with Dijkstra's algorithm is also a minimum spanning tree
of the same graph.
Correct Answer: False

Question 27.
Let e be any edge of minimum weight in G. Then must be a part of every MST. (No any
other assumptions should be made.)
Correct Answer: False

Question 28.
The time complexity of Kruskal's MST algorithm is O(|E| log |E|).
Correct Answer: True

Question 29.
Both Dijkstra shortest path algorithm and Prim's MST algorithm apply greedy approach.
Correct Answer: True

Question 30.
In Huffman coding tree, all characters must be in leaf nodes.
Correct Answer: True

Document information

Uploaded on
December 2, 2026
Number of pages
19
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$14.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Favorgrades
3.8
(200)
Sold
865
Followers
376
Items
64193
Last sold
1 day ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions