Optimized Sankoff parsimony: up phase. (A) Cost matrix between six states a, ..., f and their associated cost tree as calculated by the neighbor-joining algorithm. (B) A simple phylogeny with three nodes (dashed boxes), their cost vectors S and cost trees T
. Cost vectors S(q)and S(r), and cost trees and are already calculated. (C) Step-by-step reconstruction of S(p)and for node p following Algorithm 3.