gpt4 book ai didi

matlab - 我想知道 MATLAB 是否是图灵完备的(计算通用的)?

转载 作者:太空宇宙 更新时间:2023-11-03 19:09:34 25 4
gpt4 key购买 nike

不知MATLAB是不是Turing complete (= 计算通用,即“如果它可以用来模拟任何单带图灵机”)?

最佳答案

图灵完备对于现实世界的语言来说确实是一个相当低的标准。根据Wikipedia (强调我的):

To show that something is Turing complete, it is enough to show that it can be used to simulate some Turing complete system. For example, an imperative language is Turing complete if it has conditional branching (e.g., "if" and "goto" statements, or a "branch if zero" instruction. See OISC) and the ability to change arbitrary memory locations (e.g., the ability to maintain an arbitrary number of variables). Since this is almost always the case, most if not all imperative languages are Turing complete if we ignore any limitations of finite memory.

除此之外,MATLAB 还具有您期望从相对现代的 3GL 中获得的许多功能/4GL .它包含 VM、I/O、用户界面结构、数学运算符(显然)、数据类型、用户定义函数等。您甚至可以在 Matlab 环境之外交付 Matlab 程序。

请注意,它是否是一种好的语言是一个完全不同的问题。

关于matlab - 我想知道 MATLAB 是否是图灵完备的(计算通用的)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/694058/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com