Weighted Decoding and Likelihood Priors

Why log((1-p)/p) belongs in the graph and how matching, Union-Find, and space-time paths use weights.