Text this: Optimal Sequence Alignment and Its Relationship with Phylogeny