World's most popular travel blog for travel bloggers.

[Solved]: What is the difference between RAM and TM

, , No Comments
Problem Detail: 

In case of algorithm analysis we assume a generic one processor Random Access Machine(RAM). As I know RAM is machine which is no more efficient than the Turing machine.All algorithms can be implemented in the Turing machine.So my question is if Turing machine is equally efficient as RAM, then why we are not assuming Turing machine for algorithm analysis.What is the difference between RAM and TM.

Asked By : tanmoy

Answered By : Yuval Filmus

Turing machines are not as efficient as RAM machines. A RAM machine can access an arbitrary tape location in $O(1)$. A Turing machine can't. A RAM machine can do arithmetic in $O(1)$ (under certain restrictions). A Turing machine can't.

Turing machines polynomially simulate RAM machines, that is, for some constant $c$, any RAM machine running in time $O(n^k)$ can be simulated by a Turing machine running in time $O(n^{ck})$. (The constant is pretty reasonable, about $2$, depending on the Turing machine model.)

Best Answer from StackOverflow

Question Source : http://cs.stackexchange.com/questions/22418

0 comments:

Post a Comment

Let us know your responses and feedback