18.04.2013 Views

The.Algorithm.Design.Manual.Springer-Verlag.1998

The.Algorithm.Design.Manual.Springer-Verlag.1998

The.Algorithm.Design.Manual.Springer-Verlag.1998

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

War Story: What's Past is Prolog<br />

A graduate student immediately set to work implementing dynamic programming to compare with their<br />

heuristic. On many programs the optimal and greedy algorithms constructed the exact same trie.<br />

However, for some examples, dynamic programming gave a 20% performance improvement over<br />

greedy, i.e. 20% better than very, very well in practice. <strong>The</strong> run time spent in doing the dynamic<br />

programming was sometimes a bit larger than with greedy, but in compiler optimization you are always<br />

happy to trade off a little extra compilation time for better execution time performance of your program.<br />

Is a 20% improvement worth it? That depends upon the situation. For example, how useful would you<br />

find a 20% increase in your salary?<br />

<strong>The</strong> fact that the rules had to remain ordered was the crucial property that we exploited in the dynamic<br />

programming solution. Indeed, without it, I was able to prove that the problem was NP-complete,<br />

something we put in the paper [DRR 95] to make it complete.<br />

Next: War Story: Text Compression Up: Breaking Problems Down Previous: War Story: Evolution of<br />

<strong>Algorithm</strong>s<br />

Mon Jun 2 23:33:50 EDT 1997<br />

file:///E|/BOOK/BOOK2/NODE51.HTM (4 of 4) [19/1/2003 1:28:54]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!