Ch. 11 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

Chapter 11: Models of Computation
Course Outline Presentation Term: F09 Faculty Name : Asma Sanam Larik Course Name :INTRO TO COMPUTING Course Code : CSE145 Section :1 Semester : 1.
Time Complexity P vs NP.
Copyright © 2012 Pearson Education, Inc. Chapter 12: Theory of Computation Computer Science: An Overview Eleventh Edition by J. Glenn Brookshear.
CS 345: Chapter 9 Algorithmic Universality and Its Robustness
MATH 224 – Discrete Mathematics
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.
FLAC Lecture 19 Turing Machines and Real Life * Reductions Mihai Budiu March 3, 2000.
INTRODUCTION COMPUTATIONAL MODELS. 2 What is Computer Science Sciences deal with building and studying models of real world objects /systems. What is.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. slide 1 CS 125 Introduction to Computers and Object- Oriented Programming.
CSCI 3 Introduction to Computer Science. CSCI 3 Course Description: –An overview of the fundamentals of computer science. Topics covered include number.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
CS1001 Lecture 23. Overview Incompleteness and the Halting Problem Incompleteness and the Halting Problem Methods in Artificial Intelligence Methods in.
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.
Introduction to Computer and Programming CS-101 Lecture 6 By : Lecturer : Omer Salih Dawood Department of Computer Science College of Arts and Science.
Welcome Aboard – Chapter 1 COMP 2610 Dr. James Money COMP
Computability and Modeling Computation What are some really impressive things that computers can do? –Land the space shuttle (and other aircraft) from.
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,
Chapter 18 Limitations of Computing. Chapter Goals – THE BIG SLICES Limitations of Hardware Limitations of Software Limitations of Problems 2.
1 Computer Algorithms Lecture 3 Asymptotic Notation Some of these slides are courtesy of D. Plaisted, UNC and M. Nicolescu, UNR.
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
The Nature of Computing INEL 4206 – Microprocessors Lecture 3 Bienvenido Vélez Ph. D. School of Engineering University of Puerto Rico - Mayagüez.
Theory of Programming Languages Introduction. What is a Programming Language? John von Neumann (1940’s) –Stored program concept –CPU actions determined.
©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.
The Nature of Computing INEL 4206 – Microprocessors Lecture 2 Bienvenido Vélez Ph. D. School of Engineering University of Puerto Rico - Mayagüez.
CS 127 Introduction to Computer Science. What is a computer?  “A machine that stores and manipulates information under the control of a changeable program”
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
Complexity & Computability. Limitations of computer science  Major reasons useful calculations cannot be done:  execution time of program is too long.
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.
Fundamentals of Informatics Lecture 12 The Halting Problem Bas Luttik.
Chapter 11 Theory of Computation © 2007 Pearson Addison-Wesley. All rights reserved.
1 Introduction to Turing Machines
Chapter 12 Theory of Computation Introduction to CS 1 st Semester, 2014 Sanghyun Park.
Theory of Computation Foundations of Computer Science  Cengage Learning.
Introductory Lecture. What is Discrete Mathematics? Discrete mathematics is the part of mathematics devoted to the study of discrete (as opposed to continuous)
Computer Systems Architecture Edited by Original lecture by Ian Sunley Areas: Computer users Basic topics What is a computer?
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.
Theory of Computation. Introduction We study this course in order to answer the following questions: What are the fundamental capabilities and limitations.
Sub-fields of computer science. Sub-fields of computer science.
Advanced Algorithms Analysis and Design
Chapter 12: Theory of Computation
Computable Functions.
Chapter 12: Theory of Computation
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
Chapter 11 Theory of Computation © 2007 Pearson Addison-Wesley.
Chapter 12: Theory of Computation
Objective of This Course
Teori Bahasa dan Automata Lecture 1: Course Overview and Introduction
Chapter 1 Introduction(1.1)
Chapter 11 Limitations of Algorithm Power
Teori Bahasa dan Automata Lecture 1: Course Overview and Introduction
Algorithmic Complexity and Random Strings
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.V.G’s College of Engineering, Nashik
Lecture One: Automata Theory Amjad Ali
Design and Analysis of Algorithms
CO Games Development 2 Week 21 Turing Machines & Computability
Algorithms and Data Structures
Presentation transcript:

Ch. 11 Theory of Computation A bare bones programming. Turing machines. Computable functions. A noncomputable function. Complexity and its measure. Problem classification.

11.1 Functions and Their Computation The purpose of this chapter is to investigate the capabilities of computers The process of determining the particular output value that a function assigns to a given input is called computing the function

The study of computable and non_computable function is an important undertaking in computer science. If we discover that the solution to a problem requires the computation of non-computable function,we can conclude that the solution to the problem lies beyond the capability of machines.

Figure 11. 1: An attempt to display the function Figure 11.1: An attempt to display the function that converts measurements in yards into meters

11.2 Turing Machines Today’s computers <=> Turing machines finite memories <=> infinite supply of tape CPU <=> the control unit bit patterns <=> states The significance of Turing machines in theoretical computer science - the computation power of Turing machines is as great as any algorithmic system.

Turing Machines Turing machines - are conceptual devices for studying the power of algorithmic processes. A Turing machine consists of a control unit that can read and write symbols on a tape The machine must be in one of a finite number of states, start/halt states.

Figure 11.2: The components of a Turing machine

Figure 11.3: A Turing machine for incrementing a value

