a) According to the given function for a positive integer , design a Turing Machine to compute the function. ( is in binary format) f(x)=2x if x is even, f(x)=4x+1 if x is odd. please draw a turing machine design
Added by Amparo J.
Step 1
--- Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 76 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
A Turing machine is said to compute a function f if, started with an input x on its tape, it halts with f(x) on its tape. Consider a binary operator Δ and a function f defined as follows. 0 Δ 0 = 1, 0 Δ 1 = 1, 1 Δ 0 = 0, 1 Δ 1 = 1 f : {0, 1}^n × {0, 1}^n → {0, 1}^n, n ∈ ℤ - ℤ⁻ f(a, b) = {c_1c_2 . . . c_n | c_i = a_i Δ b_i, i = 1, 2, . . . , n} Consider the Turing machine, M, that computes f given a #-separated pair of binary strings as input. The Turing machine should print nothing if the function is undefined. (a) Give a high-level description of M. (b) Give a formal description of M, expressing the transition function, δ, as a state diagram that shows all the transitions.
Akash M.
Sanchit J.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD