Question: ( 1 0 points ) Construct a Turing Machine ( using a transition graph ) that computes the function f ( n ) = n

(10 points) Construct a Turing Machine (using a transition graph) that computes the
function f(n)=n-3 if n3 and f(n)=0 for n=0,1,2,dots (for all nonegative
integers). You may assume that the tape input is in unary notation.
f(n)={n-3,ifn30,if0n3
Example 1:
n=5,w(n)=11111
Input w(n)
Output w(n-3)
Computation
q0w(n)|--?*w(n-3)qa
Example 2:
n=2,w(n)=11
Input w(n)
Output w(0)
Computation
q0w(n)|--?*w(0)qb
 (10 points) Construct a Turing Machine (using a transition graph) that

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!