Complexity of Counting
Total Page:16
File Type:pdf, Size:1020Kb
COMPLEXITY OF COUNTING CHANG CAO ADVISED BY STEVEN LINDELL Abstract. In this paper, we consider two problems related to counting problems in complexity theory. First, we use the reach- ability method to prove that nondeterministic logarithm space is closed under complement. Then, we consider the graph matching problem and explain the FKT algorithm which counts the num- ber of the perfect matchings in a planar graph in polynomial time. The general result of counting perfect matchings is known as the PERMANENT problem, which Valiant proved to be #P -complete. Date: May 13, 2013. 1 2C.CAO Contents Acknowledgment 3 1. Introduction 4 2. Background 4 2.1. Graph 4 2.2. Big O-Notation 5 2.3. Turing Machine 5 2.4. Turing Machine with multiple strings 7 2.5. Language and Functions 8 2.6. Complexity Classes 8 2.7. Nondeterministic Machines 10 3. Reachability Problem 11 4. Complements of Nondeterministic Classes 12 5. The Immerman-Szelepsc´enyi Theorem 13 6. Perfect Matchings 15 6.1. The Problem Formulation 15 6.2. Pfaffians 16 6.3. Use Pfaffian to Count Perfect Matchings 17 References 25 COMPLEXITY OF COUNTING 3 Acknowledgment I would like to express my heartfelt gratitude to my advisor, Dr. Steven Lindell. He is one of the smartest people I know and he con- stantly provided insight, encouragement and patience for me to finish my thesis. His philosophy and attitudes towards computer science and mathematics will always guide me through my future career. His ease and cheerfulness as a scholar can always help me out of those situations where I am stuck . I also would like to thank my family and friends for their support and encouragement. Finally, I want to thank Rengyi(Emily) Xu who has always been supporting me. 4C.CAO 1. Introduction Complexity theory is a field in computer science where people con- sider the reasons why some problems or computations are difficult to solve. The most famous problem in complexity theory, which has been fascinating both computer scientists and mathematicians for decades, is the P = NP problem. A typical instance of the problems in com- plexity theory is that a seemingly easy problem turns out to be hard to solve. An example of this instance is the PERMANENT problem [6]. In this paper, however, we take a different perspective of the treat- ment of computational complexity. In particular, we will focus on two problems, graph reachability and enumeration of perfect matchings in planar graphs. Those are the type of problems which seem to be hard but it finally turns out that they can both be solved by using efficient algorithms. The paper is organized as follows. In Chapter 2 , we discuss back- ground materials, including Turing matching, complexity classes, non- determinisms, etc. In Chapter 3, we show reachability is in NL. Chap- ter 4 discusses the notion of the complement of a problem. In Chap- ter 5, we prove Immerman-Szelepsc´enyi Theorem and derive an im- portant result in complexity theory. The last chapter is dedicated to solving the perfect matching problem on planar graphs. 2. Background In this section, we introduce some mathematical preliminaries for this paper. The presentation follows that of [1, 6]. 2.1. Graph. In this section, we will define the basic model that is used to frame our problems. Definition 2.1 (Directed Graph). A directed graph is a finite set V of vertices and a set E of directed edges, consisting of ordered pairs of vertices. The order of G is the number of vertices in G, denoted by |G|.Thesize of G is the number of edges in G, denoted by e(G). Some graphs can be drawn in a plane in such a way that no two edges intersect and in that case we define: Definition 2.2 (Planar Graph). AgraphG is a planar graph if it can be embedded in R2. Remark 2.3. The edges of a planar graph divide the plane into disjoint regions, called faces. Moreformally,ifwedeletealltheverticesand COMPLEXITY OF COUNTING 5 edges of a planar graph, the remaining regions are connected compo- nents in R2, which is precisely what we mean by faces. Notice that every planar graph has exactly one unbounded face, which is the exte- rior of the graph and is called the infinite face. The fundamental theorem on planar graphs is due to Euler: Theorem 2.4 (Euler’s Formula). If G is a connected planar graph and let v be the number of vertices, e be the number of edges and f be the number of faces, then v − e + f =2. Proof. The proof is omitted. See [1] for more details. 2.2. Big O-Notation. In this section, we introduce the crucial nota- tion which will be used later when we study complexity theory. Let f,g be functions from N to N and assume that they are nonde- creasing. Definition 2.5 (Big O). We say that f(n)=O(g(n)) if there exist a constant c and N so that as long as n ≥ N, f(n) ≤ cg(n). Remark 2.6. On the other hand, we say that f(n)=Ω(g(n)) if there exist a constant c and N so that as long as n ≥ N, g(n) ≤ cf(n). If both of the above hold true for f and g, f(n)=Θ(g(n)). Example 2.7. Let f(n)=nlog n and g(n)=2n. We claim that f(n) lim =0. n→∞ g(n) Indeed, by L’Hˆopital’s rule, we have f(n) (log n)2 2(log n) lim = lim = lim =0. n→∞ g(n) n→∞ n log 2 n→∞ n log 2 That means, f(n)=O(g(n)). 2.3. Turing Machine. In this section, we seek for the most general notion of a computational process. The presentation here follows [6]. 2.3.1. Church-Turing Thesis. An algorithm is a method to solve a problem. The Church-Turing thesis states that a Turing machine can simulate basically every intuitive algorithm. In other words, the Church-Turing thesis asserts a correspondence between an informal no- tion of algorithm and the Turing machine as a mathematical object. While the statement above is not a theorem but a thesis, it is widely accepted that we are unlikely to come up with a more powerful model of computation. There, we adopt Turing machine as the formal model for computation. 6C.CAO 2.3.2. Definition of Turing Machine. The following definition of Turing machine is from [6]. Definition 2.8 (Turing Machine). A Turing machine is a quadruple M =(K, Σ,δ,s). In particular, K is a finite set of states; Σ is a finite set of symbols, usually referred to as the alphabet of M. K and Σ are always disjoint. K contains the initial state s. Σ contains two special symbols, the blank symbol and the first symbol . δ is a map from K × Σto(K ∪{h, “yes”, “no”}) × Σ ×{←, →, −}, where the halting state h, the accepting state “yes”, rejecting state “no” and the cursor directions ← for “left”, → for “right” and − for “stay” are not in K∪Σ. We may visualize a Turing machine as a finite control with a cursor pointing at a symbol on a tape. For every pair (q, σ) ∈ K ×Σ, δ(q, σ)= (q,σ,d), where q is the next state, σ is the symbol to be overwritten on σ and d is the direction in which the cursor will move. For the first symbol , we require that δ(q, )=(q, , →). That indicates that (1) the Turing machine will always be initialized to the first symbol of the input string; (2) the cursor never goes to the left of ; (3) can not be overwritten. Now we define an important notion of a configuration of a Turing machine, which will become the useful tool for us later. Definition 2.9 (Configuration). A configuration of a Turing machine M is a triple (q, u, v)whereq ∈ K and u, v ∈ Σ∗. We define u to be string left to the cursor including the one being scanned by the cursor and v to be the string to the right of the cursor (it is possible that v is empty). The state q is the current state of M. Intuitively, a configuration of a Turing machine records a complete description of the current state of the computation. Now that we have formally defined a configuration of Turing machine, the following rela- tion between configurations is natural: Definition 2.10. Suppose M is a Turing machine. A configuration M (q, u, v) yields configuration (q,u,v) in one step, denoted by (q, u, v) −→ (q,u,v) if a step of the computation of Turing machine from configu- ration (q, u, v) results in configuration (q,u,v). Moreover, we say that configuration (q, u, v) yields (q, u,v)ink steps for k ∈ N, denoted by k M (q, u, v) −−→ (q ,u,v), if there are configurations (qi,ui,vi)fori = M 1,...,k+1sothat(qj,uj,vj) −→ (qj+1,uj+1,vj+1) for all j =1,...,k and (q1,u1,v1)=(q, u, v)and(qk+1,uk+1,vk+1)=(qk+1,uk+1,vk+1). COMPLEXITY OF COUNTING 7 ... b b a a a a ... Input/Output Tape q1 Reading and Writing Head (moves in both directions) q3 ... q2 qn q1 q0 Finite Control Finally, we say that configuration (q, u, v) yields configuration (q,u,v), M ∗ M k denoted by (q, u, v) −−→ (q,u,v) if there exists k ∈ N so that (q, u, v) −−→ (q,u,v).