# Complexity Theory Introduction

May 5th, 2015
Studypool Tutor
Price: \$10 USD

Tutor description

In this appendix, we brieﬂy review the concepts of NP-completeness and reductions. We will use the knapsack problem of Section 3.1 as a running example. Recall that in the knapsack problem, we are given a set of n items I = {1, . . . , n}, where each item i has a value vi and a size si . All sizes and values are positive integers. The knapsack has capacity B, where B is also a positive integer.

Word Count: 1872
Showing Page: 1/7
Complexity Theory IntroductionChapter BNP-completenessIn this appendix, we brie?y review the concepts of NP-completeness and reductions. We will use the knapsack problem of Section 3.1 as a running example. Recall that in the knapsack problem, we are given a set of n items I = {1, . . . , n}, where each item i has a value vi and a size si . All sizes and values are positive integers. The knapsack has capacity B, where B is also a positive integer. The goal is to ?nd a subset of items S ? I that maximizes the value ? i?S vi of items in the knapsack subject to the constraint that the total size of these items is ? no more than the capacity; that is, i?S si ? B. Recall the de?nition of a polynomial-time algorithm. De?nition B.1: An algorithm for a problem is said to run in polynomial time, or said to be a polynomial-time algorithm, with respect to a particular model of computer (such as a RAM) if the number of instructions executed by the algorithm can be bounded by a polynomial in the size of the input. More formally, let x denote an instance of a given problem; for example, an instance of the knapsack problem is the number n of items, the numbers si and vi giving the sizes and values of the items, and the number B giving the size of the knapsack. To present the instance as an input to an algorithm A for the problem, we must encode it in bits in some fashion; let |x| be the number of bits in the encoding of x. Then |x| is called the size of the instance or the instance si

## Review from student

Studypool Student
" Thanks, good work "

1820 tutors are online

### Other Documents

05/05/2015
05/05/2015
05/05/2015
05/05/2015
05/05/2015
05/05/2015
05/05/2015
05/05/2015

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors