{'fraction_non_alphanumeric': 0.021301775147928994, 'fraction_numerical': 0.004733727810650888, 'mean_word_length': 4.529411764705882, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A generalized Kac–Ward formula

The Kac–Ward formula allows the Ising partition function to be computed on a planar graph G with straight edges from the determinant of a matrix of size 2N, where N denotes the number of edges of G. In this paper, we extend this formula to any finite graph: the partition function can be written as an alternating sum of the determinants of 22g matrices of size 2N, where g is the genus of an orientable surface in which G embeds. We give two proofs of this generalized formula. The first one is purely combinatorial, while the second relies on the Fisher–Kasteleyn reduction of the Ising model to the dimer model, and on geometric techniques. As a consequence of this second proof, we also obtain the following fact: the Kac–Ward and the Fisher–Kasteleyn methods for solving the Ising model are one and the same.