Drawing Pfaffian Graphs

Serguei Norine

School of Mathematics, Georgia Institute of Technology, Atlanta, Georgia 30332, USA

Abstract. We prove that a graph is Pfaffian if and only if it can be drawn in the plane (possibly with crossings) so that every perfect match- ing intersects itself an even number of times.

1 Introduction

Inthispaperweproveatheoremthatconnects Pfaffian orientations with the parity of the numbers of crossings in planar drawings. The proof is elementary, but it has other consequences and raises interesting questions. Before we can state the theorem we need some definitions. All graphs considered in this paper are finite and have no loops or multiple edges. For a graph G we denote its edge set by E(G). A labeled graph is a graph with vertex-set {1, 2,...,n} for some n.Ifu and v are vertices in a graph G,then uv denotes the edge joining u and v and directed from u to v if G is directed. A is a set of edges in a graph that covers all vertices exactly once. Let G be a directed labeled graph and let M = {u1v1,u2v2,...,ukvk} be a perfect matching of G. Define the sign of M to be the sign of the permutation 1234...2k − 12k . u1 v1 u2 v2 ... uk vk

Note that the sign of a perfect matching is well-defined as it does not depend on the order in which the edges are written. We say that a labeled graph G is Pfaffian if there exists an orientation D of G such that the signs of all perfect matchings in D are positive, in which case we say that D is a Pfaffian orientation of G. An unlabeled graph G is Pfaffian if it is isomorphic to a labeled Pfaffian graph. It is well-known and also follows from Theorem 1 below that in that case every labeling of G is Pfaffian. The importance of Pfaffian graphs will be discussed in the next section. By a drawing Γ of a graph G we mean an immersion of G in the plane such that edges are represented by homeomorphic images of [0, 1] not containing vertices in their interiors. Edges are permitted to intersect, but there are only finitely many intersections and each intersection is a crossing. For edges e, f of adrawingΓ let cr(e, f) denote the number of times the edges e and f cross. For a perfect matching M let crΓ (M), or cr(M) if the drawing is understood from context, denote cr(e, f), where the sum is taken over all unordered pairs of distinct edges e, f ∈ M.

J. Pach (Ed.): GD 2004, LNCS 3383, pp. 371–376, 2004. c Springer-Verlag Berlin Heidelberg 2004 372 Serguei Norine

The following theorem is the main result of this paper. The proof will be presented in Section 3. Theorem 1. A graph G is Pfaffian if and only if there exists a drawing of G in the plane such that cr(M) is even for every perfect matching M of G. The “if” part of this theorem as well as the “if” part of its generalization (Theorem 3) was known to Kasteleyn [4] and was proved by Tesler [14]; however our proof of this part is different. The “only if” part is new.

2 Pfaffian Graphs

Pfaffian orientations have been introduced by Kasteleyn [2–4], who demonstrated that one can enumerate perfect matchings in a Pfaffian graph in polynomial time. We say that an n × n matrix A(D)=(aij )isaskew adjacency matrix of a directed labeled graph D with n vertices if   1ifij ∈ E(D), − ∈ aij =  1ifji E(D), 0otherwise.

Let A be a skew-symmetric 2n × 2n matrix. For each partition

P = {{i1,j1}, {i2,j2},...,{in,jn}} of the set {1, 2,...,2n} into pairs, define 12...2n − 12n aP = sgn ai1j1 ...ainjn . i1 j1 ... in jn

Note that aP is well defined as it does not depend on the order of the pairs in the partitions nor on the order in which the pairs are listed. The Pfaffian of the matrix A is defined by Pf(A)= aP , P where the sum is taken over all partitions P of the set {1, 2,...,2n} into pairs. Note that if D is a Pfaffian orientation of a labeled graph G then Pf(A(D)) is equal to the number of perfect matchings in G. One can evaluate the Pfaffian efficiently using the following identity from linear algebra: for a skew-symmetric matrix A det(A)=(Pf(A))2. Thus the number of perfect matchings, and more generally the generating func- tion of perfect matchings of a Pfaffian graph, can be computed in polynomial time. The problem of recognizing Pfaffian bipartite graphs is equivalent to many problems of interest outside , eg. the P´olya permanent problem [11], Drawing Pfaffian Graphs 373 the even circuit problem for directed graphs [15], or the problem of determin- ing which real square matrices are sign non-singular [5], where the latter has applications in economics [13]. The complete K3,3 is not Pfaffian. Each edge of K3,3 belongs to exactly two perfect matchings and therefore changing an orientation of any edge does not change the parity of the number of perfect matchings with negative sign. One can easily verify that for some (and therefore for every) orientation of K3,3 this number is odd. In fact, Little [6] proved that a bipartite graph is Pfaffian if and only if it does not contain an “even subdivision” H of K3,3 such that G \ V (H)hasa perfect matching. A structural characterization of Pfaffian bipartite graphs was given by Robert- son, Seymour and Thomas [12] and independently by McCuaig [7]. They proved that a bipartite graph is Pfaffian if and only if it can be obtained from planar graphs and one specific non- (the Heawood graph) by repeated ap- plication of certain composition operations. This structural theorem implies a polynomial time algoritheorem for recognition of Pfaffian bipartite graphs. No satisfactory characterization is known for general Pfaffian graphs. The result of this paper was obtained while attempting to find such a description.

