Aligning whole genomes using optimal dynamic programming algorithms is a daunting task, being practically feasible only for very similar species, and conceptually incapable of capturing large-scale phenomena that alter the contiguity of homologous regions, like chromosome-level rearrangements, gene shuffling and duplication, translocations, and inversions of large areas.
We could circumvent these limits by first using good local alignments as anchors and then finding a set of large-scale edit operations that align such anchors as well as possible: Exercise 11.8 elaborates on how to find these optimal one-to-one correspondences.
Alternatively, we could try to detect a set of genes that are shared by two species, and we could compute the minimum set of rearrangements that transform one sequence of genes into the other. Despite having the advantage of providing a constructive explanation of the distance between two genomes, this approach is feasible only for closely related species, it discards information contained in non-coding regions, it assumes that a large-enough set of common genes can be reliably identified in each genome and mapped across genomes, and it is ineffective in cases in which gene order is preserved, like in mammalian mitochondrial DNA.
Yet another alternative could be aligning just a few conserved genes, building a phylogenetic tree for each such gene, and merging the trees into a common consensus: this is practically difficult in some viral and bacterial families with high rates of mutation or lateral gene transfer, and it is conceptually undesirable since different genes can tell different phylogenetic stories. Alignment costs, moreover, have an intrinsic ambiguity.
In alignment-free genome comparison the goal is to derive efficiently computable distance or similarity measures for whole genomes that capture the relatedness without resorting to alignments. Such distance measures are typically derived between sets of local features extracted from the genomes. This allows one to compare genomes on the basis of their local compositional biases, rather than on the basis of their large-scale sequential structure: such compositional biases are widespread in nature, and have been shown to correlate with accepted species classifications.