Chapter 12: Theory of Computation

Slides:



Advertisements
Similar presentations
Turing Machines January 2003 Part 2:. 2 TM Recap We have seen how an abstract TM can be built to implement any computable algorithm TM has components:
Advertisements

Copyright © 2012 Pearson Education, Inc. Chapter 12: Theory of Computation Computer Science: An Overview Eleventh Edition by J. Glenn Brookshear.
JAYASRI JETTI CHINMAYA KRISHNA SURYADEVARA
Computability & Complexity. Scenario I can’t write this program because I’m too dumb.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
The Theory of NP-Completeness
Chapter 11: Limitations of Algorithmic Power
CS10 The Beauty and Joy of Computing Lecture #23 : Limits of Computing Thanks to the success of the Kinect, researchers all over the world believe.
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Computability and Modeling Computation What are some really impressive things that computers can do? –Land the space shuttle (and other aircraft) from.
MCS312: NP-completeness and Approximation Algorithms
Chapter 11 Limitations of Algorithm Power. Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples:
Computational Complexity Polynomial time O(n k ) input size n, k constant Tractable problems solvable in polynomial time(Opposite Intractable) Ex: sorting,
CMPS 3223 Theory of Computation Automata, Computability, & Complexity by Elaine Rich ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Slides provided.
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.
Difficult Problems. Polynomial-time algorithms A polynomial-time algorithm is an algorithm whose running time is O(f(n)), where f(n) is a polynomial A.
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.
Unsolvability and Infeasibility. Computability (Solvable) A problem is computable if it is possible to write a computer program to solve it. Can all problems.
CSC 413/513: Intro to Algorithms NP Completeness.
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.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
Chapter 11 Theory of Computation. © 2005 Pearson Addison-Wesley. All rights reserved 11-2 Chapter 11: Theory of Computation 11.1 Functions and Their Computation.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
Beauty and Joy of Computing Limits of Computing Ivona Bezáková CS10: UC Berkeley, April 14, 2014 (Slides inspired by Dan Garcia’s slides.)
Lecture 12 P and NP Introduction to intractability Class P and NP Class NPC (NP-complete)
CS10: The Beauty and Joy of Computing Lecture #22 Limits of Computing Warning sign posted at Stern Hall. Also, Apple releases new operating.
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.
The Beauty and Joy of Computing Lecture #23 Limits of Computing Researchers at Facebook and the University of Milan found that the avg # of “friends” separating.
Computer Theory Michael J. Watts
Computability NP complete problems. Space complexity. Homework: [Post proposal]. Find PSPACE- Complete problems. Work on presentations.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Computer Science: An Overview Eleventh Edition by J. Glenn Brookshear Chapter.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
NPC.
Chapter 11 Theory of Computation © 2007 Pearson Addison-Wesley. All rights reserved.
Lecture. Today Problem set 9 out (due next Thursday) Topics: –Complexity Theory –Optimization versus Decision Problems –P and NP –Efficient Verification.
Chapter 12 Theory of Computation Introduction to CS 1 st Semester, 2014 Sanghyun Park.
1 P and NP. 2 Introduction The Traveling Salesperson problem and thousands of other problems are equally hard in the sense that if we had an efficient.
Algorithm Complexity By: Ashish Patel and Alex Golebiewski.
Modeling Arithmetic, Computation, and Languages Mathematical Structures for Computer Science Chapter 8 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesTuring.
CSC 172 P, NP, Etc.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Limitation of Computation Power – P, NP, and NP-complete
Chapter 10 NP-Complete Problems.
Chapter 12: Theory of Computation
Lecture 2-2 NP Class.
Chapter 11 Theory of Computation © 2007 Pearson Addison-Wesley.
Ch. 11 Theory of Computation
Chapter 12: Theory of Computation
Analysis and design of algorithm
ICS 353: Design and Analysis of Algorithms
Intro to NP Completeness
How Hard Can It Be?.
Computational Complexity
CLASSES P AND NP.
Chapter 11 Limitations of Algorithm Power
NP-Complete Problems.
CSC 380: Design and Analysis of Algorithms
NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and Johnson, W.H. Freeman and Company, 1979.
P, NP and NP-Complete Problems
P, NP and NP-Complete Problems
Instructor: Aaron Roth
Algorithms CSCI 235, Spring 2019 Lecture 36 P vs
Our old list of problems
RAIK 283 Data Structures & Algorithms
Presentation transcript:

Chapter 12: Theory of Computation