3MainTheorem

Let Γ be a drawing of a graph G in the plane. We say that S ⊆ E(G)isamarking of Γ if cr(M)and|M ∩ S| have the same parity for every perfect matching M of G. Theorem 1 follows from the following more general result. Theorem 2. For a graph G the following are equivalent: (a) G is Pfaffian; (b) some drawing of G in the plane has a marking; (c) every drawing of G in the plane has a marking; (d) there exists a drawing of G in the plane such that cr(M) is even for every perfect matching M of G. We say that Γ is a standard drawing of a labeled graph G if the vertices of Γ are arranged on a circle in order and every edge of Γ is drawn as a straight line. The equivalence of conditions (a), (b) and (c) of Theorem 2 immediately follows from the next two lemmas. Lemma 1. Let Γ be a standard drawing of a labeled graph G.ThenG is Pfaffian if and only if Γ has a marking.

Proof. Let D be an orientation of G.LetM = {u1v1,u2v2,...,ukvk} be a perfect matching of D. The sign of M is the sign of the permutation 1234...2k − 12k P = . u1 v1 u2 v2 ... uk vk 374 Serguei Norine

Let i(P ) denote the number of inversions in P ,then sgn(M)=sgn(P )=(−1)i(P ) = sgn(P (j) − P (i)) = ≤ ≤ 1 i

In Γ edges uivi and ujvj cross if and only if each of the two arcs of the circle containing the vertices of Γ with the ends ui and vi contains one of the vertices uj and vj, in other words if and only if

sgn((uj − ui)(vj − ui)(uj − vi)(vj − vi)) = −1.

Define SD = {uv ∈ E(D)|u>v}. Note that for every S ⊆ E(G)thereexists (unique) orientation D such that S = SD. From (1) we deduce that

sgn(M)=(−1)cr(M) × (−1)|M∩S|.

Therefore M has a positive sign if and only if cr(M)and|M ∩ S| have the same parity. It follows that D is a Pfaffian orientation of G if and only if SD is a marking of the standard drawing of G. 

Notice that we have in fact shown that there exists a one-to-one correspon- dence between Pfaffian orientations of a labeled graph and markings of its stan- dard drawing.

Lemma 2. Let Γ1 and Γ2 be two drawings of a labeled graph G in the plane. Then Γ1 has a marking if and only if Γ2 has one.

Proof. For any n and any two sequences (a1,a2, .., an)and(b1,b2, .., bn)ofpair- wise distinct points in the plane, there clearly exists a homeomorphic transfor- mation of the plane that takes ai to bi for all 1 ≤ i ≤ n. Therefore without loss of generality we assume that the vertices of G are represented by the same points in the plane in both Γ1 and Γ2. It suffices to prove the statement of the lemma for drawings Γ1 and Γ2 that differ only in the position of a single edge e = uv.Lete1 and e2 denote the images of e in Γ1 and Γ2 correspondingly. Define C = e1 ∪ e2. The closed curve C separates its complement into two sets P1 and P2 with the property that every simple curve with the ends a ∈ Pi and b ∈ Pj crosses C even number of times if and only if i = j. Clearly if e ∈ M we have

crΓ1 (M)=crΓ2 (M). (2)

Let c =0ifbothP1 and P2 contain an even number of vertices of G and let c =1 otherwise. For two curves C1 and C2,letcr(C1,C2) denote the total number of Drawing Pfaffian Graphs 375 times C1 crosses C2. For any perfect matching M of G, such that e ∈ M,the following identity holds modulo 2:

crΓ1 (M)+crΓ2 (M)=2 cr(f,g)+ (cr(f,e1)+cr(f,e1)) { }⊆ \{ } ∈ \{ } f,g M e f M e = cr(f,C)=c.(3) f∈M\{e}

