I think it is very intuitive that more space beats the pants off of more time. In time O(n) you can use O(n) cells on a tape, but there are O(2^n) possible configurations of symbols on a tape of length n (for an alphabet with 2 symbols), so you can do so much more with n space than with n time.
Intuitive yes, but since P != PSPACE is still unproven it's clearly hard to demonstrate.
For algorithms, a little memory outweighs a lot of time
11–20 of 144 posts
Re: For algorithms, a little memory outweighs a lot of time
#12Earlier quoted context omitted.
But you also spend time on updating cells, so it is not that intuitive.
I’m not sure what you mean here. If you’re in the realm of “more space” than you’re not thinking of the time it takes. More precisely, I think it is intuitive that the class of problems that can be solved in any time given O(n) space is far larger than the class of problems that can be solved in any space given O(n) time.
If your program uses O(n) memory, it must run at least in O(n) time (lower bound on time).
Re: For algorithms, a little memory outweighs a lot of time
#13Earlier quoted context omitted.
But you also spend time on updating cells, so it is not that intuitive.
I’m not sure what you mean here. If you’re in the realm of “more space” than you’re not thinking of the time it takes. More precisely, I think it is intuitive that the class of problems that can be solved in any time given O(n) space is far larger than the class of problems that can be solved in any space given O(n) time.
Re: For algorithms, a little memory outweighs a lot of time
#14I think it is very intuitive that more space beats the pants off of more time. In time O(n) you can use O(n) cells on a tape, but there are O(2^n) possible configurations of symbols on a tape of length n (for an alphabet with 2 symbols), so you can do so much more with n space than with n time.
If intermediate results are entirely uncorrelated, with no overlap in the work at all, that would not hold - space will not help you. Edit: This kind of problem is very rare. Think of a cache with 0 percent hit rate - almost never happens.
And you can't really do it the other way around (at least not in current computing terms / concepts): you cannot use a single unit of time as a standin / proxy for hundreds of cells, since we don't quite have infinitely-broad SIMD architectures.
Re: For algorithms, a little memory outweighs a lot of time
#15I think it is very intuitive that more space beats the pants off of more time. In time O(n) you can use O(n) cells on a tape, but there are O(2^n) possible configurations of symbols on a tape of length n (for an alphabet with 2 symbols), so you can do so much more with n space than with n time.
My intuition: the value of a cell can represent the result of multiple (many) time units used to compute something. If you cannot store enough intermediate results, you may end up needing to recalculate the same / similar results over and over - at least in some algorithms. So one cell can represent the results of hundreds of time units, and being able to store / load that one value to re-use it later can then replac…
Re: For algorithms, a little memory outweighs a lot of time
#16In fact I don’t think we would need processors anymore if we were centrally storing all of the operations ever done in our processors.
Now fast retrieval is another problem for another thread.
Re: For algorithms, a little memory outweighs a lot of time
#17I think it is very intuitive that more space beats the pants off of more time. In time O(n) you can use O(n) cells on a tape, but there are O(2^n) possible configurations of symbols on a tape of length n (for an alphabet with 2 symbols), so you can do so much more with n space than with n time.
Intuitive yes, but since P != PSPACE is still unproven it's clearly hard to demonstrate.
EDIT: I am a dumbass and misremembered.
Re: For algorithms, a little memory outweighs a lot of time
#18Earlier quoted context omitted.
I’m not sure what you mean here. If you’re in the realm of “more space” than you’re not thinking of the time it takes. More precisely, I think it is intuitive that the class of problems that can be solved in any time given O(n) space is far larger than the class of problems that can be solved in any space given O(n) time.
If your program runs in O(n) time, it cannot use more than O(n) memory (upper bound on memory usage. If your program uses O(n) memory, it must run at least in O(n) time (lower bound on time).
Re: For algorithms, a little memory outweighs a lot of time
#19Earlier quoted context omitted.
Intuitive yes, but since P != PSPACE is still unproven it's clearly hard to demonstrate.
There's not even a proof that P != EXPTIME haha EDIT: I am a dumbass and misremembered.
Re: For algorithms, a little memory outweighs a lot of time
#20Earlier quoted context omitted.
I’m not sure what you mean here. If you’re in the realm of “more space” than you’re not thinking of the time it takes. More precisely, I think it is intuitive that the class of problems that can be solved in any time given O(n) space is far larger than the class of problems that can be solved in any space given O(n) time.
This is obviously demonstrably true. A Turing running in O(n) time must halt. The one in O(n) space is free not to.