American Scientist the Magazine of Sigma Xi, the Scientific Research Society

Total Page:16

File Type:pdf, Size:1020Kb

American Scientist the Magazine of Sigma Xi, the Scientific Research Society A reprint from American Scientist the magazine of Sigma Xi, The Scientific Research Society This reprint is provided for personal and noncommercial use. For any other use, please send a request Brian Hayes by electronic mail to [email protected]. Computing Science Accidental Algorithms Brian Hayes hy are some computational also refers to them as “accidental algo- Wproblems so hard and others A strange new family rithms,” emphasizing their capricious, easy? This may sound like a childish, rabbit-from-the-hat quality; they seem whining question, to be dismissed with to pluck answers from a tangle of un- a shrug or a wisecrack, but if you dress of algorithms probes likely coincidences and cancellations. it up in the fancy jargon of computation- I am reminded of the famous Sidney al complexity theory, it becomes quite the boundary Harris cartoon in which a long series a serious and grownup question: Is P of equations on a blackboard hinges on equal to NP? An answer—­accompanied between easy the notation “Then a miracle occurs.” by a proof—­will get you a million bucks from the Clay Mathematics Institute. and hard problems The Coffee-Break Criterion I’ll return in a moment to P and NP, For most of us, the boundary between but first an example, which offers a fast and slow computations is clearly glimpse of the mystery lurking beneath exactly once? This problem was posed marked: A computation is slow if it’s the surface of hard and easy problems. in 1858 by William Rowan Hamilton, not finished when you come back Consider a mathematical graph, a col- and the path is called a Hamiltonian from a coffee break. Computer science lection of vertices (represented by dots) circuit. Again we can get the answer formalizes this definition in terms of and edges (lines that connect the dots). by brute force. But in this case there is polynomial-time and exponential-time Here’s a nicely symmetrical example: no trick like Euler’s; no one knows any algorithms. method that gives the correct answer Suppose you are running a comput- for all graphs and does so substantially er program whose input is a list of n quicker than exhaustive search. Super- numbers. The program might be sort- ficially, the two problems look almost ing the numbers, or finding their great- identical, but Hamilton’s version is far est common divisor, or generating per- harder. Why? Is it because no shortcut mutations of them. No matter what the Is it possible to construct a path that solution exists, or have we not yet been task, the running time of the program traverses each edge exactly once and clever enough to find one? will likely depend in some way on n, returns to the starting point? For any Most computer scientists and math- the length of the list (or, more precisely, graph with a finite number of edges, ematicians believe that Hamilton’s on the total number of bits needed to we could answer such a question by problem really is harder, and no short- represent the numbers). Perhaps the brute force: Simply list all possible cut algorithm will ever be found—­but time needed to process n items grows paths and check to see whether any of that’s just a conjecture, supported by as n2. Thus as n increases from 10 to 20 them meet the stated conditions. But experience and intuition but not by to 30, the running time rises from 100 there’s a better way. In 1736 Leonhard proof. Contrarians argue that we’ve to 400 to 00. Now consider a program Euler proved that the desired path hardly begun to explore the space of whose running time is equal to 2n. In (now called an Eulerian circuit) exists all possible algorithms, and new prob- this case, as the size of the input grows if and only if every vertex is the end lem-solving techniques could turn up from 10 to 20 to 30, the running time point of an even number of edges. We at any time. Before 1736, the Eulerian- leaps from a thousand to a million to can check whether a graph has this circuit problem also looked hard. a billion. You’re going to be drinking a property without any laborious enu- What prompts me to write on this lot of coffee. meration of pathways. theme is a new and wholly unexpected The function n2 is an example of a Now take the same graph and ask family of algorithms that provide ef- polynomial; 2n denotes an exponential. a slightly different question: Is there a ficient methods for several problems The distinction between these catego- circuit that passes through every vertex that previously had only brute-force ries of functions marks the great divide solutions. The algorithms were invent- of computational complexity theory. Brian Hayes is Senior Writer for American Sci- ed by Leslie G. Valiant of Harvard Uni- Roughly speaking, polynomial algo- entist. Additional material related to the “Comput- versity, with extensive further contri- rithms are fast and efficient; exponen- ing Science” column appears in Hayes’s Weblog at butions by Jin-Yi Cai of the University tial algorithms are too slow to bother http://bit-player.org. Address: 211 Dacian Avenue, of Wisconsin. Valiant named the meth- with. To speak a little less roughly: Durham, NC 27701. Internet: [email protected] ods “holographic algorithms,” but he When n becomes large enough, any www.americanscientist.org © 2008 Brian Hayes. Reproduction with permission only. 2008 January–February Contact [email protected]. one polynomial-time algorithm. The pute an answer in polynomial time, but algorithm has to give the right answer if you happen to guess the answer, or if and has to run in polynomial time on someone whispers it in your ear, then O every instance of the problem. you can quickly verify its correctness. Classifying problems for which we NP is the complexity class for conscien- don’t know a polynomial-time algo- tious cheaters—­students who don’t do rithm is where it gets tricky. In the first their own homework but who at least place, there are some problems that check their cribbed answers before they G O require exponential running time for turn them in. O reasons that aren’t very interesting. Detecting a Hamiltonian circuit is Think about a program to generate all one example of a problem in NP. Even subsets of a set of n items; the compu- though I don’t know how to solve the n tation is easy, but because there are 2 problem efficiently for all graphs, if subsets, just writing down the answer you show me a purported Hamiltoni- O will take an exponential amount of an circuit, I can readily check whether time. To avoid such issues, complex- it passes through every vertex once: ity theory focuses on problems with O short answers. Decision problems ask Polynomial and exponential functions define a yes-or-no question (“Does the graph the poles of computational efficiency. The have a Hamiltonian circuit?”). There running time of an algorithm is measured as are also counting problems (“How a function of the size of the input, n. If the many Hamiltonian circuits does the function is a polynomial one, such as n or graph have?”). Problems of these (Note that this verification scheme n2, the algorithm is considered efficient; an n kinds might conceivably have a poly- works only when the answer to the exponential growth rate, such as 2 , makes nomial-time solution, and we know decision problem is “yes.” If you claim the algorithm impractically slow. that some of them do. The big question that a graph doesn’t have a Hamilto- is whether all of them do. If not, what nian circuit, the only way to prove it is polynomial-time program is faster distinguishes the easy problems from to enumerate all possible paths.) than any exponential-time program. the hard ones? Within the class NP dwells the So much for the classification of al- elite group of problems labeled NP- gorithms. What about classifying the Conscientious Cheating complete. They have an extraordinary problems that the algorithms are sup- The letters NP might well be translated property: If any one of these problems posed to solve? For any given prob- “notorious problems,” but the abbrevi- has a polynomial-time solution, then lem, there might be many different al- ation actually stands for “nondetermin- that method can be adapted to quick- gorithms, some faster than others. The istic polynomial.” The term refers to a ly solve all problems in NP (both the custom is to rate a problem according hypothetical computing machine that complete ones and the rest). In other to the worst-case performance of the can solve problems through systematic words, such an algorithm would es- best algorithm. The class known as P guesswork. For the problems in NP, tablish that P = NP. The two categories includes all problems that have at least you may or may not be able to com- would merge. The very concept of NP-complete- ness has a whiff of the miraculous about it. How can you possibly be sure that a solution to one problem will work for every other problem in NP as well? After all, you can’t even know in advance what all those problems are. The answer is so curious and improb- able that it’s worth a brief digression. The first proof of NP-completeness, published in 171 by Stephen A. Cook of the University of Toronto, concerns a problem called satisfiability.
Recommended publications
  • Edinburgh Research Explorer
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by Edinburgh Research Explorer Edinburgh Research Explorer A Holant Dichotomy: Is the FKT Algorithm Universal? Citation for published version: Cai, J-Y, Fu, Z, Guo, H & Williams, T 2015, A Holant Dichotomy: Is the FKT Algorithm Universal? in IEEE 56th Annual Symposium on Foundations of Computer Science, FOCS 2015, Berkeley, CA, USA, 17-20 October, 2015. IEEE, pp. 1259-1276, Foundations of Computer Science 2015, Berkley, United States, 17/10/15. DOI: 10.1109/FOCS.2015.81 Digital Object Identifier (DOI): 10.1109/FOCS.2015.81 Link: Link to publication record in Edinburgh Research Explorer Document Version: Peer reviewed version Published In: IEEE 56th Annual Symposium on Foundations of Computer Science, FOCS 2015, Berkeley, CA, USA, 17-20 October, 2015 General rights Copyright for the publications made accessible via the Edinburgh Research Explorer is retained by the author(s) and / or other copyright owners and it is a condition of accessing these publications that users recognise and abide by the legal requirements associated with these rights. Take down policy The University of Edinburgh has made every reasonable effort to ensure that Edinburgh Research Explorer content complies with UK legislation. If you believe that the public display of this file breaches copyright please contact [email protected] providing details, and we will remove access to the work immediately and investigate your claim. Download date: 05. Apr. 2019 A Holant Dichotomy: Is the FKT Algorithm Universal? Jin-Yi Cai∗ Zhiguo Fu∗y Heng Guo∗z Tyson Williams∗x [email protected] [email protected] [email protected] [email protected] Abstract We prove a complexity dichotomy for complex-weighted Holant problems with an arbitrary set of symmetric constraint functions on Boolean variables.
    [Show full text]
  • Matchgates Revisited
    THEORY OF COMPUTING, Volume 10 (7), 2014, pp. 167–197 www.theoryofcomputing.org RESEARCH SURVEY Matchgates Revisited Jin-Yi Cai∗ Aaron Gorenstein Received May 17, 2013; Revised December 17, 2013; Published August 12, 2014 Abstract: We study a collection of concepts and theorems that laid the foundation of matchgate computation. This includes the signature theory of planar matchgates, and the parallel theory of characters of not necessarily planar matchgates. Our aim is to present a unified and, whenever possible, simplified account of this challenging theory. Our results include: (1) A direct proof that the Matchgate Identities (MGI) are necessary and sufficient conditions for matchgate signatures. This proof is self-contained and does not go through the character theory. (2) A proof that the MGI already imply the Parity Condition. (3) A simplified construction of a crossover gadget. This is used in the proof of sufficiency of the MGI for matchgate signatures. This is also used to give a proof of equivalence between the signature theory and the character theory which permits omittable nodes. (4) A direct construction of matchgates realizing all matchgate-realizable symmetric signatures. ACM Classification: F.1.3, F.2.2, G.2.1, G.2.2 AMS Classification: 03D15, 05C70, 68R10 Key words and phrases: complexity theory, matchgates, Pfaffian orientation 1 Introduction Leslie Valiant introduced matchgates in a seminal paper [24]. In that paper he presented a way to encode computation via the Pfaffian and Pfaffian Sum, and showed that a non-trivial, though restricted, fragment of quantum computation can be simulated in classical polynomial time. Underlying this magic is a way to encode certain quantum states by a classical computation of perfect matchings, and to simulate certain ∗Supported by NSF CCF-0914969 and NSF CCF-1217549.
    [Show full text]
  • The Geometry of Dimer Models
    THE GEOMETRY OF DIMER MODELS DAVID CIMASONI Abstract. This is an expanded version of a three-hour minicourse given at the winterschool Winterbraids IV held in Dijon in February 2014. The aim of these lectures was to present some aspects of the dimer model to a geometri- cally minded audience. We spoke neither of braids nor of knots, but tried to show how several geometrical tools that we know and love (e.g. (co)homology, spin structures, real algebraic curves) can be applied to very natural problems in combinatorics and statistical physics. These lecture notes do not contain any new results, but give a (relatively original) account of the works of Kaste- leyn [14], Cimasoni-Reshetikhin [4] and Kenyon-Okounkov-Sheffield [16]. Contents Foreword 1 1. Introduction 1 2. Dimers and Pfaffians 2 3. Kasteleyn’s theorem 4 4. Homology, quadratic forms and spin structures 7 5. The partition function for general graphs 8 6. Special Harnack curves 11 7. Bipartite graphs on the torus 12 References 15 Foreword These lecture notes were originally not intended to be published, and the lectures were definitely not prepared with this aim in mind. In particular, I would like to arXiv:1409.4631v2 [math-ph] 2 Nov 2015 stress the fact that they do not contain any new results, but only an exposition of well-known results in the field. Also, I do not claim this treatement of the geometry of dimer models to be complete in any way. The reader should rather take these notes as a personal account by the author of some selected chapters where the words geometry and dimer models are not completely irrelevant, chapters chosen and organized in order for the resulting story to be almost self-contained, to have a natural beginning, and a happy ending.
    [Show full text]
  • A5730107.Pdf
    International OPEN ACCESS Journal Of Modern Engineering Research (IJMER) Applications of Bipartite Graph in diverse fields including cloud computing 1Arunkumar B R, 2Komala R Prof. and Head, Dept. of MCA, BMSIT, Bengaluru-560064 and Ph.D. Research supervisor, VTU RRC, Belagavi Asst. Professor, Dept. of MCA, Sir MVIT, Bengaluru and Ph.D. Research Scholar,VTU RRC, Belagavi ABSTRACT: Graph theory finds its enormous applications in various diverse fields. Its applications are evolving as it is perfect natural model and able to solve the problems in a unique way.Several disciplines even though speak about graph theory that is only in wider context. This paper pinpoints the applications of Bipartite graph in diverse field with a more points stressed on cloud computing. KEY WORDS: Graph theory, Bipartite graph cloud computing, perfect matching applications I. INTRODUCTION Graph theory has emerged as most approachable for all most problems in any field. In recent years, graph theory has emerged as one of the most sociable and fruitful methods for analyzing chemical reaction networks (CRNs). Graph theory can deal with models for which other techniques fail, for example, models where there is incomplete information about the parameters or that are of high dimension. Models with such issues are common in CRN theory [16]. Graph theory can find its applications in all most all disciplines of science, engineering, technology and including medical fields. Both in the view point of theory and practical bipartite graphs are perhaps the most basic of entities in graph theory. Until now, several graph theory structures including Bipartite graph have been considered only as a special class in some wider context in the discipline such as chemistry and computer science [1].
    [Show full text]
  • Enumeration Problems on Lattices
    Enumeration Problems on Lattices by Evans Doe Ocansey Thesis presented in partial fulfilment of the requirements for the degree of Master of Science in Mathematics in the Faculty of Science at Stellenbosch University Department of Mathematics, University of Stellenbosch, Private Bag X1, Matieland 7602, South Africa. Supervisor: Prof. Stephan Wagner December 2012 Stellenbosch University http://scholar.sun.ac.za Declaration By submitting this thesis electronically, I declare that the entirety of the work contained therein is my own, original work, that I am the sole author thereof (save to the extent explicitly otherwise stated), that reproduction and publication thereof by Stellenbosch University will not infringe any third party rights and that I have not previously in its entirety or in part submitted it for obtaining any qualification. Signature: . Evans Doe Ocansey 2012/12/20 Date: . Copyright © 2012 Stellenbosch University All rights reserved. i Stellenbosch University http://scholar.sun.ac.za Abstract Enumeration Problems on Lattices Evans Doe Ocansey Department of Mathematics, University of Stellenbosch, Private Bag X1, Matieland 7602, South Africa. Thesis: MSc (Mathematics) December 2012 The main objective of our study is enumerating spanning trees τ(G) and perfect match- ings PM(G) on graphs G and lattices L. We demonstrate two methods of enumerating spanning trees of any connected graph, namely the matrix-tree theorem and as a special value of the Tutte polynomial T (G; x; y). We present a general method for counting spanning trees on lattices in d ≥ 2 dimen- sions. In particular we apply this method on the following regular lattices with d = 2: rectangular, triangular, honeycomb, kagomé, diced, 9 · 3 lattice and its dual lattice to derive a explicit formulas for the number of spanning trees of these lattices of finite sizes.
    [Show full text]
  • Mapping the Complexity of Counting Problems
    Mapping the complexity of counting problems Heng Guo Queen Mary, University of London [email protected] 1 Computational Counting The study of computational counting was initiated by Leslie Valiant in the late 70s. In the seminal papers [32, 33], he defined the computational complexity class #P, the counting counterpart of NP, and showed that the counting version of tractable decision problems can be #P-complete. One such example is counting perfect matchings (#PM). These work revealed some fundamental differences between counting problems and decision problems and stimulated a lot of research in the directions of both structural complexity theory and algorithmic design. One of the crowning results in the first direction is Toda’s theorem [31], stating that #P contains the whole polynomial hierarchy, and in the second direction we have witnessed the success of Markov chain Monte Carlo algorithms [24, 23]. A typical counting problem is #Sat, which asks the number of satisfying as- signments of a given CNF formula. An equivalent way to recast this problem is to give each assignment weight 1 if it satisfies the formula, or 0 otherwise. Then the goal is to compute the sum of all weights. Moreover, this weight can be de- composed into a product of weights of all clauses. Thus we are interested in a sum-of-product quantity (e.g. see Eq. (1) in Section 2), which is usually called the partition function. In fact, the partition function has received immense attention by statistical physicists long before computer scientists. It is a central quantity from which one can deduce various properties of a field or a system.
    [Show full text]
  • Holographic Algorithms
    Holographic Algorithms Jin-Yi Cai ∗ Computer Sciences Department University of Wisconsin Madison, WI 53706. USA. Email: [email protected] Abstract Leslie Valiant recently proposed a theory of holographic algorithms. These novel algorithms achieve exponential speed-ups for certain computational problems compared to naive algorithms for the same problems. The methodology uses Pfaffians and (planar) perfect matchings as basic computational primitives, and attempts to create exponential cancellations in computation. In this article we survey this new theory of matchgate computations and holographic algorithms. Key words: Theoretical Computer Science, Computational Complexity Theory, Perfect Match- ings, Pfaffians, Matchgates, Matchcircuits, Matchgrids, Signatures, Holographic Algorithms. 1 Some Historical Background There have always been two major strands of mathematical thought since antiquity and across civilizations: Structural Theory and Computation, as exemplified by Euclid’s Elements and Dio- phantus’ Arithmetica. Structural Theory prizes the formulation and proof of structural theorems, while Computation seeks efficient algorithmic methods to solve problems. Of course, these strands of mathematical thought are not in opposition to each other, but rather they are highly intertwined and mutually complementary. For example, from Euclid’s Elements we learn the Euclidean algo- rithm to find the greatest common divisor of two positive integers. This algorithm can serve as the first logical step in the structural derivation of elementary number theory. At the same time, the correctness and efficiency of this and similar algorithms demand proofs in a purely structural sense, and use quite a bit more structural results from number theory [4]. As another example, the computational difficulty of recognizing primes and the related (but separate) problem of in- teger factorization already fascinated Gauss, and are closely tied to the structural theory of the distribution of primes [21, 1, 2].
    [Show full text]
  • On the Complexity of Holant Problems
    On the Complexity of Holant Problems Heng Guo1 and Pinyan Lu2 1 School of Mathematical Sciences, Queen Mary University of London, London, UK [email protected] 2 Institute for Theoretical Computer Science, School of Information Management and Engineering, Shanghai University of Finance and Economics, Shanghai, China [email protected] Abstract In this article we survey recent developments on the complexity of Holant problems. We discuss three different aspects of Holant problems: the decision version, exact counting, and approximate counting. 1998 ACM Subject Classification F.2.2 Nonnumerical Algorithms and Problems, G.2.1 Com- binatorics. Keywords and phrases Computational complexity, Counting complexity, Dichotomy theorems, Approximate counting, Holant problems Digital Object Identifier 10.4230/DFU.Vol7.15301.159 1 Introduction Ladner’s theorem [53] states that if P 6= NP then there is an infinite hierarchy of intermediate problems that are not polynomial time interreducible. For certain restrictions of these classes, however, dichotomy theorems can be achieved. For NP a dichotomy theorem would state that any problem in the restricted subclass of NP is either in P or NP-complete (or both, in the eventuality that NP equals P.) The restrictions for which dichotomy theorems are known can be framed in terms of local constraints, most importantly, Constraint Satisfaction Problems (CSP) [58, 28, 4, 5, 6, 33, 38, 27, 37], and Graph Homomorphism Problems [34, 42, 8]. Explicit dichotomy results, where available, manifest a total understanding of the class of computation in question, within polynomial time reduction, and modulo the collapse of the class. In this article we survey dichotomies in a framework for characterizing local properties that is more general than those mentioned in the previous paragraph, namely the so-called Holant framework [18, 19].
    [Show full text]
  • A Survey of Counting Dichotomies and Holographic Algorithms (Slides)
    Dichotomy Theorems in Counting Complexity and Holographic Algorithms Jin-Yi Cai University of Wisconsin, Madison September 17th, 2014 Supported by NSF CCF-1217549. 1 The P vs. NP Question It is generally conjectured that many combinatorial problems in the class NP are not computable in P. Conjecture: P 6= NP. P =? NP is: Is there a universal and efficient method to discover a proof when one exists? 2 #P Counting problems: #SAT: How many satisfying assignments are there in a Boolean formula? #PerfMatch: How many perfect matchings are there in a graph? #P is at least as powerful as NP, and in fact subsumes the p entire polynomial time hierarchy ∪iΣi [Toda]. #P-completeness: #SAT, #PerfMatch, Permanent, etc. 3 Perfect Matchings 4 Matchgates Based Holographic Algorithms Valiant introduced these new algorithms. • Superposition of states, similar to quantum computing. • Computable on classical computers, without using quantum computers. Two main ingredients: (1) Use perfect matchings to encode fragments of computations. (2) Use linear algebra to achieve exponential cancellations. They (seem to) achieve exponential speed-ups for some problems. 5 Two Great Algorithms Most #P-complete problems are counting versions of NP-complete decision problems. But the following problems are solvable in P: • Whether there exists a Perfect Matching in a general graph [Edmonds]. • Count the number of Perfect Matchings in a planar graph [Kasteleyn]. Note that the problem of counting the number of (not necessarily perfect) matchings in a planar graph is still #P-complete [Jerrum]. 6 Sample Problems Solved by Holographic Algorithms #PL-3-NAE-ICE Input: A planar graph G =(V, E) of maximum degree 3.
    [Show full text]
  • A Graph-Theoretic Characterization of Free-Fermion-Solvable Spin Models Adrian Chapman and Steven T
    A graph-theoretic characterization of free-fermion-solvable spin models Adrian Chapman and Steven T. Flammia University of Sydney Coogee Quantum Information Theory Workshop 4 February, 2020 Motivation – Exact solutions for spin models • Mapping to free-fermions is a workhorse method • Mathematically elegant. • Starting point for perturbation theory • Rich connection to complexity • Matchgate circuits [1-4] • FKT algorithm [5-7] • Sensitivity conjecture [8,9] • Graph theory plays a central role. [1] B.M Terhal and D.P. DiVincenzo, PRA 65, 032325 (2002). [2] S. Bravyi. PRA 73, 042313 (2006). [3] R. Jozsa and A. Miyake, Proc. R. Soc. A 464, 3089-3106 (2008). [4] D. J. Brod and A.M. Childs, Quantum Info. Comput. 14, 901 (2014). [5] P. W. Kasteleyn. Physica, 27(12):1209 – 1225, 1961. [6] H. N. V. Temperley and M. E. Fisher. The Philosophical Magazine: A Journal of Theoretical Experimental and Applied Physics, 6(68):1061–1063, 1961. [7] L. Valiant. SIAM J. Computing 31:4, 1229-1254, 2002. L. Valiant. SIAM J. Computing 37:5 1565-1594, 2007. [8] H. Huang. arXiv:1907.00847 [math.CO] (2019). [9] Y. Gu and X.-L. Qi. arXiv:1908.06322 [cond-mat.stat-mech] (2019). Graphs of Hamiltonians 푉 vertices 퐺 = (푉, 퐸) ቊ A graph consists of sets 퐸 ≡ 푖, 푗 푖, 푗 ∈ 푉} edges The anti-compatibility graph of a Hamiltonian has vertices corresponding to Pauli terms, which are neighboring if corresponding Paulis anticommute. Anti-Compatibility Graphs – A “Game of Life” Given a graph 퐺 = (푉, 퐸), for every edge 푣1, 푣2 ∈ 퐸: 1. Add a vertex whose neighbors are vertices neighboring exactly one of either 푣1 or 푣2.
    [Show full text]
  • Graph Algorithms
    Graph Algorithms PDF generated using the open source mwlib toolkit. See http://code.pediapress.com/ for more information. PDF generated at: Wed, 29 Aug 2012 18:41:05 UTC Contents Articles Introduction 1 Graph theory 1 Glossary of graph theory 8 Undirected graphs 19 Directed graphs 26 Directed acyclic graphs 28 Computer representations of graphs 32 Adjacency list 35 Adjacency matrix 37 Implicit graph 40 Graph exploration and vertex ordering 44 Depth-first search 44 Breadth-first search 49 Lexicographic breadth-first search 52 Iterative deepening depth-first search 54 Topological sorting 57 Application: Dependency graphs 60 Connectivity of undirected graphs 62 Connected components 62 Edge connectivity 64 Vertex connectivity 65 Menger's theorems on edge and vertex connectivity 66 Ear decomposition 67 Algorithms for 2-edge-connected components 70 Algorithms for 2-vertex-connected components 72 Algorithms for 3-vertex-connected components 73 Karger's algorithm for general vertex connectivity 76 Connectivity of directed graphs 82 Strongly connected components 82 Tarjan's strongly connected components algorithm 83 Path-based strong component algorithm 86 Kosaraju's strongly connected components algorithm 87 Application: 2-satisfiability 88 Shortest paths 101 Shortest path problem 101 Dijkstra's algorithm for single-source shortest paths with positive edge lengths 106 Bellman–Ford algorithm for single-source shortest paths allowing negative edge lengths 112 Johnson's algorithm for all-pairs shortest paths in sparse graphs 115 Floyd–Warshall algorithm
    [Show full text]
  • Holographic Algorithm with Matchgates Is Universal for Planar
    Holographic Algorithm with Matchgates Is Universal for Planar #CSP Over Boolean Domain Jin-Yi Cai∗ Zhiguo Fu† Abstract We prove a complexity classification theorem that classifies all counting constraint satisfac- tion problems (#CSP) over Boolean variables into exactly three categories: (1) Polynomial-time tractable; (2) #P-hard for general instances, but solvable in polynomial-time over planar graphs; and (3) #P-hard over planar graphs. The classification applies to all sets of local, not necessar- ily symmetric, constraint functions on Boolean variables that take complex values. It is shown that Valiant’s holographic algorithm with matchgates is a universal strategy for all problems in category (2). 1 Introduction Half a century ago, the Fisher-Kasteleyn-Temperley (FKT) algorithm was discovered [33, 27, 28]. The FKT algorithm can count the number of perfect matchings (dimers) over planar graphs in polynomial time. This is a milestone in the long history in statistical physics starting with Lenz, Ising, Onsager, Yang, Lee, Fisher, Temperley, Kasteleyn, Baxter, Lieb, Wilson etc [26, 32, 39, 40, 30, 33, 27, 28, 1, 31], with beautiful contributions from many others. The central question is what constitutes an Exactly Solved Model. The basic conclusion from physicists is that for some “systems” their partition functions are “exactly solvable” for planar structures, but appear intractable for higher dimensions. However, exactly what does it mean to be intractable? Physicists did not have a formal notion of intractability. arXiv:1603.07046v1 [cs.CC] 23 Mar 2016 This notion is supplied by complexity theory. Following the P vs. NP theory, in 1979 L. Valiant [34] defined the class #P for counting problems.
    [Show full text]