Question

Construct a Turing achine with on tape thai rcccivs as input an integer x 〉 1 and returns as output the integer x-1 . Integer

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Design is very simple. Since input x is in binary, so if the rightmost bit is 1, then simply we have to replace rightmost 1 by 0 and we are done. If the rightmost bit is 0 then we have to replace 0 by 1 and keep on moving left and replace 0 by 1, and when 1 is encountered then replace that 1 by 0 and we are done.

Once we are done, we simply have to move to rightmost input position with ending state being q1.

\delta (q_0, 1 ) \rightarrow (q_2, 0, R) //Replace 1 by 0 and we are done

\delta (q_0, 0) \rightarrow (q_0, 1, L) //Replace 0 by 1 and move left

\delta (q_2, 0) \rightarrow (q_2, 0, R) //Simply go to right end

\delta (q_2, 1) \rightarrow (q_2, 1, R) //simply move right

\delta (q_2, \phi) \rightarrow (q_1, \phi, L) //Once input is end, move one position left and go to q1 and finished

Please comment for any clarification.

Add a comment
Know the answer?
Add Answer to:
Construct a Turing achine with on tape thai rcccivs as input an integer x 〉 1 and returns as output the integer x-1 . Integers are represented in binary. Start of the computation: The tape contains...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Give an informal description (in plain English) of a Turing machine with three tapes that receives as input two non-negative integers x and y

    Give an informal description (in plain English) of a Turing machine with three tapes that receives as input two non-negative integers x and y, and returns as output the integer xy. Integers are represented as binary strings.Start of the computation: The first tape contains the binary representation of x and its head is on the rightmost symbol of x. The second tape contains the binary representation of y and its head is on the rightmost symbol of y. The third...

  • i need answer for this. Construct a Turing machine with two-way tape and input alphabet fa}...

    i need answer for this. Construct a Turing machine with two-way tape and input alphabet fa} that halts if tape contains a nonblank square. The symbol a may be anywhere on the tape, not necessarily to the immediate right of the tape head.

  • 3. Let x be a positive integer represented in unary form. Construct a Turing machine to compute t...

    theory of computing 3. Let x be a positive integer represented in unary form. Construct a Turing machine to compute the function fx)-3x (replace the input by function value in unary form (e.g. qo 11 1) Design a grammar for L-(a b cho,n>o). 3. Let x be a positive integer represented in unary form. Construct a Turing machine to compute the function fx)-3x (replace the input by function value in unary form (e.g. qo 11 1) Design a grammar for...

  • (1 point) This question is required to receive an A+ in the course. This question contains...

    (1 point) This question is required to receive an A+ in the course. This question contains two problems: one focussed on Computer Science, and one focussed on Mathematics. You only need to do ONE of the problems. If you choose to do both, then the best answer will be used for assessment. You do not need to do the problem corresponding to the course number you're registered in. For instance, if you are registered in MATH 2112, you may do...

  • CMPS 12B Introduction to Data Structures Programming Assignment 2 In this project, you will write...

    can i get some help with this program CMPS 12B Introduction to Data Structures Programming Assignment 2 In this project, you will write a Java program that uses recursion to find all solutions to the n-Queens problem, for 1 Sns 15. (Students who took CMPS 12A from me worked on an iterative, non-recursive approach to this same problem. You can see it at https://classes.soe.ucsc.edu/cmps012a/Spring l8/pa5.pdf.) Begin by reading the Wikipcdia article on the Eight Queens puzzle at: http://en.wikipedia.org/wiki/Eight queens_puzzle In...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT