::ICS 804:: Theory of Computation - Ibrahim Otieno - +254-0722-429297 SCI/ICT Building Rm. G15.

Slides:



Advertisements
Similar presentations
Complexity Classes: P and NP
Advertisements

1 Turing Machines and Equivalent Models Section 13.2 The Church-Turing Thesis.
CS 345: Chapter 9 Algorithmic Universality and Its Robustness
Variants of Turing machines
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Pages COMPUTABILITY THEORY.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Variants.
Markov Algorithms An Alternative Model of Computation.
::ICS 804:: Theory of Computation - Ibrahim Otieno SCI/ICT Building Rm. G15.
Complexity 11-1 Complexity Andrei Bulatov Space Complexity.
Vector Machines Model for Parallel Computation Bryan Petzinger Adv. Theory of Computing.
More Turing Machines Sipser 3.2 (pages ). CS 311 Fall Multitape Turing Machines Formally, we need only change the transition function to.
More Turing Machines Sipser 3.2 (pages ).
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
Complexity ©D.Moshkovitz 1 Turing Machines. Complexity ©D.Moshkovitz 2 Motivation Our main goal in this course is to analyze problems and categorize them.
Dr. Muhammed Al-Mulhem 1ICS ICS 535 Design and Implementation of Programming Languages Part 1 Computability (Chapter 2) ICS 535 Design and Implementation.
Lecture 5 Turing Machines
Computation Theory Introduction to Turing Machine.
CHAPTER 4 Decidability Contents Decidable Languages
Computability and Complexity 3-1 Turing Machine Computability and Complexity Andrei Bulatov.
Finite State Machines Data Structures and Algorithms for Information Processing 1.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Section 11.4 Language Classes Based On Randomization
::ICS 804:: Theory of Computation - Ibrahim Otieno SCI/ICT Building Rm. G15.
More Theory of Computing
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
Course Outline Mathematical Preliminaries Turing Machines
::ICS 804:: Theory of Computation - Ibrahim Otieno SCI/ICT Building Rm. G15.
 Computability Theory Turing Machines Professor MSc. Ivan A. Escobar
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.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
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.
1 Section 13.2 The Church-Turing Thesis The Church-Turing Thesis: Anything that is intuitively computable can be be computed by a Turing machine. It is.
CSCI 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Variants.
The Church-Turing Thesis Chapter 3 Giorgi Japaridze Theory of Computability.
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)
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
D E C I D A B I L I T Y 1. 2 Objectives To investigate the power of algorithms to solve problems. To explore the limits of algorithmic solvability. To.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Turing Machines.
::ICS 804:: Theory of Computation - Ibrahim Otieno SCI/ICT Building Rm. G15.
Lecture 3: Count Programs, While Programs and Recursively Defined Functions 虞台文 大同大學資工所 智慧型多媒體研究室.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich
1 Section 13.1 Turing Machines A Turing machine (TM) is a simple computer that has an infinite amount of storage in the form of cells on an infinite tape.
1 Turing Machines and Equivalent Models Section 13.1 Turing Machines.
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
1 Introduction to Turing Machines
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007.
Umans Complexity Theory Lectures Lecture 1b: Turing Machines & Halting Problem.
Chapter 12 Theory of Computation Introduction to CS 1 st Semester, 2014 Sanghyun Park.
1 8.4 Extensions to the Basic TM Extended TM’s to be studied: Multitape Turing machine Nondeterministic Turing machine The above extensions make no increase.
Turing Machines CS 130 Theory of Computation HMU Textbook: Chap 8.
Theory of Computation Automata Theory Dr. Ayman Srour.
Universal Turing Machine
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.
The Acceptance Problem for TMs
CSE202: Introduction to Formal Languages and Automata Theory
More variants of Turing Machines
Turing Machines Space bounds Reductions Complexity classes
CS21 Decidability and Tractability
Chapter 9 TURING MACHINES.
CS21 Decidability and Tractability
Formal Languages, Automata and Models of Computation
Decidability and Tractability
Variants of Turing Machines
Instructor: Aaron Roth
Presentation transcript:

::ICS 804:: Theory of Computation - Ibrahim Otieno SCI/ICT Building Rm. G15

Course Outline Mathematical Preliminaries Turing Machines Recursion Theory Markov Algorithms Register Machines Regular Languages and finite-state automata Aspects of Computability

Last Week: Markov Algorithms Sequential computation and Markov Algorithms Language Acceptors/Recognizers Number-theoretic functions Labeled Markov algorithms Markov-Computable functions and partial recursive functions Efficiency

Course Outline Mathematical Preliminaries Turing Machines ◦ Additional Varieties of Turing Machines Recursion Theory Markov Algorithms Register Machines Regular Languages and finite-state automata Aspects of Computability

Register Machines Register machines Register machines and formal languages Model-independent characterization of computational feasibility

Register Machines

More up-to-date way of thinking about computation A register machine (RM) consists of a finite number of registers, instruction set and a CU. We write R 0, R 1,... for the registers. Each register contains a natural number: [R i ] denotes the content of the i th register. Note: there is no bound on the size of numbers stored in our registers The CU capable of executing certain instructions that manipulate register contents.

