Download presentation
Presentation is loading. Please wait.
1
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University pursuant to Part VB of the Copyright Act 1968 (the Act). The material in this communication may be subject to copyright under the Act. Any further reproduction or communication of this material by you may be the subject of copyright protection under the Act. Do not remove this notice.
2
Computability CSE2303 Formal Methods I Lecture 15
3
Overview Representing natural numbers Functions of one variable Tuples Functions of several variables Church’s Thesis
4
ASCII Code
5
Binary Code
6
Unary Code
7
Successor Using the unary code for natural numbers build a Turing Machine that represents the function f(n) = n + 1. ... a a aa aaa n + 1 ... aa n
8
Successor HALT ( , a, R) (a, a, R) START
9
Double Using the unary code for natural numbers build a Turing Machine that represents the function f(n) = 2*n. ... a aa a a 2*n... aa n
10
Double HALT ( , , R) START (a, #, R) (a, a, R) (A,A,R) ( , A, L) (a, a, L) (A,A,L) (#, a, R) (A, a, R) (a, #, R) (A, a, R) ( , , L)
11
Unary Code for Tuples of Integers Tuples of natural numbers Example: 1, 0, 2, 3 Encoding: –Each integer is coded using the unary code as a string of a ’s –Integers are separated by a b. Example: abbaabaaa
12
Addition Using the unary code of natural numbers build a Turing Machine that represents the function f(n, m) = n+m. ab ... 1, 0 a ... 1 + 0 aa ... 1 + 1 aba... 1, 1
13
Addition HALT (b, a, R) ( , , L)(a, , R) (a, a, R) START
14
Monus Using the unary code of tuples of natural numbers build a Turing Machine that represents the function: f(n,m) = n – m, n m 0, Otherwise
15
HALT START (a, A, R) (a, a, R) (b, b, R) (a, a, R) ( , , L) (b, , R) (a, , R) ( , , L) (a, a, R) ( , , R) (b, b, R) (a, , R) ( , , L) (a, a, L) (b, b, L) (a, , L) (A, , R)(b, , R) (a, , R) ( , , R) (A, a, R) (b, , L) (a, a, L) ( , ,L)
16
Definition A computable function can be represented as: A Turing Machine Input –sequences of natural numbers Output –one natural number
17
Church’s Thesis Any function which can defined by an algorithm is a computable function.
18
Revision Know what is the unary code for natural numbers Know what is the unary code for tuples of natural numbers Know what is a computable function, and how to define one using a TM. Know and understand Church’s Thesis. Preparation Read –Pages 545-549 in the Text Book
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.