Perhaps the reference to computer science was not very clear in my previous comment [1]. "Optimal solution" means the best possible (globally) over all possible dimensions including time.

[1]: http://en.wikipedia.org/wiki/Greedy_algorithm

The point being is that even a short-term thinking may yield long-term benefits sometimes.