 In this algorithm, the orientations of the edges are used to assign the values formula_8 to the variables in the Tutte matrix of the graph.Then, the Pfaffian of this matrix (the square root of its determinant) gives the number of perfect matchings.Each perfect matching contributes formula_8 to the Pfaffian regardless of which orientation is used; the choice of a Pfaffian orientation ensures that these contributions all have the same sign as each other, so that none of them cancel.