输入字符串如何在磁带中表示?
我知道在图灵机中,(不同的)磁带用于输入和输出以及堆栈。在使用图灵机添加 2 个数字的问题中,输入要处理许多符号,例如 1,0,B(空白),+。
(虽然这个问题与物理学有关,但我在这里问是因为我认为他们可能不了解图灵机及其输入。)
我的疑问是, 若输入为BBBBB1111+111111BB, 然后在磁带上,
1->用北极表示(例如)。
0-> 用南极点表示(例如)。
B->用无极性表示。
然后, “+”将如何表示? 我不认为会有一些特殊符号的代码(如 ASCII)。 由于特殊符号的数量和类型将取决于实现。另外,特殊的代码也会使算法变得更加乏味。
或者
磁带中的输入符号表示与上述方法完全不同吗?如果是,请解释。
I know that in turing machines, the (different) tapes are used for both input and output and for stack too. In a problem of adding 2 numbers using turing machine, the input is dealing with many symbols like 1,0,B(blank),+.
(Tough this questions is related to physics, I asked here since I thought they mayn't know about turing machines and their inputs.)
And my doubt is ,
If the input is BBBBB1111+111111BB,
then in magnetic tape,
1->represented by North polarity(say).
0->represented by south polarity(say).
B->represented by No polarity.
Then,
How '+' will be represented?
I doesn't think that there will be some codes(like ASCII) for special symbols.
Since the number and type of special symbols will be implementation dependent. Also special codes will make the algorithm more tedious.
or
Is the input symbol representation in tapes is entirely different from the above mentioned method?If yes, please explain.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能会通过用多个位对每个字符进行编码来做到这一点。例如:
您的读取头尺寸为 2,并且在移动时始终向左或向右移动两步。
You would probably do this by having each character encoded with multiple bits. For example:
Your read head would then have size two and would always move two steps to the left or the right when making a move.