3. (9 points) Design Turing Machines using JFLAP to compute the following function where x is an integer represented in unary. The value f(x) represented in unary should be on the tape surrounded by blanks after the calculation. Also show some test cases. f(x) = x (mod5)
Added by Heather H.
Close
Step 1
This will make it easier to perform the modulo operation. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 52 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Construct Turing machine for f(n) n mod 3 for numbers n that are written on the tape in unary format where n = 1, 11, 111, 1111, etc. Run your machine on the input: 1.1.1.1.1.1. So you are to find 5 mod 3.
Madhur L.
Let <M1>, <M2>, <M3>, ... be an enumeration of all Turing machines with input alphabet {0, 1}. Let w1, w2, w3, ... be an enumeration of all binary strings. Prove that D = {wi | i ≥ 0 and Mi does not accept wi} is not Turing-recognizable. Hint: Use contradiction—assume D is Turing-recognizable and then use diagonalization.
Construct a Turing machine that computes the function $f(n)=3 n$ for all nonnegative integers $n .$
Modeling Computation
Turing Machines
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD