Download presentation
Presentation is loading. Please wait.
Published byClement Price Modified over 9 years ago
1
Lab Session 1 Turing Machines
2
Install Download and unzip TM.zip on the desktop Start the “Turing Machine” executable File>machine>load COPYING.TM File>tape>load Tape 8.tt Press CTRL-T to display the tape Press the “step” button repeatedly and monitor what is going on until the machine halts
3
First Try Build the following TM File>machine>new (default options ok) A bug in the program might display part of the previous TM. It is not actually there
4
First Try Press CTRL-A to show Alphabet Window Define the alphabet: ◦ Alphabets>Set Input Alphabets ◦ and choose “1” and press IMPORTANT: you have to define the alphabet before you do anything else. You can’t change the alphabet once you start designing the TM
5
First Try Create 3 states: ◦ Click on ◦ And click anywhere on the blank screen to draw the state Create 2 transitions: ◦ Click on ◦ Click on state0 and state1 and then click somewhere in between the two states to draw the transition
6
First Try The dialogue on the right will appear For the 1 st transition ◦ select 1 as scan symbol ◦ L as action For the 2 nd transition ◦ press space in the scan symbol box (results in „ = blank) ◦ 1 as action
7
First Try Press CTRL-T to display the tape Write 111 as a representation of number 2 Set the head of the machine on the first 1 and run the machine step by step and monitor the actions
8
Exercise 1 Select a language from the list below and create a language accepting Turing Machine for it (you can use any variation oneway/twoway, (non)deterministic, single/multitape, terminal state) ◦ (a) {a 2 b n |n 0} ◦ (b) {a 2 b n |n 1} ◦ (c) {a 3 b n |n 2} ◦ (d) {a n b 2 |n 0} ◦ (e) {a n b 3 |n 1} ◦ (f) {a 2 b n a 3 |n 0} ◦ (g) {ba 2 b n |n 0} ◦ (h) {b 2 a 2 b n a|n 0} ◦ (i) {b 2 a 2 b n |n 1} (j) {a 2 b n |n2} (k) {a n b m |n,m0} (l) {a 2 b n |n4} (m) {a 2 b n c n |n0} (n) {(ab) n |n0} (o) {a 2n |n0} (p) {a n b m a n |n,m0} (q) {a n |n prime}
9
Exercise 2 Create a number-theoretic function computing Turing Machine for one of the following functions (you can use any variation oneway/twoway, (non)deterministic, single/multitape, terminal state ) ◦ f(n) = 2n + 3 ◦ f(n) = 3n ◦ f(n) = 3n + 4
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.