Computability NP complete problems. Space complexity. Homework: [Post proposal]. Find PSPACE- Complete problems. Work on presentations.

Slides:



Advertisements
Similar presentations
Part VI NP-Hardness. Lecture 23 Whats NP? Hard Problems.
Advertisements

Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Limitation of Computation Power – P, NP, and NP-complete
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Complexity 12-1 Complexity Andrei Bulatov Non-Deterministic Space.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Complexity 11-1 Complexity Andrei Bulatov Space Complexity.
Complexity 13-1 Complexity Andrei Bulatov Hierarchy Theorem.
P and NP Sipser (pages ). CS 311 Fall Polynomial time P = ∪ k TIME(n k ) … P = ∪ k TIME(n k ) … TIME(n 3 ) TIME(n 2 ) TIME(n)
Computability and Complexity 19-1 Computability and Complexity Andrei Bulatov Non-Deterministic Space.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY Read sections 7.1 – 7.3 of the book for next time.
The Theory of NP-Completeness
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Chapter 11: Limitations of Algorithmic Power
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
1.1 Chapter 1: Introduction What is the course all about? Problems, instances and algorithms Running time v.s. computational complexity General description.
Definition: Let M be a deterministic Turing Machine that halts on all inputs. Space Complexity of M is the function f:N  N, where f(n) is the maximum.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
CSCE350 Algorithms and Data Structure
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Complexity Classes (Ch. 34) The class P: class of problems that can be solved in time that is polynomial in the size of the input, n. if input size is.
Theory of Computing Lecture 15 MAS 714 Hartmut Klauck.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
The Complexity of Optimization Problems. Summary -Complexity of algorithms and problems -Complexity classes: P and NP -Reducibility -Karp reducibility.
CSC 172 P, NP, Etc. “Computer Science is a science of abstraction – creating the right model for thinking about a problem and devising the appropriate.
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
Complexity Non-determinism. NP complete problems. Does P=NP? Origami. Homework: continue on postings.
1 Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples: b number of comparisons needed to find the.
1 Design and Analysis of Algorithms Yoram Moses Lecture 11 June 3, 2010
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
Lecture 6 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
Complexity & Computability. Limitations of computer science  Major reasons useful calculations cannot be done:  execution time of program is too long.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
CS 3813: Introduction to Formal Languages and Automata Chapter 14 An Introduction to Computational Complexity These class notes are based on material from.
Lecture 25 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
NPC.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
CSE 421 Algorithms Richard Anderson Lecture 29 Complexity Theory NP-Complete P.
Theory of Computational Complexity Yuji Ishikawa Avis lab. M1.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
The Theory of NP-Completeness
Limitation of Computation Power – P, NP, and NP-complete
Intractable Problems Time-Bounded Turing Machines Classes P and NP
Chapter 12: Theory of Computation
Lecture 2-2 NP Class.
Part VI NP-Hardness.
Hard Problems Introduction to NP
Lecture 5 NP Class.
Analysis and design of algorithm
Intractable Problems Time-Bounded Turing Machines Classes P and NP
Intractable Problems Time-Bounded Turing Machines Classes P and NP
Richard Anderson Lecture 25 NP-Completeness
Intractable Problems Time-Bounded Turing Machines Classes P and NP
Space Complexity Costas Busch - LSU.
Richard Anderson Lecture 28 NP-Completeness
Richard Anderson Lecture 29 Complexity Theory
Approximation Algorithms
CLASSES P AND NP.
Chapter 11 Limitations of Algorithm Power
NP-Complete Problems.
Theory of Computability
The Theory of NP-Completeness
Intro to Theory of Computation
Presentation transcript:

Computability NP complete problems. Space complexity. Homework: [Post proposal]. Find PSPACE- Complete problems. Work on presentations.

Recall graph coloring problem Given a graph G and an integer k, is there away to color the vertices of G with the k colors such that no adjacent edges have the same color? Easy to show this is in NP. Just guess colors and then check. Can reduce 3SAT to this problem in polynomial time. heuristic/text/class/more-np.htmlhttp:// heuristic/text/class/more-np.html

