Computability Turing machines for functions. Recursive functions. Homework: Modify class example for addition to produce contiguous 1s. Construct TM for.

Slides:



Advertisements
Similar presentations
1 Turing Machines and Equivalent Models Section 13.2 The Church-Turing Thesis.
Advertisements

Lecture 16 Deterministic Turing Machine (DTM) Finite Control tape head.
Primitive Recursive Functions (Chapter 3)
The Recursion Theorem Sipser – pages Self replication Living things are machines Living things can self-reproduce Machines cannot self reproduce.
Complexity 11-1 Complexity Andrei Bulatov Space Complexity.
Homework 8 Solutions #1 True or False a) Regular languages are recursive b) Context free languages are recursively enumerable (r.e.) c) Recursive languages.
Fall 2004COMP 3351 Recursively Enumerable and Recursive Languages.
Mu-Recursive Functions
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Recursively Enumerable and Recursive Languages
Fall 2004COMP 3351 Turing Machines. Fall 2004COMP 3352 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Uncountable Sets continued Theorem: Let be an infinite countable set. The powerset of is uncountable.
CS 310 – Fall 2006 Pacific University CS310 Turing Machines Section 3.1 November 6, 2006.
Dr. Muhammed Al-Mulhem 1ICS ICS 535 Design and Implementation of Programming Languages Part 1 Computability (Chapter 2) ICS 535 Design and Implementation.
Courtesy Costas Busch - RPI1 Turing Machines. Courtesy Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Turing Machines.
Fall 2004COMP 3351 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem.
Homework #9 Solutions.
1 Decidability continued. 2 Undecidable Problems Halting Problem: Does machine halt on input ? State-entry Problem: Does machine enter state halt on input.
Fall 2005Costas Busch - RPI1 Recursively Enumerable and Recursive Languages.
Costas Busch - RPI1 Turing Machines. Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem.
September 17, 2009Theory of Computation Lecture 4: Programs and Computable Functions III 1 Macros Now we want to use macros of the form: W  f(V 1, …,
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Prof. Busch - LSU1 Turing Machines. Prof. Busch - LSU2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem.
Lecture 18 Various TMs. Allow the head not move Theorem. If the head is allowed to stay at the cell in each move, then every function computed by the.
Turing Machines A more powerful computation model than a PDA ?
1 111 Computability Computability Administration Brief introduction to course Homework: Obtain book. Sign on to Moodle: introduce.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
111 Computability, etc. Recap. Present homework. Grammar and machine equivalences. Turing history Homework: Equivalence assignments. Presentation proposals,
111 Discrete Mathematics Computability Brief introduction to computable functions, recursive functions, etc. Jeanine Meyer.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
1 Turing Machines There are languages that are not context-free. What can we say about the most powerful automata and the limits of computation?. Alan.
1 The Halting Problem and Decidability How powerful is a TM? Any program in a high level language can be simulated by a TM. Any algorithmic procedure carried.
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.
7-6 Function Operations Objective 2.01
1 Turing Machines Reading: Chapter 8. 2 Turing Machines are… Very powerful (abstract) machines that could simulate any modern day computer (although very,
Chapter 10 Computable Functions Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
Theory of Computation Lecture 5: Primitive Recursive Functions I
Computability Go over homework problems. Godel numbering. Homework: prepare for midterm.
Lecture 3: Count Programs, While Programs and Recursively Defined Functions 虞台文 大同大學資工所 智慧型多媒體研究室.
Turing Machines Lecture 26 Naveen Z Quazilbash. Overview Introduction Turing Machine Notation Turing Machine Formal Notation Transition Function Instantaneous.
Recursively Enumerable and Recursive Languages
1 Turing Machines - Chap 8 Turing Machines Recursive and Recursively Enumerable Languages.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Introduction to Turing Machines
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Computing Functions with Turing Machines. 2 A function Domain Result Region has:
Turing Machines CS 130 Theory of Computation HMU Textbook: Chap 8.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Recursively Enumerable and Recursive Languages.
Kolmogorov Complexity
CSE202: Introduction to Formal Languages and Automata Theory
Recursively Enumerable Languages
Recursively Enumerable and Recursive Languages
Busch Complexity Lectures: Turing Machines
Computing with Turing Machines
COSC 3340: Introduction to Theory of Computation
Computing Functions with Turing Machines
Turing Machines 2nd 2017 Lecture 9.
Chapter 9 TURING MACHINES.
Decidable Languages Costas Busch - LSU.
Computing Functions with Turing Machines
Formal Languages, Automata and Models of Computation
CSE S. Tanimoto Turing Completeness
Instructor: Aaron Roth
Computability Catch up last lecture. Turing machines. Variations
Formal Definitions for Turing Machines
Presentation transcript:

Computability Turing machines for functions. Recursive functions. Homework: Modify class example for addition to produce contiguous 1s. Construct TM for multiplication. If we don't finish in class: show multiplication is recursive and show proper subtraction is recursive.

Turing machine for functions Up until now, our TM had input a string and either accepted or rejected or did not halt. A variation of TM is to have TM compute functions (stick to natural numbers to natural numbers) – input be representation of a natural number (0, 1, 2, …): 1 stands for 0, 11 stands for 1, (n+1) 1s stand for n. – When TM stops, the number of 1s on the tape is the answer. No 1s represents 0, n 1s represent n.

Generalization Functions on vectors to vectors F(n, m) → (v, w, z) Use blanks in-between or use a special symbol, such as comma or $.

Examples F(n) = n Job of TM is to erase one 1. S0 reading a 1, writes a blank, and changes to S1, which is a final state. No more action. F(n) = 1 Job is to erase all but one 1. S0 reading a 1, moves right, changes to S1. S1 reads a 1, writes a blank, moves right. S1 reading a blank, changes to S2, a final state.

Examples F(n,m) = n+m. Assume representation has blank in-between two inputs. Job is to erase two 1s from initial representation. S0 read 1, write a blank, go right, change to S1. S1 read 1, go right. S1 read blank, change to S2, go right. S2 read 1, write a blank, change to S3. S3 final. NOTE: an improved version would be to make the answer be 1 contiguous string of 1s, starting at the left hand end of the tape. HOMEWORK!

Switch: Recursive functions [More] mathematical type of definition. The recursive functions are a set of functions defined using a starter set and allowing any functions that can be defined using a finite number of applications of composition, primitive recursion, and minimalization (will define the last two)

Starter set Identity F(x) = x This is special case of Projections U i n (x 1, x 2,…,x n ) = x i Successor S(x) = x+1 Constant F c (x) = c

Composition Given F and G, FG (x) = F(G(x))

Primitive recursion Motivation similar to mathematical induction, definition of factorial, exponentiation. – Have definition for the zero case. Have way for building. x 0 = 1 x (n+1) = x n * x

Primitive recursion Given functions f: N → N and g: (N,N,N) →N, then define h: (N,N) as follows h(x,0) = f(x) h(x,y+1) = g(x,y,h(x,y)) You will see variations. For example, f: N n and g: N n+2

Addition Want h(x,y) = x+y. Can we do this using primitive recursion, that is, are there some simpler functions Let f(x) = x. Then h(x,0) = f(x) = x = x+0 okay! Working backwards, I need to define g so that h(x,y+1) = x+y+1 and h(x,y+1) = g(x,y,h(x,y)). Let g(x,y,z) = S(P 3 3 (x,y,z))

Classwork Do multiplication!

Minimalization Also think of it as inverse. If f(x) is recursive, then define g to be g(y) = min {x | f(x) = y} if any x exists. Otherwise, g(y) is undefined.

Total versus partial A function is total if it is defined for all its domain (in this case, the counting or natural numbers). A function is partial if it is defined for some, possibly all, of its domain.

Classwork/Homework Define (proper) subtraction, if x >= y, then B(x,y) = x-y. If x < y, then B(x,y) undefined. Show B(x,y) is recursive. Hint: two-steps: define P(x) = x-1 if x>0, undefined otherwise. Show P(x) is recursive (using minimalization). THEN use P(x) to define B(x,y).

Definition The recursive functions are all functions that can be defined starting with the starter set and using a finite number of applications of composition, primitive recursion and minimalization. A recursive function is total if it is defined for all of N.

Claim All functions implemented by Turing machines are recursive. – Harder direction. Use Godel numbering. Will not give complete proof. All recursive functions can be implemented by a Turing machine. – Easier direction. Build TM for starter sets. Need a fix-up function to get things in proper format for next step. Describe process for doing composition, primitive recursion, and minimalization.