  Valiant introduced matchgate computation and holographic algorithms. A number
of seemingly exponential time problems can be solved by this novel algorithmic
paradigm in polynomial time. We show that, in a very strong sense, matchgate
computations and holographic algorithms based on them provide a universal
methodology to a broad class of counting problems studied in statistical
physics community for decades. They capture precisely those problems which are
#P-hard on general graphs but computable in polynomial time on planar graphs.
  More precisely, we prove complexity dichotomy theorems in the framework of
counting CSP problems. The local constraint functions take Boolean inputs, and
can be arbitrary real-valued symmetric functions. We prove that, every problem
in this class belongs to precisely three categories: (1) those which are
tractable (i.e., polynomial time computable) on general graphs, or (2) those
which are \#P-hard on general graphs but ractable on planar graphs, or (3)
those which are #P-hard even on planar graphs. The classification criteria are
explicit. Moreover, problems in category (2) are tractable on planar graphs
precisely by holographic algorithms with matchgates.
