Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

CS6515 Graduate Algorithm Exam 3 Practice Questions with Answers 2026 Guide

Rating
-
Sold
-
Pages
9
Grade
A+
Uploaded on
05-04-2026
Written in
2025/2026

CS6515 Graduate Algorithm Exam 3 Practice Questions with Answers 2026 Guide

Institution
CS6515 Graduate Algorithm
Course
CS6515 Graduate Algorithm

Content preview

CS6515 Graduate Algorithm Exam 3 Practice
Questions with Answers 2026 Guide
1. What does "efficiently" mean Polynomial in the input size
in the context of NP-com-
pleteness?

2. What is the class NP? The set of search problems for which we can verify a solution in
polynomial time

3. What is the class P? The set of search problems that we can solve in polynomial time

4. What is the relationship be- P †N P
tween P and NP?
P is certainly a subset of NP, but it's unknown whether P = NP.
Phrased another way, if NP is all search problems, and P is all
search problems that can be solved in polynomial time, then P is
a subset of NP.

5. How long does it take to veri- O(nm), as each clause has up to n literals, and there are m
fy an assignment to SAT? clauses.

This implies that SAT is in NP.

6. How long does it take to veri- O(m). For each of the m edges (u, v), check that color(u) !=
fy a k-coloring? color(v).

7. How long does it take to ver- O(m log n).
ify whether T is an MST of a
graph G? 1. Run BFS on T to check that it is in fact a tree, in O(n + m)
2. Run Kruskal's or Prim's on G and check that the weight of the
produced tree is that same as that of T, in O(m log n)

Note that this implies that not only is MST in NP, but also P. We
can produce the MST of a graph in O(m log n) as well.

8. Is knapsack in NP or P?
1/9

, CS6515 Graduate Algorithm Exam 3 Practice
Questions with Answers 2026 Guide
Neither.

It's not in NP as given a solution, we don't know whether the sum
of the values is in fact maximized.

It's not in P as the best algorithm we have runs in O(nB), where
B is the budget. B is exponential in the size of the budget, log B.
(This is pseudopolynomial).

9. Is knapsack search in NP? Yes. Sum the n items, check that the total weight <= B and total
value >= g.

10. If knapsack search were solv- Binary search on [1, V] where V = sum of all item values. For
able in polynomial time, how each candidate goal g, use the knapsack search black box to
could we use it to solve the determine whether g is achievable. We run a polynomial time
knapsack optimization prob- algorithm log V times.
lem?

11. What is NP-complete? This is the set of the hardest problems in NP. If P != NP, then these
problems would lie in NP but not P.

If a problem A is NP complete, then 1) it is in NP 2) if a polynomial
time algorithm for A exists, then that algorithm could be used to
solve all NP complete problems.

If a problem A is NP complete, then any problem in NP can be
reduced to it. A is at least as hard as any problem in NP.

12. What does it mean to reduce A ’B means B >= A, B is at least as hard as A.
a problem A to B?
If we can solve B in polynomial time, we can use that algorithm
to solve A in polynomial time.

Solving A would be no harder than solving B, because if we could
2/9

Written for

Institution
CS6515 Graduate Algorithm
Course
CS6515 Graduate Algorithm

Document information

Uploaded on
April 5, 2026
Number of pages
9
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$13.49
Get access to the full document:

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

Get to know the seller

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.
Schopenhauer Johns Hopkins University
View profile
Follow You need to be logged in order to follow users or courses
Sold
34
Member since
11 months
Number of followers
0
Documents
3131
Last sold
1 day ago
Excellence\'s Lair ༄

We offer a collection of real exams, study guides and test banks, that ranged from a variety of courses from different schools and university. #

4.8

8 reviews

5
7
4
0
3
1
2
0
1
0

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