Suppose S is a marking of Γ1. Identities (2) and (3) imply that S is a marking of Γ2 if c =0,andthatS {e} is a marking of Γ2 if c =1.  Since clearly (d) implies (b), to finish the proof of Theorem 2 it remains to show that (b) implies (d). Suppose G satisfies (b) and consider a drawing of G in the plane with a marking S. Suppose there exists e ∈ S. We change the way e is drawn, so that the closed curve C which is composed from the old and the new drawing of e separates one vertex of G from the rest. From the proof of Lemma 2 it follows that S \{e} is a marking in the new drawing. By repeating the procedure we produce a drawing of G such that the empty set is a marking, therefore demonstrating that G satisfies condition (d) of Theorem 2.

4 Concluding Remarks

1. The following generalization of Theorem 1 follows from the proof in previous section. Theorem 3. Let G be a graph and let M be the set of all perfect matchings of G.Lets : M→{−1, 1}. Then the following are equivalent: (1) there exists an orientation D of G such that for every M ∈Mits sign in the corresponding directed graph is equal to s(M); (2) there exists a drawing of G in the plane such that for every M ∈M

s(M)=(−1)cr(M).

In [8] I was also able to generalize the methods used in the proof of Theorem 1 to prove a result on the numbers of crossings in “T -joins” in different drawings of a fixed graph.

2. For a labeled graph G, an orientation D of G and a perfect matching M of G, denote the sign of M in the directed graph corresponding to D by D(M). We say that a graph G is k-Pfaffian if there exist a labeling of G, orientations D1,D2,...,Dk of G and real numbers α1,α2,...,αk, such that for every perfect matching M of G k αiDi(M)=1. i=1 For surfaces of higher genus the following result was mentioned by Kaste- leyn [3] and proved by Galluccio and Loebl [1] and independently by Tesler [14]. 376 Serguei Norine

Theorem 4. Every graph that can be embedded on a surface of genus g is 4g- Pfaffian. I was able to prove the following analogue of Theorem 1 for the torus [9]. Theorem 5. Every 3-Pfaffian graph is Pfaffian. A graph G is 4-Pfaffian if and only if there exists a drawing of G on the torus such that cr(M) is even for every perfect matching M of G. Theorems 4 and 5 suggest several questions. For which k ≥ 5dothereexist graphs that are k-Pfaffian, but not (k − 1)-Pfaffian? Is it true that a graph G is 4g-Pfaffian if and only if there exists a drawing of G on a surface of genus g such that cr(M) is even for every perfect matching M of G?

Acknowledgment

I would like to thank my advisor Robin Thomas for his guidance and support in this project. The research was supported in part by NSF under Grant No. DMS- 0200595.

References

1. A. Galluccio and M. Loebl, On the theory of Pfaffian orientations. I. Perfect match- ings and permanents, Electron. J. combin. 6 (1999), no. 1, Research Paper 6, 18pp. (electronic) 2. P. W. Kasteleyn, The statistics of dimers on a lattice. I. The number of dimer arrangements on a quadratic lattice, Physica 27 (1961), 1209-1225. 3. P. W. Kasteleyn, Dimer statistics and phase transitions, J. Mathematical Phys. 4 (1963), 287-293. 4. P. W. Kasteleyn, Graph Theory and Crystal Physics, Graph Theory and Theoret- ical Physics, Academic Press, London, 1967, 43-110. 5. V. Klee, R. Lardner and R. Manber, Signsolvability revisited, Linear Algebra Appl. 59 (1984), 131-157. 6. C. H. C. Little, A characterization of convertible (0,1)-matrices, J. Comb. Theory B 18 (1975), 187-208. 7. W. McCuaig, Polya’s permanent problem, preprint. 8. S. Norine, Pfaffian graphs, T-joins and crossing numbers, submitted. 9. S. Norine, in preparation. 10. J. Pach and G. Toth, Which crossing number is it anyway?, J. Comb. Theory Ser. B 80 (2000), no. 2, 225–246. 11. G. P´olya, Augfabe 424, Arch. Math. Phys. Ser. 20 (1913), 271. 12. N. Robertson, P. D. Seymour and R. Thomas, Permanents, Pfaffian orientations, and even directed circuits, Ann. of Math. (2) 150(1999), 929-975. 13. P. Samuelson, Foundations of Economic Analysis, Atheneum, New York, 1971. 14. G. Tesler, Matching in graphs on non-orientable surfaces, J. Comb. Theory B 78 (2000), 198-231. 15. V. V. Vazirani and M. Yannakakis, Pfaffian orientations, 0 − 1permanents,and even cycles in directed graphs, Discrete Appl. Math. 25 (1989), 179-190.