Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Turing machine vs Von Neuman machine

Background

The Von-Neumann architecture describes the stored-program computer where instructions and data are stored in memory and the machine works by changing its internal state, i.e an instruction operates on some data and modifies the data. So inherently, there is state maintained in the system.

The Turing machine architecture works by manipulating symbols on a tape. i.e A tape with infinite number of slots exists, and at any one point in time, the Turing machine is in a particular slot. Based on the symbol read at that slot, the machine can change the symbol and move to a different slot. All of this is deterministic.


Questions

  1. Is there any relation between these two models? Was the Von Neuman model based on or inspired by the Turing model?

  2. Can we say that Turing model is a superset of Von Newman model?

  3. Does functional Programming fit into Turing model? If so, how? I assume functional programing does not lend itself nicely to the Von Neuman model.

like image 206
Santhosh Avatar asked May 06 '10 14:05

Santhosh


People also ask

Is there any machine better than Turing machine?

Algorithms and automata that are more powerful than Turing machines are called super-recursive. Computations that cannot be realized or simulated by Turing machines are called hyper-computations.

Is Turing machine the most powerful machine?

Turing machines are more powerful than both finite automata (FA) and pushdown automata (PDA). They are as powerful as any computer we have ever built. Infinite “all” accessible memory (in the form of a tape) – option to read and write to it.

How did Alan Turing and John von Neumann's work change the world?

They made major contributions during the Second World War: Turing on cryptography and von Neumann on weapons development. The Turing machine formalised the idea of an algorithm and the Turing test is important in artificial intelligence while von Neumann founded the subject of game theory.

What is the difference between a Turing machine and a computer?

TL;DR: A Turing machine is a conceptual model, a computer is a physical device. It is proven that a Turing machine can calculate anything calculable, so you can prove a language or a device can calculate anything by showing that you can implement a Turing machine with it.


2 Answers

Turing machines are theoretical concepts invented to explore the domain of computable problems mathematically and to obtain ways of describing these computations.

The Von-Neumann architecture is an architecture for constructing actual computers (which implement what the Turing machine describes theoretically).

Functional programming is based on the lambda-calculus, which is a another method of describing computations or - more precisely - computable functions. Though it uses a completely different approach, it is equally powerful to Turing machine (it's said to be turing complete).

Every lambda-calculus program (term) T is written just using a combination of

  • variables like x
  • anonymous functions like λx. T
  • function applications T T

Despite being stateless, this is sufficient for every computation a computer can do. Turing machines and lambda terms can emulate each other, and a Von-Neumann computer can execute both (apart from technical restrictions like providing infinite storage, which a turing machine could require).

But due to their stateless and more abstract nature, functional programs might be less efficient and less "intuitive" on Von-Neumann computers compared to imperative programs which follow it's style of binary, memory and update.

like image 200
Dario Avatar answered Sep 19 '22 07:09

Dario


Generally one refers to the Von Neumann architecture, as contrasted with the Harvard architecture. The former has code and data stored in the same way, whereas the latter has separate memory and bus pathways for code and data. All modern desktop PCs are Von Neumann, most microcontrollers are Harvard. Both are examples of real-world designs that attempt to emulate a theoretical Turing machine (which is impossible because a true Turing machine requires infinite memory).

like image 24
rmeador Avatar answered Sep 19 '22 07:09

rmeador