Chapter 11 Theory of Computation © 2007 Pearson Addison-Wesley. All rights reserved.

Slides:



Advertisements
Similar presentations
Copyright © 2012 Pearson Education, Inc. Chapter 12: Theory of Computation Computer Science: An Overview Eleventh Edition by J. Glenn Brookshear.
Advertisements

CS 345: Chapter 9 Algorithmic Universality and Its Robustness
JAYASRI JETTI CHINMAYA KRISHNA SURYADEVARA
Theory of Computation. What is possible to compute? We can prove that there are some problems computers cannot solve There are some problems computers.
THEORY OF COMPUTATION Dr. Adam P. Anthony Lectures 25 and 26.
Computability & Complexity. Scenario I can’t write this program because I’m too dumb.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
© 2010 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Chapter 11: Structure and Union Types Problem Solving & Program Design.
Algorithms Sipser 3.3 (pages ). CS 311 Mount Holyoke College 2 Computability Hilbert's Tenth Problem: Find “a process according to which it can.
1 Other Models of Computation. 2 Models of computation: Turing Machines Recursive Functions Post Systems Rewriting Systems.
CS1001 Lecture 23. Overview Incompleteness and the Halting Problem Incompleteness and the Halting Problem Methods in Artificial Intelligence Methods in.
1. The Role of the Algorithms in Computer Hsu, Lih-Hsing
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 5 Reducibility Contents Undecidable Problems from Language Theory.
Chapter 11: Limitations of Algorithmic Power
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Theory of Computation. Computation Computation is a general term for any type of information processing that can be represented as an algorithm precisely.
1 Turing Machines. 2 A Turing Machine Tape Read-Write head Control Unit.
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.
More Theory of Computing
By: Er. Sukhwinder kaur.  Computation Computation  Algorithm Algorithm  Objectives Objectives  What do we study in Theory of Computation ? What do.
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,
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
CMPS 3223 Theory of Computation Automata, Computability, & Complexity by Elaine Rich ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Slides provided.
The Complexity of Primality Testing. What is Primality Testing? Testing whether an integer is prime or not. – An integer p is prime if the only integers.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
Chapter 10 A Algorithm Efficiency. © 2004 Pearson Addison-Wesley. All rights reserved 10 A-2 Determining the Efficiency of Algorithms Analysis of algorithms.
Unsolvability and Infeasibility. Computability (Solvable) A problem is computable if it is possible to write a computer program to solve it. Can all problems.
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
CSCI 2670 Introduction to Theory of Computing December 1, 2004.
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.
1 Theory: Models of Computation  Readings:  Chapter 11 & Chapter 3.6 of [SG]  Content:  What is a Model  Model of Computation  Model of a Computing.
©Brooks/Cole, 2003 Chapter 17 Theory of Computation.
©Brooks/Cole, 2003 Chapter 17 Theory of Computation.
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. Admin  Two more assignments…  No office hours on tomorrow.
NP-Complete problems.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
Complexity & Computability. Limitations of computer science  Major reasons useful calculations cannot be done:  execution time of program is too long.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
Computer Theory Michael J. Watts
Capabilities of computing systems Numeric and symbolic Computations A look at Computability theory Turing Machines.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Computer Science: An Overview Eleventh Edition by J. Glenn Brookshear Chapter.
Chapter 15 P, NP, and Cook’s Theorem. 2 Computability Theory n Establishes whether decision problems are (only) theoretically decidable, i.e., decides.
Chapter 17: Limitations of Computing Chapter 17 Limitations of Computing Page 196 What problems cannot be solved on a computer? What problems cannot be.
 2004 SDU 1 Algorithm Informally speaking, an algorithm is a collection of simple instructions for carrying out a task. Example:  Elementary arithmetic.
Chapter 12 Theory of Computation Introduction to CS 1 st Semester, 2014 Sanghyun Park.
Theory of Computation Foundations of Computer Science  Cengage Learning.
Copyright © 2014 Curt Hill Algorithm Analysis How Do We Determine the Complexity of Algorithms.
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.
Theory of Computational Complexity Yuji Ishikawa Avis lab. M1.
Recall last lecture and Nondeterministic TMs Ola Svensson.
Turing Machines CS 130 Theory of Computation HMU Textbook: Chap 8.
Theory of Computational Complexity TA : Junichi Teruyama Iwama lab. D3
Modeling Arithmetic, Computation, and Languages Mathematical Structures for Computer Science Chapter 8 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesTuring.
Chapter 12: Theory of Computation
Chapter 12: Theory of Computation
Chapter 11 Theory of Computation © 2007 Pearson Addison-Wesley.
can be solved on a computer in a reasonable time, using a reasonable
Ch. 11 Theory of Computation
Chapter 12: Theory of Computation
Computational Complexity
CLASSES P AND NP.
Chapter 11 Limitations of Algorithm Power
Chapter 17 Theory of Computation.
Presentation transcript:

Chapter 11 Theory of Computation © 2007 Pearson Addison-Wesley. All rights reserved

© 2007 Pearson Addison-Wesley. All rights reserved 0-2 Chapter 11: Theory of Computation 11.1 Functions and Their Computation 11.2 Turing Machines 11.3 Universal Programming Languages 11.4 A Noncomputable Function 11.5 Complexity of Problems 11.6 Public-Key Cryptography

© 2007 Pearson Addison-Wesley. All rights reserved 0-3 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 –Computing a function: Determining the output value associated with a given set of input values –Noncomputable function: A function that cannot be computed by any algorithm

© 2007 Pearson Addison-Wesley. All rights reserved 0-4 Figure 11.1 An attempt to display the function that converts measurements in yards into meters

© 2007 Pearson Addison-Wesley. All rights reserved 0-5 Figure 11.2 The components of a Turing machine

© 2007 Pearson Addison-Wesley. All rights reserved 0-6 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

© 2007 Pearson Addison-Wesley. All rights reserved 0-7 Figure 11.3 A Turing machine for incrementing a value

© 2007 Pearson Addison-Wesley. All rights reserved 0-8 Church-Turing Thesis The functions that are computable by a Turing machine are exactly the functions that can be computed by any algorithmic means.

© 2007 Pearson Addison-Wesley. All rights reserved 0-9 Universal Programming Language A language with which a solution to any computable function can be expressed –Examples: “Bare Bones” and most popular programming languages

© 2007 Pearson Addison-Wesley. All rights reserved 0-10 The Bare Bones Language Bare Bones is a simple, yet universal language. Statements –clear name; –incr name; –decr name; –while name not 0 do; … end ;

© 2007 Pearson Addison-Wesley. All rights reserved 0-11 Figure 11.4 A Bare Bones program for computing X x Y

© 2007 Pearson Addison-Wesley. All rights reserved 0-12 Figure 11.5 “copy Today to Tomorrow” in Bare Bones

© 2007 Pearson Addison-Wesley. All rights reserved 0-13 The Halting Problem Given the encoded version of any program, return 1 if the program is self-terminating, or 0 if the program is not.

© 2007 Pearson Addison-Wesley. All rights reserved 0-14 Figure 11.6 Testing a program for self-termination

© 2007 Pearson Addison-Wesley. All rights reserved 0-15 Figure 11.7 Proving the unsolvability of the halting program

© 2007 Pearson Addison-Wesley. All rights reserved 0-16 Complexity of Problems Time Complexity: The number of instruction executions required –Unless otherwise noted, “complexity” means “time complexity.” A problem is in class O(f(n)) if it can be solved by an algorithm in Θ(f(n)). A problem is in class Θ(f(n)) if the best algorithm to solve it is in class Θ(f(n)).

© 2007 Pearson Addison-Wesley. All rights reserved 0-17 Figure 11.8 A procedure MergeLists for merging two lists

© 2007 Pearson Addison-Wesley. All rights reserved 0-18 Figure 11.9 The merge sort algorithm implemented as a procedure MergeSort

© 2007 Pearson Addison-Wesley. All rights reserved 0-19 Figure The hierarchy of problems generated by the merge sort algorithm

© 2007 Pearson Addison-Wesley. All rights reserved 0-20 Figure Graphs of the mathematical expression n, lg, n, n lg n, and n 2

© 2007 Pearson Addison-Wesley. All rights reserved 0-21 P versus NP Class P: All problems in any class  (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 Whether the class NP is bigger than class P is currently unknown.

© 2007 Pearson Addison-Wesley. All rights reserved 0-22 Figure A graphic summation of the problem classification

© 2007 Pearson Addison-Wesley. All rights reserved 0-23 Public-Key Cryptography Key: A value used to encrypt or decrypt a message –Public key: Used to encrypt messages –Private key: Used to decrypt messages RSA: A popular public key cryptographic algorithm –Relies on the (presumed) intractability of the problem of factoring large numbers

© 2007 Pearson Addison-Wesley. All rights reserved 0-24 Encrypting the Message Encrypting keys: n = 91 and e = two = 23 ten 23 e = 23 5 = 6,436,343 6,436,343 ÷ 91 has a remainder of 4 4 ten = 100 two Therefore, encrypted version of is 100.

© 2007 Pearson Addison-Wesley. All rights reserved 0-25 Decrypting the Message 100 Decrypting keys: d = 29, n = two = 4 ten 4 d = 4 29 = 288,230,376,151,711, ,230,376,151,711,744 ÷ 91 has a remainder of ten = two Therefore, decrypted version of 100 is

© 2007 Pearson Addison-Wesley. All rights reserved 0-26 Figure Public key cryptography

© 2007 Pearson Addison-Wesley. All rights reserved 0-27 Figure Establishing a RSA public key encryption system