Example Register machine M with two registers: R1 and R2 Register: variable storage Initial: R1 contains natural number n

Example R2 initializes to 0

Example M checks whether R1=R2 If yes, then M halts. If no, R2’s value is incremented

Some Pseudocode Input R1 = n OutputR2 = n Algorithm Start; R2:=0; Loop:R1=R2? goto end; R2++; goto loop; End: Halt

Example

Exercise What does this register machine compute? Try starting with R1 and R2 both containing 10

Exercise What does this register machine compute? successor function

Example (Binary Addition Function)

Additional Instructions *Ri++: increments register Rj where j is the natural number currently stored in register Ri Ri = *Rj? goto L: branch to instruction labeled L if the value in Ri is the same as the value in Rk, where k is the value currently stored in register Rj Also: *Ri =Rj?goto L *Ri = *Rj?goto L *Ri := 0 This is called indirect addressing (cf. Assembler)

Formal Definition A register machine M is any pair ◦ = {R 1, R 2, …, R m } with m  1 is a possibly infinite set of registers ◦ = with t  2 is a finite, nonempty sequence of instructions such that:  Instruction t 1 is the start instruction  Each of t 2,…,t t is either the halt instruction or an instruction of the form: (a) R i :=0 or *R i :=0 (b) R i ++or *R i ++ (c) R i =R j ? goto L or *R i =R j ? goto L or R i =*R j ? goto L or *R i =*R j ? goto L where R i and R j are members of  while L is an identifier with exactly one of instructions t 1,t 2,…,t t  t t is the Halt instruction

M computes k-ary f M’s registers R 1,R 2,…,R k contain arguments of f Ultimately, register R k+1 contains f(n 1,n 2,…,n k ) If f(n 1,n 2,…,n k ) is undefined, then M’s computation never terminates

Register-Machine-Computability f is said to be register-machine-computable if there exists a register machine that computes f

An Equivalence Result Let h be Turing-computable number-theoretic function. Then h is register-machine-computable. Then h is a partial recursive function as well. If f is register-machine-computable, then f is Turing-computable.

Register machines and formal languages

Language Acceptance/recognition Adds ◦ Input tape and output tape ◦ read(R i ) and write(R i ) instructions Initially, “input word” w on tape followed by terminating 0 (sentinel) If w  L, then 1 written to output tape If w  L, then 0 written to output tape (recogn)

Example L = {w  *|n a (w) = n b (w)} 1s represent as and 2s represent bs Register-machine-acceptable language also: palindromes

Example R1 – Input R2 – No of a’s R3 – No of b’s R4 = 0 R5 = 1 – rep a

Model-independent characterization of computational feasibility

Time Analysis Time analysis of register-machine M: count each primitive operation Uniform Cost Assumption: size of register contents make no difference M in previous example carries out 4 steps for each symbol in word w Before loop, there are 2 steps, after end-of-input sentinel 0 is encountered, five steps are executed With |w| = n, then there are 4n+5 execution steps M computes in linear time

Feasibility (recap) Cobham–Edmonds thesis regarding computational feasibility: the problem of determining whether a given string is a member of a given language L is feasible if and only if L is in P Complexity class P: class of all languages accepted in polynomial time by some (single-tape) Turing Machine

Problems with the Thesis Computable by what? Focus on single-tape Turing machine Which model of computation is the favored one? Does it make a difference?

Problems with the Thesis e.g. L = {w  *|n a (w) = n b (w)} ◦ Register machine: O(n) steps ◦ Single Tape Turing Machine: O(n 2 ) steps ◦ Multi-Tape Turing Machine: O(n) steps ◦ Markov Machine: O(n 2 ) steps

Polynomial Relatedness Suppose that multitape M TM accepts language L in O(n) steps. Then there exists M RM that accepts L in time O([time TM (n)] 2 ) under the uniform cost assumption. Suppose that M RM accepts language L in O(n) steps under the assumption of uniform cost. Then there exists multitape M TM that accepts L in time O([time TM (n)] 3 ).

Complexity (recap: MA) Given Turing machine M accepting L, there exists a Markov algorithm A S that accepts L in O(time M (n)) steps Given Markov algorithm A S accepting L, there exists a Turing machine M that accepts L in O([time A S (n)] 4 ) steps

Time and Space (recap: TM) Corollary Suppose that language L is accepted by k-tape Turing machine M. Then L is accepted by a single-tape Turing machine M 1 such that time M 1 (n) is O([time M (n)] 2 ) Corollary Suppose that language L is accepted by k-tape Turing machine M. Then L is accepted by a single-tape Turing machine M´ such that space M´ (n) is O(space M (n)).

Results Regarding Polynomial Relatedness of Models Markov Algorithm Model Multitape Turing Machine model Register Machine Model Single-tape Turing Machine model Theorem 4.3 Corollary 2.1 Theorem 5.3

Reformulation In invoking the Cobham-Edmonds thesis, it seems to make no difference which model we take Reformulation: A language-acceptance problem is feasible provided that the language in question is accepted in polynomially bounded time

More generally Invariance principle for models of sequential Computation Let Model be some machine model of sequential computation. Then Model will be said to be a reasonable model of sequential computation if it is polynomially related to the multitape Turing machine model