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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Modeling the Problem<br />

Next: About the War Stories Up: Introduction to <strong>Algorithm</strong>s Previous: Logarithms<br />

Modeling the Problem<br />

Modeling is the art of formulating your application in terms of precisely described, well-understood<br />

problems. Proper modeling is the key to applying algorithmic design techniques to any real-world<br />

problem. Indeed, proper modeling can eliminate the need to design or even implement algorithms by<br />

relating your application to what has been done before. Proper modeling is the key to effectively using<br />

the problem catalog in Part II of this book.<br />

Real-world applications involve real-world objects. You might be working on a system to route traffic in<br />

a network, to find the best way to schedule classrooms in a university, or to search for patterns in a<br />

corporate database. Most algorithms, however, are designed to work on rigorously defined abstract<br />

structures such as permutations, graphs, and sets. After all, if you can't define what you want to do, you<br />

can't hope to compute it. You must first describe your problem abstractly, in terms of fundamental<br />

structures and properties.<br />

Whatever your application is, odds are very good that others before you have stumbled upon the same<br />

algorithmic problem, perhaps in substantially different contexts. <strong>The</strong>refore, to find out what is known<br />

about your particular ``widget optimization problem,'' you can't hope to look in a book under widget. You<br />

have to formulate widget optimization in terms of computing properties of abstract structures such as:<br />

● Permutations, which are arrangements, or orderings, of items. For example, and<br />

are two distinct permutations of the same set of four integers. Permutations are likely<br />

the object in question whenever your problem seeks an ``arrangement,'' ``tour,'' ``ordering,'', or<br />

``sequence.''<br />

● Subsets, which represent selections from a set of items. For example, and are two<br />

distinct subsets of the first four integers. Order does not matter in subsets the way it does with<br />

permutations, so the subsets and would be considered identical. Subsets are likely<br />

the object in question whenever your problem seeks a ``cluster,'' ``collection,'' ``committee,''<br />

``group,'' ``packaging,'' or ``selection.''<br />

file:///E|/BOOK/BOOK/NODE17.HTM (1 of 3) [19/1/2003 1:28:15]

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

Saved successfully!

Ooh no, something went wrong!