Skip to main content Accessibility help
×
Hostname: page-component-848d4c4894-x5gtn Total loading time: 0 Render date: 2024-05-08T09:09:09.107Z Has data issue: false hasContentIssue false

5 - The Toolbox

Published online by Cambridge University Press:  05 February 2012

Catherine C. McGeoch
Affiliation:
Amherst College, Massachusetts
Get access

Summary

Write your workhorse program well; instrument your program; your experimental results form a database: treat it with respect; keep a kit full of sharp tools.

Jon Louis Bentley, Ten Commandments for Experiments on Algorithms

They say the workman is only as good as his tools; in experimental algorithmics the workman must often build his tools.

The test environment is the collection of programs and files assembled together to support computational experiments on algorithms. This collection includes test programs that implement the algorithms of interest, code to generate input instances and files containing instances; scripts to control and document tests, tools for measuring performance, and data analysis software.

This chapter presents tips for assembling and building these components to create a reliable, efficient, and flexible test environment. We start with a survey of resources available to the experimenter. Section 5.1 surveys aspects of test program design, and Section 5.2 presents a cookbook of methods for generating random numbers and combinatorial objects to use as test inputs or inside randomized algorithms.

Most algorithm researchers prefer to work in Unix-style operating systems, which provide excellent tools for conducting experiments, including:

  • Utilities such as time and gprof for measuring elapsed and CPU times.

  • Shell scripts and makefiles. Shell scripting makes it easy to automate batches of tests, and makefiles make it easy to mix and match compilation units. Scripts and make files also create a document trail that records the history of an experimental project.

  • […]

Type
Chapter
Information
Publisher: Cambridge University Press
Print publication year: 2012

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

  • The Toolbox
  • Catherine C. McGeoch, Amherst College, Massachusetts
  • Book: A Guide to Experimental Algorithmics
  • Online publication: 05 February 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9780511843747.006
Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

  • The Toolbox
  • Catherine C. McGeoch, Amherst College, Massachusetts
  • Book: A Guide to Experimental Algorithmics
  • Online publication: 05 February 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9780511843747.006
Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

  • The Toolbox
  • Catherine C. McGeoch, Amherst College, Massachusetts
  • Book: A Guide to Experimental Algorithmics
  • Online publication: 05 February 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9780511843747.006
Available formats
×