Given the decoding graph, we construct the matching graph weights as follows.
For each pair of vertices in the matching graph, we compute the total weight of the minimum weight path between the corresponding vertices in the decoding graph using Dijkstra's algorithm [1]}.
