作者future1234 (Creep)
看板TransCSI
标题Re: [问题] 96年政大资科
时间Thu Jul 3 14:28:22 2008
※ 引述《edhs0011 (伟)》之铭言:
: 请问各位关於第5题Turing machine
: 所谓turing machine 他的指令运作方式为何?
: 何谓symbol及state?
: 题目如下
: a turing machine instruction consists of 5 components:
: (current state, current symbol, next symbol, next state , direction of move)
: given a turing machine with the following avaliable instruction
: (1,0,1,2,R), (1,1,1,2,R), (2,0,1,2,R), (2,1,0,2,R), (2,b,b,3,L)
: and initial configuration show below:
: -----------------------------------------------
: | . | . | b | b | 0 | 1 | 1 | b | b | . | . | . |
: -----------------------------------------------
: ^
: |
: 1
1. show the sequential of operation performed by this turing machine.
b b 0 1 1 b b
^
|
1
一开始的状态是 "1" ,开始的符号是 "0" , 所以我们可以找到(1,0,1,2,R)这条指令
执行结果如下:
b b 1 1 1 b b
^
|
2
执行完(1,0,1,2,R)这条指令後 ,因为next state是"2",且方向往右边移动,
指到的符号为"1",所以我们找到(2,1,0,2,R)这条指令,
执行结果如下:
b b 1 0 1 b b
^
|
2
经过一连串动作 ,就是下面的操作, 直到"halt" ,就是没有所提供的指令
可以执行的时候 ,我们就可以停止了
operation
----------------------------------------
Initial b b 0 1 1 b b
^
(1,0,1,2,R) b b 1 1 1 b b
^
(2,1,0,2,R) b b 1 0 1 b b
^
(2,1,0,2,R) b b 1 0 0 b b
^
(2,b,b,3,L) b b 1 0 0 b b
^
: 2. a bit inverter converts 0s to 1s and 1s to 0s. design a turing machine that
: will do the bit conversion and illustrate the conversion process with the
: string 1101.
: 终於key完了...希望有好心的高手能够交我^^
这题留给大家练习
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 211.74.191.134
1F:推 abien:future1234真神人, 一定会上的 07/03 16:15
2F:推 hothero:恩= =~上了... 07/03 17:02
3F:推 rainphiz:高手, 谢啦 07/03 17:12
4F:推 thbw666:那麽专业 我岂不成了炮灰= = 07/03 17:30
5F:推 edhs0011:感谢future 看到你就像看到未来^^ 07/03 17:32