match the cost variance component to its definition.
For example, 'Find' and 'F' are both matches for lettersPattern, since the number of letters for a match is not specified. But strfind matches 'F' first and returns its index.
Introduction to variance: Definition, Types, and Calculations