from Part I - Preliminaries
Published online by Cambridge University Press: 05 May 2015
Among the general algorithm design techniques, dynamic programming is the one most heavily used in this book. Since great parts of Chapters 4 and 6 are devoted to introducing this topic in a unified manner, we shall not introduce this technique here. However, a taste of this technique is already provided by the solution to Exercise 2.2 of this chapter, which asks for a simple one-dimensional instance.
We will now cover some basic primitives that are later implicitly assumed to be known.
Complexity analysis
The algorithms described in this book are typically analyzed for their worst-case running time and space complexity: complexity is expressed as a function of the input parameters on the worst possible input. For example, if the input is a string of length n from an alphabet of size σ, a linear time algorithm works in O(n) time, where O(·) is the familiar big-O notation which hides constants. This means that the running time is upper bounded by cn elementary operations, where c is some constant.
We consider the alphabet size not to be a constant, that is, we use expressions of the form O(nσ) and O(n log σ), which are not linear complexity bounds. For the space requirements, we frequently use notations such as n log σ(1 + o(1)) = n log σ + o(n log σ). Here o(·) denotes a function that grows asymptotically strictly slower than its argument. For example, O(n log σ/ log log n) can be simplified to o(n log σ). Algorithms have an input and an output: by working space we mean the extra space required by an algorithm in addition to its input and output. Most of our algorithms are for processing DNA, where σ = 4, and it would seem that one could omit such a small constant in this context.
To save this book to your Kindle, first ensure [email protected] 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.
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.
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.