Chapter 11: Models of Computation

Slides:



Advertisements
Similar presentations
Variations of the Turing Machine
Advertisements

ALAK ROY. Assistant Professor Dept. of CSE NIT Agartala
4 Control Statements: Part 1.
Adders Used to perform addition, subtraction, multiplication, and division (sometimes) Half-adder adds rightmost (least significant) bit Full-adder.
© 2008 Pearson Addison Wesley. All rights reserved Chapter Seven Costs.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 1 Embedded Computing.
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Author: Julia Richards and R. Scott Hawley
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 3 CPUs.
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
UNITED NATIONS Shipment Details Report – January 2006.
By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman
© 2010 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Chapter 5: Repetition and Loop Statements Problem Solving & Program.
1 RA I Sub-Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Casablanca, Morocco, 20 – 22 December 2005 Status of observing programmes in RA I.
Properties of Real Numbers CommutativeAssociativeDistributive Identity + × Inverse + ×
Exit a Customer Chapter 8. Exit a Customer 8-2 Objectives Perform exit summary process consisting of the following steps: Review service records Close.
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
Formal Models of Computation Part III Computability & Complexity
Programming Language Concepts
Solve Multi-step Equations
REVIEW: Arthropod ID. 1. Name the subphylum. 2. Name the subphylum. 3. Name the order.
Turing Machines.
PP Test Review Sections 6-1 to 6-6
MAT 205 F08 Chapter 12 Complex Numbers.
Bellwork Do the following problem on a ½ sheet of paper and turn in.
Name Convolutional codes Tomashevich Victor. Name- 2 - Introduction Convolutional codes map information to code bits sequentially by convolving a sequence.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
1..
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
CS 240 Computer Programming 1
Model and Relationships 6 M 1 M M M M M M M M M M M M M M M M
Introduction to Computability Theory
1 Non Deterministic Automata. 2 Alphabet = Nondeterministic Finite Accepter (NFA)
Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.
Chapter Three Arithmetic Expressions and Assignment Statements
Analyzing Genes and Genomes
1 Let’s Recapitulate. 2 Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
Chapter 9 Interactive Multimedia Authoring with Flash Introduction to Programming 1.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Copyright © 2012 Pearson Education, Inc. Chapter 12: Theory of Computation Computer Science: An Overview Eleventh Edition by J. Glenn Brookshear.
Essential Cell Biology
Intracellular Compartments and Transport
PSSA Preparation.
Essential Cell Biology
Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.
Introduction to Computability Theory
Immunobiology: The Immune System in Health & Disease Sixth Edition
Physics for Scientists & Engineers, 3rd Edition
Energy Generation in Mitochondria and Chlorplasts
1 Decidability continued…. 2 Theorem: For a recursively enumerable language it is undecidable to determine whether is finite Proof: We will reduce the.
1 Non Deterministic Automata. 2 Alphabet = Nondeterministic Finite Accepter (NFA)
The Pumping Lemma for CFL’s
CS 345: Chapter 9 Algorithmic Universality and Its Robustness
Chapter 10 Models of Computation. What is a model? Captures the essence – the important properties – of the real thing Captures the essence – the important.
Theory of Computation. Computation Computation is a general term for any type of information processing that can be represented as an algorithm precisely.
Design and Analysis of Algorithms
More Theory of Computing
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Models of Computation - Turing Machines Dale Roberts, Lecturer.
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.
Computer Science 101 Theory of Computing. Computer Science is... The study of algorithms, with respect to –their formal properties –their linguistic realizations.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
Capabilities of computing systems Numeric and symbolic Computations A look at Computability theory Turing Machines.
Modeling Arithmetic, Computation, and Languages Mathematical Structures for Computer Science Chapter 8 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesTuring.
Chapter 9 TURING MACHINES.
Presentation transcript:

Chapter 11: Models of Computation Invitation to Computer Science, C++ Version, Third Edition

Objectives In this chapter, you will learn about: A model of a computing agent A model of an algorithm Turing machine examples The Church–Turing thesis Unsolvable problems Invitation to Computer Science, C++ Version, Third Edition

Introduction Some problems do not have any algorithmic solution A model of a computer Easy to work with Theoretically as powerful as a real computer Needed to show that something cannot be done by any computer Invitation to Computer Science, C++ Version, Third Edition

