Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I wonder whether MATLAB is Turing complete (computationally universal)?

Tags:

matlab

I wonder whether MATLAB is Turing complete (= computationally universal, i.e. "if it can be used to simulate any single-taped Turing machine")?

like image 835
Kamran Bigdely Avatar asked Mar 29 '09 03:03

Kamran Bigdely


1 Answers

Being Turing complete is really a pretty low bar for real-world languages. According to Wikipedia (emphasis mine):

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.

Beyond that, MATLAB has many of the features you would expect from a relatively modern 3GL/4GL. It is complete with a VM, I/O, user interface constructs, mathematical operators (obviously), datatypes, user-defined-functions, etc. You can even deliver Matlab programs outside the Matlab environment.

Note that whether or not it's a good language is an entirely different question.

like image 148
Ben Collins Avatar answered Sep 21 '22 05:09

Ben Collins