{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# np - CMSC 451 The classes P and NP Slides By Carl Kingsford...

This preview shows pages 1–7. Sign up to view the full content.

CMSC 451: The classes P and NP Slides By: Carl Kingsford Department of Computer Science University of Maryland, College Park Based on Section 8.3 of Algorithm Design by Kleinberg & Tardos.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Computational Complexity We’ve seen algorithms for lots of problems, and the goal was always to design an algorithm that ran in polynomial time. Sometimes we’ve claimed a problem is NP-hard as evidence that no such algorithm exists. Now, we’ll formally say what that means.
Decision Problems Decision Problems: Usually, we’ve considered optimization problems: given some input instance, output some answer that maximizes or minimizes a particular objective function. Most of computational complexity deals with a seemingly simpler type of problem: the decision problem. A decision problem just asks for a yes or a no . We phrased Circulation with Demands as a decision problem.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Optimization Decision Recall this problem from a few weeks ago: Weighted Interval Scheduling Given a set of intervals { I i } each with a nonnegative weight w i , ﬁnd a subset of intervals S such that i S w i is maximized. We can change this into a decision problem by asking: Weighted Interval Scheduling Given a set of intervals { I i } each with a nonnegative weight w i , is there a subset of intervals S such that i S w i is greater than C .
Decision is no harder than Optimization The decision version of a problem is easier than (or the same as) the optimization version. Why, for example, is this true of Weighted Interval Scheduling?

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Decision is no harder than Optimization The decision version of a problem is easier than (or the same as) the optimization version. Why, for example, is this true of Weighted Interval Scheduling? If you could solve the optimization version and got a solution
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 25

np - CMSC 451 The classes P and NP Slides By Carl Kingsford...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online