简体   繁体   English

解释图灵机的计算

[英]Explaining Computation of a Turing Machine

I am having some trouble interpreting what this Turing machine actually does (ie, I am uncertain how to explain it in plain English). 我在解释这台图灵机的实际功能时遇到了一些麻烦(即,我不确定如何用简单的英语来解释它)。

在此处输入图片说明

I believe I have created the state diagram correctly using the transition table I was given (although not 100% on this either). 我相信我已经使用给定的转换表正确创建了状态图(尽管不是100%)。

From what I can see this TM will halt in an accepting state (q2) whenever the input is of the form 从我可以看到,只要输入为以下形式,该TM就会停止在接受状态(q2)

(a || b || B)*Ba*c(a || b || c || B)* , (a || b || B)*Ba*c(a || b || c || B)*

that is any amount of a 's, b 's, and blanks (but no c 's), followed by at least one blank, any amount of a 's, and exactly one c . 即任意数量的ab和空格(但无c ),然后是至少一个空格,任意数量的a和正好为c Anything can come after since we go left upon finding first c . 自从我们找到第一个c之后就离开了,一切都会发生。

I suppose my question is 我想我的问题是

a) Is my work up to this point correct? a)到目前为止我的工作是否正确? and

b) Is there a more meaningful explanation of this Turing machine (ie a richer description than I wrote of the input that halts in (q2) ). b)该图灵机是否有更有意义的解释(即比我在(q2)中停止输入的内容更丰富的描述)。

Some observations: 一些观察:

  1. q0 reads left to right, doesn't change the tape, and stops when it hits c. q0从左到右读取,不换带,当碰到c时停止。
  2. q1 reads left to right, swaps a and b, halts when it sees a B and turns around when it hits an a. q1从左到右读取,交换a和b,在看到B时停止,并在碰到a时转过身。
  3. The only way to for the TM to halt is if TM停止的唯一方法是
    • There is ac somewhere on the tape to the right of the initial tape position 初始磁带位置右侧的磁带上某处有交流电
    • In q1, the last pass from right to left sees only b and leaves only a between the first c and the rightmost B to the left of c. 在q1中,从右到左的最后一次传递仅看到b,而在第一个c和c的最右边B之间仅留下a。
  4. q1 changes everything between the first c and the rightmost b to the left of that c to ab eventually q1最终将第一个c和该c左边最右边的b之间的所有内容更改为ab

Given initial tape configuration >BxBycz, the machine will always halt in configuration >BxB(a^|y|)cz. 给定初始磁带配置> BxBycz,机器将始终停止在配置> BxB(a ^ | y |)cz。 It accepts any string that contains c. 它接受任何包含c的字符串。

Your state diagram disagrees with the table in that the table has the transition function defined so that f(q1, a) = (q0, b, L) and f(q1, b) = (q1, a, L), but your diagram shows f(q1, a) = (q1, a, L) and f(q1, b) = (q0, b, L). 您的状态图与该表不同,因为该表已定义了转换函数,因此f(q1,a)=(q0,b,L)和f(q1,b)=(q1,a,L),但是该图显示了f(q1,a)=(q1,a,L)和f(q1,b)=(q0,b,L)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM