3 ms·
> "you're stuck with checking all N! solutions" not quite -- once you have a solution that runs in time X, you no longer need to check any solution that has a
by lotharbot 10y ago
> "you're stuck with checking all N! solutions"
not quite -- once you have a solution that runs in time X, you no longer need to check any solution that has a sub-component that is known to take longer than time X. So, for example, if you find that going between locations A, C, J, F, P, E, and Q in that order takes longer than your current best whole-map solution, then you no longer have to check any solution of which ACJFPEQ is a subset. You can eliminate whole categories of solutions with a single check, instead of having to test each of them one-by-one.
- js2 10y agoSo, memoization, a basic optimization technique.
- Dylan16807 10y agoYes, the easiest example of optimization to give was a basic example. There are much better techniques too.