What Is a Model? Models are an important way of studying physical and social phenomena, such as Weather systems Spread of epidemics Chemical molecules Models can be used to Predict the behavior of an existing system Test a proposed design Invitation to Computer Science, C++ Version, Third Edition

What Is a Model? (continued) A model of a phenomenon Captures the essence (mportant properties) of the real thing Probably differs in scale from the real thing Suppresses some of the details of the real thing Lacks the full functionality of the real thing Invitation to Computer Science, C++ Version, Third Edition

A Model of a Computing Agent A good model for the “computing agent” entity must: Capture the fundamental properties of a computing agent Enable the exploration of the capabilities and limitations of computation in the most general sense Invitation to Computer Science, C++ Version, Third Edition

Properties of a Computing Agent A computing agent must be able to: Accept input Store information and retrieve it from memory Take actions according to algorithm instructions Choice of action depends on the present state of the computing agent and input item Produce output Invitation to Computer Science, C++ Version, Third Edition

The Turing Machine A Turning machine includes A (conceptual) tape that extends infinitely in both directions Holds the input to the Turing machine Serves as memory The tape is divided into cells A unit that reads one cell of the tape at a time and writes a symbol in that cell Invitation to Computer Science, C++ Version, Third Edition

The Turing Machine (continued) Each cell contains one symbol Symbols must come from a finite set of symbols called the alphabet Alphabet for a given Turing machine Contains a special symbol b (for “blank”) Usually contains the symbols 0 and 1 Sometimes contains additional symbols Invitation to Computer Science, C++ Version, Third Edition

The Turing Machine (continued) Input to the Turning machine Expressed as a finite string of nonblank symbols from the alphabet Output from the Turing machine Written on tape using the alphabet At any time the unit is in one of k states Invitation to Computer Science, C++ Version, Third Edition

A Turing Machine Configuration Figure 11.2 A Turing Machine Configuration Invitation to Computer Science, C++ Version, Third Edition

The Turing Machine (continued) Each operation involves: Write a symbol in the cell (replacing the symbol already there) Go into a new state (could be same state) Move one cell left or right Invitation to Computer Science, C++ Version, Third Edition

The Turing Machine (continued) Each instruction says something like: if (you are in state i) and (you are reading symbol j) then write symbol k onto the tape go into state s move in direction d Invitation to Computer Science, C++ Version, Third Edition

The Turing Machine (continued) A shorthand notation for instructions Five components Current state Current symbol Next symbol Next state Direction of move Form (current state, current symbol, next symbol, next state, direction of move) Invitation to Computer Science, C++ Version, Third Edition

The Turing Machine (continued) A clock governs the action of the machine Conventions regarding the initial configuration when the clock begins The start-up state will always be state 1 The machine will always be reading the leftmost nonblank cell on the tape The Turing machine has the required features for a computing agent Invitation to Computer Science, C++ Version, Third Edition

A Model of an Algorithm Instructions for a Turing machine are a model of an algorithm Are a well-ordered collection Consist of unambiguous and effectively computable operations Halt in a finite amount of time Produce a result Invitation to Computer Science, C++ Version, Third Edition

Turing Machine Examples: A Bit Inverter A bit inverter Turing machine Begins in state 1 on the leftmost nonblank cell Inverts whatever the current symbol is by printing its opposite Moves right while remaining in state 1 Program for a bit inverter machine (1,0,1,1,R) (1,1,0,1,R) Invitation to Computer Science, C++ Version, Third Edition

A Bit Inverter (continued) A state diagram Visual representation of a Turing machine algorithm Circles are states Arrows are state transitions Invitation to Computer Science, C++ Version, Third Edition

State Diagram for the Bit Inverter Machine Figure 11.4 State Diagram for the Bit Inverter Machine Invitation to Computer Science, C++ Version, Third Edition

A Parity Bit Machine Odd parity bit Extra bit attached to the end of a string of bits Set up so that the number of 1s in the whole string, including the parity bit, is odd If the string has an odd number of 1s, parity bit is set to 0 If the string has an even number of 1s, parity bit is set to 1 Invitation to Computer Science, C++ Version, Third Edition

State Diagram for the Parity Bit Machine Figure 11.5 State Diagram for the Parity Bit Machine Invitation to Computer Science, C++ Version, Third Edition

