Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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, i.e. is the same as when read backwards. The input tape consists of zero or more zeros and ones, followed by blanks. The output is 1 if the input is a palindrome, otherwise 0. You may modify the input symbols.
For example, if the input is [1,0,1] then the
output is [1], whereas input [1,0] leads to output [0].
Q5(a)
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 even-length inputs and then handles odd-length inputs. 'Remove' (i.e. blank out) input symbols as you process them.
You should add tests to check your Turing machine.
In palindrome_tests, set the debug parameter toTrueif you want to see the configurations your Turing machine goes through.
run -i m269_util
%run -i m269_tm #In the picture
palindrome ={
# write the transitions here in the form
# (state, symbol): (new_symbol, LEFT or RIGHT or STAY, new_state),
}
palindrome_tests =[
# case, TM, input tape, debug, output tape
('palindrome', palindrome, [1,0,1], False, [1]),
('not palindrome', palindrome, [1,0], False, [0]),
]
test(run_TM, palindrome_tests)
Q5(b)
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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Current Trends In Database Technology Edbt 2006 Edbt 2006 Workshops Phd Datax Iidb Iiha Icsnw Qlqp Pim Parma And Reactivity On The Web Munich Germany March 2006 Revised Selected Papers Lncs 4254

Authors: Torsten Grust ,Hagen Hopfner ,Arantza Illarramendi ,Stefan Jablonski ,Marco Mesiti ,Sascha Muller ,Paula-Lavinia Patranjan ,Kai-Uwe Sattler ,Myra Spiliopoulou ,Jef Wijsen

2006th Edition

3540467882, 978-3540467885

More Books

Students also viewed these Databases questions

Question

What is meant by service level?

Answered: 1 week ago