Computing process of “5+1” (1)

Computing process of “5+1” (2)

Computing process of “5+1” (3)

Computing process of “5+1” (4)

The Church-Turing Thesis  A function that can be computed by a Turing machine is called Turing Computable  Turing Conjecture: Turing computable function is as the same as Computable function  The Church-Turing Thesis: The computation power of Turing Machine encompasses that of any algorithmic system .

11.3 Universal Programming Language The purpose is to describe a simple language that is rich enough to allow us to express programs for computing all the computable functions. If one problem cannot be solved using our language ,the reason will not be the fault of our language,but will be that there are not algorithm to solve the problem.

The Bare Bones Language Data description statements - all variables are considered to be of type “bit pattern of any length.” => no need a declarative part. Process description statements - three assignment statements: clear, incr, decr and one control structure: while-end.

Programming in bare bones “move tax to extra” Clear aux; clear extra; while tax not 0 do; incr aux; decr tax; end; while aux not 0 do; incr tax; incr extra; decr aux;

Figure 11.4: A Bare Bones program for computing X  Y

Figure 11. 5: A Bare Bones implementation of the Figure 11.5: A Bare Bones implementation of the instruction “copy Today to Tomorrow”

Computable Functions How to measure computing power? Goal: using Turing machines to investigate the power of the bare bones language. Computing the functions is the process of determining an output of a function from its inputs. If one machine is capable of computing more functions than another, the former is considered the more powerful.

Computable Functions Ex. A system in which function outputs are predetermined and recorded in a table. Ex. Finding function outputs would be to describe how to compute the output. Computable - the functions whose output values can be determined algorithmically from their input values. Noncomputable functions!

Computable Functions Turing computable. The Church-Turing thesis. If a computational system is capable of computing all the Turing-computable functions, it is considered to be a universal system. Apply the Church-Turing these to confirm that the bare bones language is a universal programming language.

11.4 A Non-computable Function Computing the Godel number. The halting problem. Halting Problem: a problem of determining whether the bare bones programs are or are not self-terminating.

Figure 11.6: Testing a program for self-termination

Figure 11. 7: Proving the unsolvability of the Figure 11.7: Proving the unsolvability of the halting program (continued)

Figure 11. 7: Proving the unsolvability of the Figure 11.7: Proving the unsolvability of the halting program (continued)

Figure 11.7: Proving the unsolvability of the halting program

11.5 Complexity of Problem Time and storage complexities (Big O). Order of complexity. Polynomial and nonpolynomial problems. NP problems - nondeterministic polynomial problems. NP-complete problems.

Measuring a Problem Complexity Big Theta Notation is used to classify algorithms according to the time required to execute them. Insertion Sort algorithm : in ( n2 ) Sequential Search : in ( n ) Binary Search : in (log n) We use this to classify the complexity of problems

A problem complexity is in (f( n)), where f(n) is some mathematical expression in n,if there is an algorithm for solving this problem whose time complexity is in (f( n)),and no other algorithm for solving the problem has lower time complexity. Big O Notation: if f(n) is some mathematical expression, to say a problem belongs to O(f(n)) means that it has a solution whose time complexity is (f( n)), but it could possibly have a better solution.

Figure 11.8: A procedure MergeLists for merging two lists

Figure 11.9: The merge sort algorithm implemented as a procedure MergeSort

Figure 11. 10: The hierarchy of problems generated Figure 11.10: The hierarchy of problems generated by the merge sort algorithm

Polynomial versus Non-polynomial Problems Polynomial Problem: if the problem is in O(f(n)) ,where the f(n) is ether polynomial itself or bounded by a polynomial. The collection of all polynomial problems are represented by P

Figure 11. 11: Graphs of the mathematical Figure 11.11: Graphs of the mathematical expressions n, lg n, n lg n, and n2

NP problems 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) Non-deterministic algorithm

A problem that can be solved in polynomial time by a non-deterministic algorithm is called Non-deterministic problem , or NP problem All problems in P are also in NP Are all problems in NP also in P? NP-Complete Problem: problems in NP, polynomial time solution for any one of this problems will provide a polynomial time solution for all problems in NP.

Figure 11.12: A graphic summation of problem classification

11.6 Public key Cryptography

Figure 11.13: Encrypting a bit pattern as a knapsack problem

Figure 11.14: Public key encryption using knapsack problems

Figure 11.15: Constructing a public key encryption system

Roadmap to Computer Science Study Fundamental courses: Physics, Mathematics, and Introduction to Computer Science. Software: 1. Fundamental: Problem Solving and Programming, Data Structure, Algorithm, and Software Engineering. 2. Language: Assembly Language, Programming Language, C, and JAVA.

Roadmap to Computer Science Study 3. Theory: Formal Language and Theory of Computation. 4. System: Operating System, Compiler, Networking, Database, and Multimedia. Hardware: 1. Fundamental: Electronics, Logic Design, Digital System Design, and Computer Architecture.

Roadmap to Computer Science Study 2. System: Microprocessors and VLSI design. Applications: 1. Consumer products. 2. Artificial Intelligence. 3. Networking. 4. Image Processing. 5. Computer Architecture and Compiler.

Roadmap to Computer Science Study 6. VLSI and Computer-Aided Design. 7. Biological (Medical) Computing. 8. Multimedia. 9. Databases. 10. Education. 11. Business and management. 12. And more!!!

See you next time !