Help


from Wikipedia
« »  
It is surprising that some # P-complete problems correspond to easy P problems.
It is very easy to determine the satisfiability of a boolean formula in DNF: such a formula is satisfiable if and only if it contains a satisfiable conjunction ( one that does not contain a variable and its negation ), whereas counting the number of satisfying assignments is # P-complete.
Also deciding 2-SAT is easy in contrast to counting the number of satisfying assignments.
Topologically sorting is easy in contrast to counting the number of topological sortings.
The same observation can be made for the perfect matching problem.
It was known before that the decision problem " Is there a perfect matching for a given bipartite graph?
" can be solved in polynomial time, and in fact, for a graph with V vertices and E edges, it can be solved in O ( VE ) time.
The corresponding question " How many perfect matchings does the given bipartite graph have?
" is already # P-complete.
The problem of counting the number of perfect matchings ( or in directed graphs: the number of vertex cycle covers ) is known to be equivalent to the problem of the computation of the permanent of a matrix.
The perfect matching counting problem was the first counting problem corresponding to an easy P problem shown to be # P-complete, in a 1979 paper by Leslie Valiant which also defined the classes # P and # P-complete for the first time.

2.101 seconds.