lab6v5 The Turing Machine

Transkrypt

lab6v5 The Turing Machine
Theory of Computer Science
Lab6v5
The Turing Machine
2015
p.1
Part 1 Run the simulator of Turing Machine
Part 2 Completing this task is worth (3).
On the memory tape, is placed the integer number with the sign.
This number is written in the mode of the two's complement of a binary number.
1. Subtract 1 from the number.
2. Cycle shift to the left.
Przesunięcie cykliczne w lewo. 011101->111010
3. Cycle shift to the right.
Przesunięcie cykliczne w prawo. 011101->101110
4. Generation of even parity bit. Generacja bitu parzystości.
011101->0111010
5. Generation of odd parity bit. Generacja bitu nieparzystości. 011101->0111011
(123456->234561)
(123456->612345)
011001->0110011
011001->0110010
Part 3 Completing this task is worth (4).
Operation on text consist of letter ‘a’, ’b’, ’c’. Check if the text is correct.
Text is correct if:
6. signs ‘b’ only in pair (‘bb’,’bbbb’,…) and every ‘a’ only after ‘c’ (‘ca’)
7. every first ‘a’ in sequence of letters ‘a’ only after 'b' and number of appearance 'b' is odd
8. every 'b' only after 'a' and number of appearance 'a' is odd
9. every first ‘b’ in sequence of letters ‘b’ only after 'c' and signs ‘c’ only in pair
Operacje na tekście składającym się z liter ‘a’, ’b’, ’c’. Sprawdzić czy napis jest poprawny.
Jest poprawny jeżeli spełnia następujące warunki.:
6. znaki ‘b’ jedynie parami (‘bb’,’bbbb’,…) oraz każde ‘a’ jedynie po ‘c’ (‘ca’)
7. każde pierwsze ‘a’ w ciągu liter ‘a’ jedynie po 'b' oraz liczba wystąpień 'b' nieparzysta
8.
9.
każde b'' jedynie po 'a' oraz liczba wystąpień 'a' nieparzysta
każde pierwsze ‘b’ w ciągu liter ‘b’ jedynie po 'c' oraz znaki ‘c’ jedynie parami
Part 4 Completing this task is worth an A (5).
For tasks 10 to 13 you can destroy the original text – just check if the text was correct or not correct.
10. number of appearance 'a' is equal number of appearance 'b'.
11. number of appearance 'a' i 'b' is equal number of appearance 'c'.
(a+b=c)
12. number of appearance 'a'-'b' = 'c'
13. number of appearance 'c'-'a' is odd
W poniższych zadaniach można zniszczyć napis – czyli należy jedynie sprawdzić czy napis był poprawny.
10. Liczba wystąpień 'a' jest równa liczbie wystąpień 'b'.
11. Liczba wystąpień 'a' i 'b' równa liczbie wystąpień 'c'.
12. Liczba wystąpień 'a'-'b' ='c'
13. 'c'-'a' = nieparzyste
(a+b=c)
Theory of Computer Science
Lab6v5
The Turing Machine
Additional information:
• Move of the Turing machine Rij = (sk, ql, P):
sk –new symbol written to the tape (this replaces previous symbol si)
P – change of position of the read – write head: (above memory tape)
p – position the read-write head over the square to the right, of the current position
l – position the read-write head over the square to the left, of the current position
n – don’t change the position (neutral)
ql – change the state of processor P to ql
Algorithm processed by TM is realized according to the State Table Description
s - Set of symbols s1,…….,sn.
q - State of the read-write head (processor) q1,….,qm.
Otwórz
Zapisz
Dodaj kolumnę
Usuń kolumnę
Dodaj wiersz
Usuń wiersz
Krok
Wykonaj
open
save
add column
delete column
add line
delete line
step
execute
2015
p.2

Podobne dokumenty