# Is the memory-runtime tradeoff an equivalent of Heisenberg's uncertainty principle?

When I work on an algorithm to solve a computing problem, I often experience that speed can be increased by using more memory, and memory usage can be decreased at the price of increased running time, but I can never force the product of running time and consumed memory below a clearly palpable limit. This is formally similar to Heisenberg's uncertainty principle: the product of the uncertainty in position and the uncertainty in momentum of a particle cannot be less than a given threshold.

Is there a theorem of computer science, which asserts the same thing? I guess it should be possible to derive something similar from the theory of Turing Machines.

(I asked this question originally on StackOverflow.)

• the tradeoff you refer to is probably related to disk vs RAM which is not distinguished in $O(n)$ measurements of memory only in TMs. however there are some models that model disk/RAM tradeoff. you might look into Cache oblivious algorithm/model. papers on cache oblivious algorithms do state algorithm times in terms of the two parameters $M$ (memory) and $D$ (disk) and the tradeoff between them.
– vzn
Aug 7, 2013 at 17:53
• & its not so much an uncertainty as a simple numerical tradeoff. both quantities $M$ and $D$ can be precisely expressed.
– vzn
Aug 7, 2013 at 18:01
• Without serious insight one cannot rule out a possiblity of such a "law" in turing machines or cannot establish it rigorously either. After all the running time of an algorithm is reduced by obtaining "information" from the data set (the data maybe sorted etc.). Everytime an observation is made, some amount of entropy is generated. Infact the act of storing data amounts to an increase in entropy. You can bring some of these ideas together. Check this paper sns.ias.edu/~tlusty/courses/InfoInBio/Papers/Szilard1929.pdf Aug 7, 2013 at 18:06

This phenomenon is known in computer science as a time-space tradeoff. For example, Ryan Williams proved that if a computer solves SAT on instances of size $n$ in time $T$ and using memory $S$ then $T \cdot S \geq n^{1.8}$. (We don't expect this to be tight.) A classical result states that when recognizing palindromes on a Turing machine, $T \cdot S = \Omega(n^2)$.
• We don't expect it do be tight at all. If some algorithm for SAT has $T = n^c$ for some constant $c$ then P=NP, which most people don't believe. Moreover, the exponential time hypothesis states that $T \geq \alpha^n$ for some $\alpha > 1$. Aug 7, 2013 at 21:38