110 likes | 243 Vues
This document provides an overview of key concepts related to NP-completeness in decision problems. It defines what constitutes a decision problem, including instances based on input, output, and size. An example is discussed, illustrating a decision problem involving a graph and the search for the shortest path. Additionally, it describes the relationship between decision problems and optimization problems, emphasizing how algorithms designed for decision problems can be adapted to tackle associated optimization challenges, such as determining the existence of a path of a certain length.
E N D
1. 6/3/03 CSE 202 - NP-complete CSE 202 - Algorithms Incomplete notes on
NP Completeness
2. CSE 202 - NP-complete 2 Decision Problems Instance: an input, an output, and a size. Problem: a set of instances. Decision Problem: Problem where each instances output is T or F. Given graph G and nodes x and y, what is the shortest path from x to y? is not a decision problem. Given G, x, y, and k, is there a path from x to y of length ? k? Usually, given an algorithm for a decision problem, one can use it to solve the associated optimization problem. E.g., use binary search: Is there a path of length ? 50?, ? 25?, ? 37?, ... .