Chapter 12: Theory of Computation

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.
Computability & Complexity. Scenario I can’t write this program because I’m too dumb.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
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 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
Computability and Modeling Computation What are some really impressive things that computers can do? –Land the space shuttle (and other aircraft) from.
By: Er. Sukhwinder kaur.  Computation Computation  Algorithm Algorithm  Objectives Objectives  What do we study in Theory of Computation ? What do.
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.
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.
Complexity theory and combinatorial optimization Class #2 – 17 th of March …. where we deal with decision problems, finite automata, Turing machines pink.
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.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
©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.
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.
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 11 Theory of Computation © 2007 Pearson Addison-Wesley. All rights reserved.
 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.
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.
Chapter 9 Turing Machines What would happen if we change the stack in Pushdown Automata into some other storage device? Truing Machines, which maintains.
Theory of Computational Complexity TA : Junichi Teruyama Iwama lab. D3
1 Recursively Enumerable and Recursive Languages.
Modeling Arithmetic, Computation, and Languages Mathematical Structures for Computer Science Chapter 8 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesTuring.
Limitation of Computation Power – P, NP, and NP-complete
Chapter 10 NP-Complete Problems.
Chapter 12: Theory of Computation
Computable Functions.
Chapter 12: Theory of Computation
Introduction to the Theory of Computation
Linear Bounded Automata LBAs
Chapter 11 Theory of Computation © 2007 Pearson Addison-Wesley.
can be solved on a computer in a reasonable time, using a reasonable
The Definition of Algorithm
CSE 105 theory of computation
Ch. 11 Theory of Computation
Intro to Theory of Computation
Other Models of Computation
Theory of Computational Complexity
How Hard Can It Be?.
Computational Complexity
CLASSES P AND NP.
Chapter 11 Limitations of Algorithm Power
NP-Complete Problems.
Recall last lecture and Nondeterministic TMs
Time Complexity Classes
Chapter 17 Theory of Computation.
Instructor: Aaron Roth
Presentation transcript:

Chapter 12: Theory of Computation

Chapter 12: Theory of Computation 12.1 Functions and Their Computation 12.2 Turing Machines 12.3 Universal Programming Languages 12.4 A Noncomputable Function 12.5 Complexity of Problems 12.6 Public-Key Cryptography

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

Functions (continued) 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

Figure 12.1 An attempt to display the function that converts measurements in yards into meters

Figure 12.2 The components of a Turing machine

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

Figure 12.3 A Turing machine for incrementing a value

Church-Turing Thesis The functions that are computable by a Turing machine are exactly the functions that can be computed by any algorithmic means.

Universal Programming Language A language with which a solution to any computable function can be expressed Examples: “Bare Bones” and most popular programming languages

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;

Figure 12.4 A Bare Bones program for computing X x Y

Figure 12.5 A Bare Bones implementation of the instruction “copy Today to Tomorrow”

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.

Figure 12.6 Testing a program for self-termination

Figure 12.7 Proving the unsolvability of the halting program

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 Q(f(n)). A problem is in class Q(f(n)) if the best algorithm to solve it is in class Q(f(n)).

Figure 12.8 A procedure MergeLists for merging two lists

Figure 12.9 The merge sort algorithm implemented as a procedure MergeSort

Figure 12.10 The hierarchy of problems generated by the merge sort algorithm

Figure 12.11 Graphs of the mathematical expressions n, lg n, n lg n, and n2

P versus NP Class P: All problems in any class Q(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.

Figure 12.12 A graphic summation of the problem classification

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

Encrypting the Message 10111 Encrypting keys: n = 91 and e = 5 10111two = 23ten 23e = 235 = 6,436,343 6,436,343 ÷ 91 has a remainder of 4 4ten = 100two Therefore, encrypted version of 10111 is 100.

Decrypting the Message 100 Decrypting keys: d = 29, n = 91 100two = 4ten 4d = 429 = 288,230,376,151,711,744 288,230,376,151,711,744 ÷ 91 has a remainder of 23 23ten = 10111two Therefore, decrypted version of 100 is 10111.

Figure 12.13 Public key cryptography

Figure 12.14 Establishing an RSA public key encryption system