Book contents
- Frontmatter
- Contents
- Miscellaneous Frontmatter
- Notation
- Preface
- Part I Preliminaries
- 1 Molecular biology and high-throughput sequencing
- 2 Algorithm design
- 3 Data structures
- 4 Graphs
- 5 Network flows
- Part II Fundamentals of Biological Sequence Analysis
- Part III Genome-Scale Index Structures
- Part IV Genome-Scale Algorithms
- Part V Applications
- References
- Index
4 - Graphs
from Part I - Preliminaries
Published online by Cambridge University Press: 05 May 2015
- Frontmatter
- Contents
- Miscellaneous Frontmatter
- Notation
- Preface
- Part I Preliminaries
- 1 Molecular biology and high-throughput sequencing
- 2 Algorithm design
- 3 Data structures
- 4 Graphs
- 5 Network flows
- Part II Fundamentals of Biological Sequence Analysis
- Part III Genome-Scale Index Structures
- Part IV Genome-Scale Algorithms
- Part V Applications
- References
- Index
Summary
Graphs are a fundamental model for representing various relations between data. The aim of this chapter is to present some basic problems and techniques relating to graphs, mainly for finding particular paths in directed and undirected graphs. In the following chapters, we will deal with various problems in biological sequence analysis that can be reduced to one of these basic ones.
Unless stated otherwise, in this chapter we assume that the graphs have n vertices and m arcs.
Directed acyclic graphs (DAGs)
A directed graph is called acyclic if it does not contain a directed cycle; we use the shorthand DAG to denote a directed acyclic graph. DAGs are one of the most basic classes of graphs, being helpful also in many problems in bioinformatics. DAGs admit special properties that not all graphs enjoy, and some problems become simpler when restricted to DAGs.
Topological ordering
The acyclicity of the arc relation of a DAG allows us to build recursive definitions and algorithms on its vertices. In such a case, the value of a function in a vertex v of a DAG depends on the values of the function on the in-neighbors of v. In order to implement its computation, we need an ordering of the vertices of the DAG such that any vertex appears in this ordering after all its in-neighbors. Such an ordering is called a topological ordering of the DAG. See Figure 4.1 for an example.
Any DAG admits a topological ordering, but it need not be unique. Exercise 4.1 asks the reader to construct a DAG in which the number of topological orderings is exponential in the number of vertices. A consequence of the existence of a topological ordering is that every DAG has at least one source (the first node in a topological ordering) and at least one sink (the last node in a topological ordering).
- Type
- Chapter
- Information
- Genome-Scale Algorithm DesignBiological Sequence Analysis in the Era of High-Throughput Sequencing, pp. 30 - 40Publisher: Cambridge University PressPrint publication year: 2015