path is a path with a maximal value, i.e. for all paths of the same length. Best paths have the property that all their partial sub-paths are best sub-paths too. This is implied by the property of order-preservation. The Viterbi algorithm for best path calculation is based on this fact and works like this: For each one runs through all , calculates and stores the maximal value among these as well as the list of all those for which the maximal value is obtained. According to the order preservation of the maximum equals
i.e. has to applied just once, namely to the maximum of the transition values towards which saves calculation time. Suppose now that we have already calculated as well as for all . At index we fix each element , run trough all , and similarly calculate
an collect those precedessors which actually yield this maximal value in the set .
Best Paths are obtained backwards, starting from a locus for which is maximal compared to all other . Given such a best final locus one selects a locus from , a locus from and so forth until a full path is selected backwards. It is obvious from the above construction that one obtains all best paths by browsing through the implied graph of possible predecessors in the described way.
1.5 Formulas for and
In the present subsection we provide specific formulas for and in accordance with the concrete music-theoretical examples to be discussed in the following sections. Suppose we are given
a Riemann Logic and
a Harmonic Transition Value Map
A positive constant regulates the relative influence of the transition values against the locus values. In the unmarked case we choose , while gives higher weight to transitions and gives higher weight to local significations.
Further we suppose that we are given a chord sequence and finally, a sequence of custom restriction maps.