A Parity Bit Machine (continued) Turing machine program for a parity bit machine (1,1,1,2,R) (1,0,0,1,R) (2,1,1,1,R) (2,0,0,2,R) (1,b,1,3,R) (2,b,0,3,R) Invitation to Computer Science, C++ Version, Third Edition

Machines for Unary Incrementing Unary representation of numbers Uses only one symbol: 1 Any unsigned whole number n is encoded by a sequence of n + 1 1s An incrementer A Turing machine that adds 1 to any number Invitation to Computer Science, C++ Version, Third Edition

State Diagram for Incrementer Figure 11.6 State Diagram for Incrementer Invitation to Computer Science, C++ Version, Third Edition

Machines for Unary Incrementing (continued) A program for incrementer (1,1,1,1,R) (1,b,1,2,R) An alternative program for incrementer (1,1,1,1,L) (1,b,1,2,L) Invitation to Computer Science, C++ Version, Third Edition

A Unary Addition Machine A Turing machine can be written to add two numbers, using unary representation The Turing machine program (1,1,b,2,R) (2,1,b,3,R) (3,1,1,3,R) (3,b,1,4,R) Invitation to Computer Science, C++ Version, Third Edition

State Diagram for the Addition Machine Figure 11.8 State Diagram for the Addition Machine Invitation to Computer Science, C++ Version, Third Edition

The Church–Turing Thesis If there exists an algorithm to do a symbol manipulation task, then there exists a Turing machine to do that task Invitation to Computer Science, C++ Version, Third Edition

The Church–Turing Thesis (continued) Two parts to writing a Turing machine for a symbol manipulation task Encoding symbolic information as strings of 0s and 1s Writing the Turing machine instructions to produce the encoded form of the output Invitation to Computer Science, C++ Version, Third Edition

Emulating an Algorithm by a Turing Machine Figure 11.9 Emulating an Algorithm by a Turing Machine Invitation to Computer Science, C++ Version, Third Edition

The Church–Turing Thesis (continued) Based on the Church–Turing thesis The Turing machine can be accepted as an ultimate model of a computing agent A Turing machine program can be accepted as an ultimate model of an algorithm Invitation to Computer Science, C++ Version, Third Edition

The Church–Turing Thesis (continued) Turing machines define the limits of computability An uncomputable or unsolvable problem A problem for which we can prove that no Turing machine exists to solve it Invitation to Computer Science, C++ Version, Third Edition

Unsolvable Problems The halting problem Decide, given any collection of Turing machine instructions together with any initial tape contents, whether that Turing machine will ever halt if started on that tape Invitation to Computer Science, C++ Version, Third Edition

Unsolvable Problems (continued) To show that no Turing machine exists to solve the halting problem, use a proof by contradiction approach Assume that a Turing machine exists that solves this problem Show that this assumption leads to an impossible situation Invitation to Computer Science, C++ Version, Third Edition

Unsolvable Problems (continued) Practical consequences of other unsolvable problems related to the halting problem No program can be written to decide whether any given program always stops eventually, no matter what the input No program can be written to decide whether any two programs are equivalent (will produce the same output for all inputs) Invitation to Computer Science, C++ Version, Third Edition

Unsolvable Problems (continued) Practical consequences of other unsolvable problems related to the halting problem (continued) No program can be written to decide whether any given program run on any given input will ever produce some specific output Invitation to Computer Science, C++ Version, Third Edition

Summary of Level 4 Topics examined in Level 4: The Software World Java: procedural high-level programming language Other high-level languages: other procedural languages, special-purpose languages, functional languages, logic-based languages Invitation to Computer Science, C++ Version, Third Edition

Summary of Level 4 (continued) Topics examined in Level 4: The Software World (continued) Series of tasks that a language compiler must perform to convert high-level programming language instructions into machine language code Problems that can never be solved algorithmically Invitation to Computer Science, C++ Version, Third Edition

Summary Models are an important way of studying physical and social phenomena Church-Turing thesis: If there exists an algorithm to do a symbol manipulation task, then there exists a Turing machine to do that task The Turing machine can be accepted as an ultimate model of a computing agent Invitation to Computer Science, C++ Version, Third Edition

Summary A Turing machine program can be accepted as an ultimate model of an algorithm Turing machines define the limits of computability An uncomputable or unsolvable problem: we can prove that no Turing machine exists to solve the problem Invitation to Computer Science, C++ Version, Third Edition