Introduction to Algorithms, Second Edition

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: The University of Texas at Austin NP-completeness Department of Computer Sciences Professor Vijaya Ramachandran Lectures 24-26 CS357: ALGORITHMS, Spring 2006 1 Feasible Computation So far, we have been looking at designing algorithms that are as efficient as possible (prefer- ably linear in the size of the input, or within a constant factor of a lower bound for the computation time). We will work with a more relaxed notion of efficiency where any algo- rithm whose running time is polynomial in the size of the input is an efficient algorithm or a feasible computation . Some of the reasons for equating polynomial time with feasible computation are the following. Growth rate of a polynomial does not have the explosive growth rate of an exponential function. Although some polynomials, e.g., n 100 do not represent a running time that is in any way feasible, in practice , virtually every natural problem for which a polynomial-time algorithm has been developed has a running time that is a small power of the input size. Polynomials have nice closure properties the addition or multiplication of two poly- nomials is a polynomial, as is functional composition. Polynomial time remains invariant across machine models, e.g., any computation run- ning in polynomial time on a RAM (the underlying machine model for our pseudocodes) will also run in polynomial time on the Turing machine. 1.1 Decision Problems A decision problem is a problem with yes/no answers. Hence in a decision problem, we can equivalently talk of the language associated with the decision problem, namely, the set of inputs for which the answer is yes. Typically, we assume that the input is coded in binary, so the set of all possible inputs is { , 1 } and the language associated with a decision problem Q is L ( Q ) = { x { , 1 } | the answer is yes for problem Q on input x } 2 The Classes P and NP We define P as the class of decision problems that are solvable by algorithms that run in time polynomial in the length of the input. We will next define the class NP , or Nondeterministic Polynomial Time . Before we can define this class, we need some definitions. Verification Algorithm. A verification algorithm is an algorithm A , that takes two inputs: an ordinary input x (coded in binary), and a certificate y , and outputs a 1 on certain combinations of x and y . Verification algorithm A verifies an input string x if there exists a certificate y such that A ( x,y ) = 1. The language verified by verification algorithm A is L = { input strings x | there exists certificate string y such that A ( x,y ) = 1 } Note that for an x that is not in L , for every certificate y , A ( x,y ) negationslash = 1....
View Full Document

This note was uploaded on 01/30/2008 for the course CS 357 taught by Professor Ramachandran during the Spring '06 term at University of Texas at Austin.

Page1 / 8

Lecture 24-26 - The University of Texas at Austin...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online