Question: It assesses the learning outcomes: Understand the Turing Machine model of computation. Explain how an algorithm or data structure works, in order to communicate with
It assesses the learning outcomes:
Understand the Turing Machine model of computation.
Explain how an algorithm or data structure works, in order to communicate with relevant stakeholders.
We want a Turing machine that checks if a string is a palindrome, ie is the same as when read backwards. The input tape consists of zero or more zeros and ones, followed by blanks. The output is if the input is a palindrome, otherwise You may modify the input symbols.
For example, if the input is then the
output is whereas input leads to output
Qa
Write the transition table for the Turing machine. Organise the transitions by state or by the order they're executed. Use descriptive state names.
Suggestions: Write and test a machine that handles evenlength inputs and then handles oddlength inputs. 'Remove' ie blank out input symbols as you process them.
You should add tests to check your Turing machine.
In palindrometests, set the debug parameter toTrueif you want to see the configurations your Turing machine goes through.
run i mutil
run i mtm #In the picture
palindrome
# write the transitions here in the form
# state symbol: newsymbol, LEFT or RIGHT or STAY, newstate
palindrometests
# case, TM input tape, debug, output tape
palindrome palindrome, False,
not palindrome', palindrome, False,
testrunTM palindrometests
Qb
Explain how your Turing machine works, describing the main transitions and the purpose of each state. Your answer shouldn't be a direct translation of the transition table to English.
Include diagrams, if you wish, drawn by hand or with a computer.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
