寻找图灵不完整的语言 [英] Looking for languages that are not Turing complete

查看:128
本文介绍了寻找图灵不完整的语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对turing-完整的语言,但为了更好地理解,有人可以举例说明图灵不完整的语言吗? (也许甚至不是不是图灵机?)

I know a little about what is a turing-machine and a turing-complete language, but to understand better, could someone give examples of languages that are not Turing complete? (maybe even machines that are not Turing, as well?)

推荐答案

正则表达式,在正式定义中,仅包含:

Regular expressions, in the formal definition, consisting only of:


  • 串联(ab)

  • 无界重复(a *)

  • 替代(a | b)

  • 分组((ab)|(cd))

  • concatenation ( ab )
  • unbounded repetition ( a* )
  • alternation ( a|b )
  • grouping ( (ab)|(cd) )

只能识别常规语言。一种图灵完备的编程语言可以识别递归枚举的语言。

can only recognise regular languages. A Turing-complete programming language can recognise recursively-enumerable languages.

一个例子是正则表达式无法告诉您字符串是否由匹配的括号对组成:例如()(())被接受,而()(((())())被拒绝,而图灵完成编程语言可以。

An example is that regular expressions cannot tell you if a string consists of matched pairs of parentheses: eg ()(()) is accepted while ()((())() is rejected, while Turing-complete programming languages can.

(请注意,现代编程语言中的正则表达式比正则表达式的正式学术定义更强大。有些甚至可能是图灵完整的。)

(Note that regexes in modern programming languages are more powerful than the formal academic definition of regular expressions. Some may even be Turing complete.)

这篇关于寻找图灵不完整的语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