Theory of Computation Functions and Their Computation Turing Machines A Noncomputable Function (halting problem) Complexity of Problems

The powers of computers Goal: To investigate the capabilities of computers Question: What computers can and can not do? Unsolvable v.s. Solvable v.s. Intractable

Functions Function: A correspondence between a collection of possible input values and a collection of possible output values so that each possible input is assigned a single output Converting measurements in yards into meters Sort function Addition function etc

Functions (Cont.) Computing a function: Determining the output value associated with a given set of input values Compute the addition function to solve an addition problem; Compute the sort function to sort a list The ability to compute functions is the ability to solve problems. Computer science: find techniques for computing the functions underlying the problems we want to solve

Techniques for computing functions Inputs and outputs can be predetermined and recorded in a table

Techniques for computing functions (Cont.) A more powerful approach: follow directions provided by an algebraic formula V = P(1+r)n Can the sine function be expressed in terms of algebraic manipulations of the degree value? Need good approximation Some functions’ input/output relationships are too complex to be described by algebraic manipulations.

Computability Functions with increasing complexity need more powerful computing techniques. Question: Can we always find a system for computing functions, regardless of their complexity? The answer is “No”. That is, no algorithmic system for some very very complex problems. Noncomputable function: A function that cannot be computed by any algorithm

Turing machines To understand capabilities and limitations of machines, many researchers have proposed and studied various computational devices. Alan M. Turing in 1936 proposed the Turing machines, which is still used today as a tool for studying the power of algorithmic processes.

Universal programming language Describe a simple programming language that is rich enough to allow us to express programs for computing all the Turing computable functions (and thus all the computable functions). If a future programmer finds that a problem cannot be solved using this language, the reason will not be a fault of the language. Instead, it will be that there is no algorithm for solving the problem. A programming language with this property is called a universal programming language.

The components of a Turing machine a finite set of symbols a finite set of states (start, halt)

Turing Machine Operation Inputs at each step State Value at current tape position Actions at each step Write a value at current tape position Move read/write head Change state

A Turing machine for incrementing a value

A Turing machine for incrementing a value

A Turing machine for incrementing a value

A Turing machine for incrementing a value

A Turing machine for incrementing a value

A Turing machine for incrementing a value

Turing machine for incrementing a value

Church-Turing Thesis A function that can be computed by a Turing machine is said to be Turing computable. Turing’s conjecture (Church-Turing Thesis): The functions that are computable by a Turing machine are exactly the functions that can be computed by any algorithmic means.

The Halting Problem Given any program with its inputs, return 1 if the program is self-terminating, or 0 if the program is not.

Here…

The Polynomial Problems The question of whether a solvable problem has a practical solution. Polynomial problems P: a problem is a polynomial problem if the problem is in O(f(n)), where f(n) is either a polynomial itself or bounded by a polynomial E.g., O(n3), O(nlg n) Searching a list, sorting a list The problems in P are characterized as having practical solutions.

The Polynomial Problems (Cont.) Consider the problem of listing all possible subcommittees that can be formed from a group of n people. There are 2n-1 such subcommittees Any algorithm that solves this problem must have at least 2n-1 steps This problem is not in P. The non-polynomial problems are called “intractable”.

The traveling salesman problem Traveling salesman problem (TSP): visit each of his clients in different cities without exceeding his travel budget (the length of the path does not exceed his allowed mileage) An exponential time algorithm: consider the potential paths in a systematic manner

A nondeterministic algorithm for the traveling salesman problem Pick one of the possible paths, and compute its total distance If (this distance is not greater than the allowable mileage) then (declare a success) else (declare nothing) => A nondeterministic algorithm based on “lucky guess”.

P versus NP Class P: All problems in any class O(f(n)), where f(n) is a polynomial Class NP: All problems that can be solved by a nondeterministic algorithm in polynomial time Nondeterministic algorithm = an “algorithm” whose steps may not be uniquely and completely determined by the process state We know that P is a subset of NP. Whether the class NP is bigger than class P is currently unknown. NP = P?

A graphic summation of the problem classification

NP-Complete problems NP-complete problems: NP problems to which all other NP problems can be reduced in polynomial time The traveling salesman problem is a NP-complete problem 3-Coloring problem: Given an undirected graph G = (V, E), determine whether G can be colored with three color with the requirement Each vertex is assigned one color and no two adjacent vertices have the same color

https://www.youtube.com/watch?v=YX40hbAHx3s&t=187s