Notes-592-ch34-L-05

Notes-592-ch34-L-05 - SHEN'S CLASS NOTES Chapter 34...

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

View Full Document Right Arrow Icon
SHEN’S CLASS NOTES 1 Chapter 34 NP-Completeness 34.1 Basic Concepts After long time study, people found that some problems can be efficiently solved, and some problems are so difficult that only exponential time algorithms are known for them or even no algorithm at all. In order to study the intrinsic complexity of computational problems, we would like to classify problems into different classes based on their difficulty levels. If a problem can be solved in time that is a polynomial function of n , where n is the input size, we say that this problem belongs to class P . Class P problems are called tractable because they can be solved in polynomial time. A problem that requires super-polynomial time is called intractable. There is a class of problems whose tractability is not known yet. We call this class NP-complete (NPC). If a problem belongs to NPC class, then it is a hard problem because no body can provide a polynomial algorithm for it so far. However, it has not been proved yet that they are indeed not polynomial solvable. In order to study the intrinsic complexity of problems, we introduce the NP class . A problem belongs to the NP class if it can be solved by an NP algorithm in polynomial time. An NP algorithm is an algorithm run on a powerful but hypothetical computing model called non-deterministic machine model. All NPC problems can be solved by an NP algorithm in polynomial time. Moreover, it is proved that if any NPC problem can be solved in the future by a (deterministic) polynomial algorithm,
Background image of page 1

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

View Full DocumentRight Arrow Icon
SHEN’S CLASS NOTES 2 then all NP problems can be solved too. This is the reason why we use the name NP-Complete for such a problem. On the other hand, if any NPC problem is proved to be intractable in the future, then all NPC problems are intractable. Encodings The complexity of a problem is closely related to the input size which depends on the encoding of the problem. For example, if we want to encode the number 99. Its decimal representation, binary representation, and unary representation are: (99) 10 (uses two digits) (1100011) 2 (uses 7 digits) (1111…1) 1 (uses 99 digits). So, we need to say few words about the encodings. Two different encodings e 1 and e 2 are called polynomial related for a problem I if there is a polynomial computable functions f and g such that f ( e 1 ( i )) = e 2 ( i ) and g ( e 2 ( i )) = e 1 ( i ) for any problem instance i . Obviously, if encodings e 1 and e 2 are polynomial related for problem I, then the problem I can be solved in polynomial time under encoding e 1 if and only if I can be solved in polynomial time under encoding e 2 . We notice that almost all encoding methods are polynomial related except “expensive” encoding such as unary encoding. Suppose we use binary encoding for a number
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 35

Notes-592-ch34-L-05 - SHEN'S CLASS NOTES Chapter 34...

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