Exam scheduling Given a set of classes, information on students taking classes, and k possible dates, is there a way to set the final exam schedule so there are no conflicts. Model this as the coloring problem. –classes are vertices. Put an edge between two nodes if any student takes both classes. –color vertices according to the assigned date. Subtle point: this is not a reduction, but more direct modeling (representing) exam problem as the color problem.

Decision problem variant of Traveling Salesman problem Closed tour: given n cites and an integer k, is there a tour (path) of the cities which starts and stops at one city that has length less than k. –Model as a graph in which edges represent the distance. –np complete

Traveling Salesman Problem Why do I call this a variant? TSP calls for the minimum. TSP is NP-hard. Problems in NP are reducible to it, but it may not be in NP. –How do you check that something is the least? –You can check that something is less than a specific amount. Let's play a game:

Knapsack problem Informal: have an upper bound on weight and a lower bound on value, what should you take along on trip? Formal, given set of n items, each with a weight and a value, and integers (bound) k and m, is there a collection of items such that the total weight is less than k and the total value at least m? –np complete. heuristic/text/class/more-np.htmlhttp:// heuristic/text/class/more-np.html

Bin packing Related to knapsack Given a set of objects, each of specified length, and an unlimited number of bins of a fixed size: what is the minimum number of bins to hold the objects or can set be stored using k bins? Variations –basic 1-dimensional –2 dimensional –3 dimensional: bins are real 3-D bins! –4 dimensional: bins are real 3-D bins and have weight limit.

Packing groceries, clothes, etc. How would you do it?

First fit versus ordering… It has been proven the a first fit approach can differ from optimal by 70% Ordering the items from largest to smallest (is that how you pack?) can differ from optimal by at most 22% –Proof that an efficient (?, maybe linear) can't be guaranteed to be better than this.

See also linear programming dynamic programming integer programming optimization …

Comment Optimization problems are subject of serious, practical study. pretty good may be good enough –don't need to produce and verify the best. Presentation topic –narrow it down….

Space complexity Let M be a deterministic TM that halts on all inputs. The space complexity of M is the function f:N  N when f(n) is the maximum number of tape cells that M scans on any input of length n. Let M be a non-deterministic TM that halts on all inputs. space complexity of M, f(n) is the maximum number of tape cells scanned on any branch of the computation, on input of length n.

Back to complexity Theoretical topic but… space considerations are/were an issue. Memory/storage cheaper now, but still can be critical in really large problems. However, cloud computing, faster transmissions, may lesson practical concerns.

Informally Space complexity is the amount of space taken by a program/algorithm on input of size n. Recall sorting, shuffling and searching algorithms.

Note: space is different from time! Can re-use space. –SAT problem can check all assignments of variables and reuse the same space. Make use of space equal to the number of variables to work through all assignments. –Total space is linear in size of problem (representation of formula plus representation of all the variables).

Savitch's Theorem A non-deterministic TM that uses f(n) space can be converted to a deterministic TM that uses f 2 (n) space. –if f(n) is polynomial than so is f 2 (n) !!!! More formal definition restricted to f(n)>=log(n).

PSPACE is the class of languages (or problems, algorithms) that are decidable in polynomial space on a deterministic Turing machine (or other equivalent model of computation) Note: we can define NSPACE for non- deterministic TMs, but PSPACE = NSPACE because if f(n) is a polynomial (bounded by a polynomial) then so is f 2 (n)

PSPACE completeness A language B is PSPACE complete if it is in PSPACE and every A in PSPACE is polynomial time reducible to B. –note: the reduction is specified as being polynomial TIME reducible. We make the reduction (translation) more constrained than the definition of the class.

Hierarchy: smallest to largest P NP PSPACE = NPSPACE EXPTIME It is known that P does not equal (strict / proper containment) in EXPTIME. Nothing else proven.

Homework Post presentation proposal Find and come prepared to describe PSPACE problems.