Computational Complexity: A Quantitative Perspective
Marius Zimand
Elsevier
COMPUTATIONAL COMPLEXITY: A QUANTITATIVE...

Author:
Marius Zimand

This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!

Computational Complexity: A Quantitative Perspective

Marius Zimand

Elsevier

COMPUTATIONAL COMPLEXITY: A QUANTITATIVE PERSPECTIVE

NORTH-HOLLAND MATHEMATICS STUDIES 196 (Continuation of the Notas de Matematica)

Editor: Saul LUBKIN University of Rochester New York, U.S.A.

ELSEVTER 2004 Amsterdam - Boston - Heidelberg - London - New York - Oxford Paris - San Diego - San Francisco - Singapore - Sydney - Tokyo

COMPUTATIONAL COMPLEXITY: A QUANTITATIVE PERSPECTIVE

Marius ZIMAND Department of Computer and Information Sciences Towson University Towson, U.S.A.

ELSEVIER 2004 Amsterdam - Boston - Heidelberg - London - New York - Oxford Paris - San Diego - San Francisco - Singapore - Sydney - Tokyo

ELSEVIERB.V. Sara Burgerhartstraat 25 P.O. Box 211,1000 AE Amsterdam The Netherlands

ELSEVIERInc. 525 B Street, Suite 1900 San Diego, CA 92101-4495 USA

ELSEVIERLtd The Boulevard, Langford Lane Kidlington, Oxford OX5 1GB UK

ELSEVIERLtd 84 Theobalds Road London WC1X 8RR UK

® 2004 Elsevier B.V. All rights reserved. This work is protected under copyright by Elsevier B.V., and the following terms and conditions apply to its use: Photocopying Single photocopies of single chapters may be made for personal use as allowed by national copyright laws. Permission of the Publisher and payment of a fee is required for all other photocopying, including multiple or systematic copying, copying for advertising or promotional purposes, resale, and all forms of document delivery. Special rates are available for educational institutions that wish to make photocopies for non-profit educational classroom use. Permissions may be sought directly from Elsevier's Rights Department in Oxford, UK: phone (+44) 1865 843830, fax (+44) 1865 853333, e-mail: [email protected] Requests may also be completed on-line via the Elsevier homepage (http://www.elsevier.com/locate/permissions). In the USA, users may clear permissions and make payments through the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, USA; phone: (+1) (978) 7508400, fax: (+1) (978) 7504744, and in the UK through the Copyright Licensing Agency Rapid Clearance Service (CLARCS), 90 Tottenham Court Road, London W1P OLP, UK; phone: (+44) 20 7631 5555; fax: (+44) 20 7631 5500. Other countries may have a local reprographic rights agency for payments. Derivative Works Tables of contents may be reproduced for internal circulation, but permission of the Publisher is required for external resale or distribution of such material. Permission of the Publisher is required for all other derivative works, including compilations and translations. Electronic Storage or Usage Permission of the Publisher is required to store or use electronically any material contained in this work, including any chapter or part of a chapter. Except as outlined above, no part of this work may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without prior written permission of the Publisher. Address permissions requests to: Elsevier's Rights Department, at the fax and e-mail addresses noted above. Notice No responsibility is assumed by the Publisher for any injury and/or damage to persons or property as a matter of products liability, negligence or otherwise, or from any use or operation of any methods, products, instructions or ideas contained in the material herein. Because of rapid advances in the medical sciences, in particular, independent verification of diagnoses and drug dosages should be made.

First edition 2004

Library of Congress Cataloging in Publication Data A catalog record is available from the Library of Congress. British Library Cataloguing in Publication Data A catalogue record is available from the British Library.

ISBN: ISSN:

0-444-82841-9 0304-0208

© The paper used in this publication meets the requirements of ANSI/NISO Z39.48-1992 (Permanence of Paper). Printed in The Netherlands.

V

To my family

This page is intentionally left blank

Preface About "quantitative perspective." The subtitle of the book seems to be redundant and requires an explanation. The main purpose of computational complexity is to measure the amount of time, or of space, or of some other resource, that is necessary to solve a computational problem. Thus, by its very nature, computational complexity is a quantitative theory. However, a look at some of the best-known results in complexity (e.g., results asserting the absolute or the conditional separation of complexity classes, or the hardness of certain computational tasks) reveals that the quantitative component is, in many aspects, quite weak. For instance, from the deterministic time hierarchy theorem, we know that there exists a problem that is solvable in exponential time but not in polynomial time. This result, important as it is, raises several questions of a quantitative nature. We would like to know (a) something about the abundance of such problems, (b) if the hardness of the problem manifests itself for just a few rare and accidental inputs, or, on the contrary, for most inputs, and (c) if there is perhaps some approximation of the problem, in some natural sense, that is solvable in polynomial time. This book analyzes such quantitative aspects of some of the most important results in computational complexity. From a certain point of view, most theorems in computational complexity can be divided into two types. Type one consists of those theorems that state a complexity-related attribute of one individual function. Type two consists of those theorems that involve an entire class, or several classes, of functions. This taxonomy is important because it indicates the technical tools that we can use for the quantitative analysis. For type one results, the quantitative attributes of interest have a concrete numerical formulation expressed as a function of the input length. For example, if a function is hard (in some sense), we can ask on how many inputs of length n it is hard. The quantitative analysis of type two results is not so straightforward. A generic formulation of many theorems in this category is that there exists a function / in some class C that has property Q (for example: "There is a function in EXP that is not polynomial-time computable," or, "There exists a computable function that is speedable"). The obvious quantitative question, "How many functions / in C have property Q," is usually not too meaningful. Indeed, for most classes C and properties Q, it holds that if a function / in C has property Q, then almost every finite variation of / is in C and has property Q as well, and, vii

vm therefore, the answer is trivially "An infinity." Fortunately, mathematicians have already developed tools and theories to handle this type of situations. The solution is to rephrase the question as "How large is the subset of function in C that have property Q," and to seek answers such as "small," or "large," or several nuances inbetween by using concepts from topology and measure theory. The theoretical foundations of this approach are presented in Chapter 1, Section 1.2. A result enhanced with relevant quantitative attributes is more informative and more convincing and, therefore, clearly has theoretical merit. Besides that, a quantitative result can have, especially for type one results, practical value as well. At some point, there has been a common perception that computational complexity is a theory of "bad news," because common results, such as showing that a problem is NP-complete, assert that real-world and innocent-looking tasks are not feasible (in general, if we assume some reasonable hypothesis). In fact, "bad news" is a relative term, and, indeed, in some situations, we want an adversary to not be able to perform a task, e.g., to not be able to break our cryptography protocol. However, a "bad news" result does not automatically become useful in such a scenario. For this to happen, its hardness features have to be quantitatively evaluated and shown to manifest extensively. Audience. My intention has been to write the book so that it appeals to a large audience. Experts in computational complexity may be interested in the special "quantitative" angle from which most results are presented. However, my primary target audience is elsewhere. In my intention, the book should benefit the most a reader who knows already the basic tenets of complexity, enjoys a rigorous mathematical treatment of a subject, wants to find out more about complexity than what is covered in a standard course, and, in particular, is interested in the novel major developments in complexity. The book is self-contained and can serve as a textbook for a course in advanced computational complexity. In general, the book should appeal to graduate computer science students and postdocs, and to researchers who have an interest in theory and need a good understanding of computational complexity, e.g., researchers in algorithms, AI, logic, and other disciplines. Topics. The intended audience has influenced the choice of topics. Most of them are relevant outside the immediate scope of computational complexity. Also, most of them go beyond the material that is covered in a standard first course in complexity theory. One chapter is dedicated to abstract complexity theory, an older field which, however, deserves attention because it lays out the foundations of complexity. The other chapters, on the other hand, focus on recent and important developments in complexity. The book presents in a fairly detailed manner concepts that have been at the center of the main research lines in complexity in the last decade or so, such as: average-complexity, quantum computation, hardness amplification, resource-bounded measure, the relation between one-way functions and pseudo-random generators, the relation between hard predicates and pseudorandom generators, extractors, derandomization of bounded-error probabilistic algorithms, probabilistically checkable proofs, non-approximability of optimization

IX

problems, and others. In some cases, it has not been possible, given the book's scope, to present the ultimate results regarding some of these concepts. However, I have included a presentation of the proof techniques that are required to obtain such results. Chapter 1 presents basic facts from the theory of computation, computational complexity, topology, and measure theory that are used throughout the book. Depending on the reader's familiarity with these matters, this chapter should be read first, or just browsed and used as a reference. The other chapters are independent and can be read in any order. Chapter 2 presents the most important results in abstract complexity theory. These are classical results, which are displayed here from a novel angle that emphasizes some important quantitative facets. Chapter 3 explores quantitative issues regarding the most important complexity classes, namely P, NP, E, and EXP. It includes a section on average-case complexity. Chapter 4 is dedicated to quantum computation. The discussion concentrates on the potential of quantum computation to vastly outperform classical computation. Chapter 5 focuses on some of the basic primitive objects that are used in cryptography: One-way functions, pseudo-random generators, and hard functions and predicates. The presentation emphasizes the quantitative attributes of these primitives, an aspect that is essential for their utilization in cryptography. Chapter 6 is dedicated to NP optimization problems. The chapter concentrates on the issue of whether individual problems from this category admit polynomialtime good approximation algorithms. I will maintain a website for this book (accessible from my web page at http://triton.towson.edu/~mzimand). It will contain a list of comments and updates for the topics presented in the book, and a list of errata. Please send me your comments and any error that you find in the book. Acknowledgments. I would like to thank Saul Lubkin who gave me the idea to write this book and encouraged me over the years to complete this undertaking. I am grateful to Richard Chang, William Gasarch, Sanjay Gupta, Omer Horvitz, and Jon Squire who read parts of the book and gave me useful suggestions. I thank Mirko Jane for his expert advice on typesetting issues and for the many hours he spent struggling with my poorly Latex-edited manuscript. Special thanks to my wife Iliana and my son Paul. This book would not exist without their patience, support, and love. Baltimore, February 18, 2004.

Marius Zimand

This page is intentionally left blank

Contents Preface

vii

Contents 1

xi

Preliminaries 1.1

1.2

Short 1.1.1 1.1.2 Short 1.2.1 1.2.2

1

guide to computability and computational complexity . . . . Computability Computational complexity guide to topology and measure theory Topology Measure theory

2

Abstract complexity theory 2.1 Chapter overview and basic definitions 2.2 Complexity classes 2.3 Speed-up 2.4 Gap and compression 2.5 Union theorem 2.6 Effective measure 2.7 Notes

3

P, NP, and E 3.1 Chapter overview and basic definitions 3.2 Upper bound for 3-SAT 3.3 NP vs. P—the topological view 3.4 P, NP, E—the measure-theoretical view 3.5 Strong relativized separation of P and NP 3.6 Average-case complexity 3.7 Notes xi

1 1 6 11 12 14 25 25 28 30 38 45 46 49 51 51 55 60 71 85 92 106

xii

CONTENTS

4 Quantum computation 4.1 Chapter overview and basic definitions 4.2 Quantum finite automata 4.3 Polynomial-time quantum algorithms 4.4 Notes

109 109 118 126 140

5 One-way functions, pseudo-random generators 5.1 Chapter overview and basic definitions 5.2 From weak to strong one-way functions 5.3 From one-way permutations to extenders 5.4 From extenders to pseudo-random generators 5.5 Pseudo-random functions 5.6 Hard functions 5.7 Hard predicates 5.8 From hard predicates to pseudo-random generators 5.9 BPP = P? 5.10 Extractors 5.11 Notes

143 143 157 161 171 175 179 197 200 209 211 222

6 Optimization problems 6.1 Chapter overview and basic definitions 6.2 Logical characterization of NP 6.3 Logic and NP optimization 6.4 Maximization problems 6.5 Minimization problems 6.6 Non-approximation properties 6.7 Non-approximability of MAX CLIQUE 6.8 Non-approximability of SET COVER 6.9 Probabilistically checkable proofs 6.10 Notes

225 225 230 239 252 257 266 282 289 296 313

A Tail bounds

317

Bibliography

321

Index

333

Chapter 1

Preliminaries 1.1

Short guide to computability and computational complexity

The purpose of this section is to fix some terminology and to briefly overview a few basic facts from computability theory and computational complexity theory that will be used in the book. Of course, this being a book on computational complexity, many other concepts will be introduced throughout the book.

1.1.1

Computability

Computability theory explores the capabilities and the limits of algorithms. Intuitively, an algorithm is a mechanical procedure given by a finite description. An algorithm's objective is to solve a computational problem. A computational problem consists of a (usually infinite) set of inputs and of associated tasks. For example, an input can be a positive integer and the associated task is to determine if the number is prime or not. An algorithm that solves a computational problem takes an arbitrary input and performs the associated task. One of the questions addressed by computability theory, perhaps the most basic one, is whether, for a given computational problem P, there exists or not an algorithm that solves it. According to the Church-Turing thesis, the informal notion of an algorithm is fully captured by the formal concept of a Turing machine. A Turing machine models a device (e.g., computer) that is able to perform mechanical computations. For this reason, a Turing machine is said to be a computational model. Many other computational models have been considered: Random-access machines, Markov algorithms, A-calculus, and others. They all turned out to have identical computational power. For instance, for any Turing machine M, there is a random-access machine R that simulates the computations performed by M, and vice-versa, for any random-access machine R, there is a Turing machine M that simulates the computations performed by R. 1

2

Chapter 1. Preliminaries

In this book, we adopt the Turing machine as the standard model of computation. Among other things, this implies that the term machine, unless specified otherwise, signifies a Turing machine. A Turing machine (TM), in its basic variant, is given by seven components denoted Q, F, S, 5, gstart, logn and s2(n) > logn, for all n. (a) //ti(n)logti(n) = o(t2(n)), then DTIME[ii] C DTIME[i2]. (b) Ifh(n + 1) = o(t2(n)), then NTIMEfc] C NTIME[£2]. (c) //si(n) = o(s2(n)), then DSPACE[Sl] C DSPACE[a2](d) Ifsi(n) = o(s2(n)), then NSPACE[si] C NSPACE[s2]. The following relations are known between deterministic and nondeterministic complexity classes. Theorem 1.1.4 (Deterministic classes vs. nondeterministic Classes, see [DKOO]) Let / 1 : N —> N be a fully space-constructible function, f\{n) > n, for all n £ N, and let f2: N —> N be a fully space-constructible function, f2(n) > logn, for all n £ N. Then, (a) NTIME[/i(n)] C (JC>ODTIME[2C^W]. (b) NSPACE[/2(n)] C (Jc>0DTIME[2c'2W]. (c) NTIME[/i(n)]CDSPACE[/i(n)]. (d) NSPACE[/2(n)] C DSPACE[(/2(n))2].

8

Chapter 1. Preliminaries

There are numerous complexity classes and some are defined by different mechanisms (in Chapter 6, for instance, we will see complexity classes defined by syntactically restricted formulas in some logical systems). However, it is universally accepted that the following classes are the most important. Definition 1.1.5

• L = DSPACE[logn] (deterministic space);

• NL = NSPACE[logn] (nondeterministic space); •

p

= Ufc>i DTIME[n'°] (polynomial time);

• NP = (Jfc>i NTIME[nfe] (nondeterministic polynomial time); • PSPACE = (Jfc>i DSPACEjn*] (polynomial space, equal to \Jk>1 NSPACE[n*];; • E = UC>ODTIME[2C"]; • NE = UC>ONTIME[2C"]; • EXP = |J fc>1 DTIME[2"fc] (exponential time); • NEXP = (Jfc>i NTIME[2n ] (nondeterministic exponential time); Nondeterministic computation can be viewed in a different way. We can assume without loss of generality that a nondeterministic Turing machine has exactly two choices at each non-final step (i.e., each non-halting configuration has exactly two ordered successor configurations). In this case, at each step, a guess takes the form of a bit b, such that b = 0 (6 = 1) means the machine will go in the first successor configuration (respectively, the second successor configuration). In fact, we can consider that the machine on input x makes all the guesses upfront in the form of a binary string y, written perhaps on a separate tape, after which the rest of the computation runs in a deterministic fashion. Via these observations, the following alternative definition of the class NP can be shown. Theorem 1.1.6 For any language A, A £ NP if and only if there is a predicate Q computable in polynomial time and a polynomial p such that, for any input x, x£A&3y£Z*

(|y| 1/2. (b) (BPP) A language A is in BPP if there is a constant e > 0 and a polynomialtime probabilistic Turing machine M such that x£ L 1/2 + e, x $ L o Proby (M{x, y) = l)< 1/2 - e. (c) (RP) A language A is in RP if there is a polynomial-time probabilistic Turing machine M such that i e L » Proby(M(x, y) = 1) > 1/2, x 1, be the i-th string in E* according to this ordering and pos(x) £ N — {0} be the rank of string x in this ordering (i.e., pos(a;) = i •£> x — s^). For x £ E*, \x\ denotes the length of x. The cardinality of a set A is denoted by \\A\\. For x £ E* U S°°, x(i) £ {0,1} is the z-th bit of x, and x(i : j) is the string x(i)x(i + 1).. .x(j) (defined for i and j at most |a;|, in case x £ S*). We identify a language A C S * with its characteristic sequence A(si)A(s2)... A(sn)..., where for each positive integer i, A(si) — 1 if Si £ A, and A(si) = 0 if s* £ A. By this codification, A£E°°. Therefore, classes of computable sets are subsets of S°° and, thus, X is taken to be E°°. In this book, we consider two bases Bc and Bs, generating the Cantor topology and, respectively, the superset topology. Both these bases are formed by sets indexed by finite binary strings. Thus, Bc = (U£)vex* and Bs = (U^)t,es* • For v £ E*, U£ (the basic open set defined by v in the Cantor topology) is defined by U% = {w £ E°° | Vi (1 < i < \v\ ^ («(») = w(i)))}. For v £ E*, U^ (the basic open set defined by v in the superset topology) is defined by U£ = {w £ E°° | Vi ((1 < i < \v\ and v(i) = 1) =» (v(i) = w(i) = 1))}. It is readily checked that for every Vi and v2 in E*, if U^ t~] U^2 ^ 0, then there exits i>3 in E* such that U^ D U^ = U^3, and that for every w in E°°, there exists v in S* such that w £ U!~. The same properties hold for the sets in Bs, which implies that Bc and Bs are indeed valid basis for £°°. Let Oc be the set of open sets generated by the base Bc, and Os be the set of open sets generated by the base Bs. The Baire Category Theorem holds for the topological spaces (X, Oc) and (X,OS). The Cantor topology is arguably the most natural topology on E°°. It can also be defined as the infinite product of the discrete topology on S. The Cantor topology corresponds to extensions of finite initial binary segments (i.e., predicates with domain of the form {0,1,... ,n} for some n), an operation which is extensively used in computable function theory and in computational complexity theory. Indeed, U^ can be regarded as the class of predicates that extend the finite initial predicate encoded by v. The superset topology is the "next natural" topology on E°°. It corresponds to extension of finite sets, an operation which is also widely used. Indeed, U^ can be regarded as the class of sets that are supersets of the finite set encoded by v. A construction, similar to the one leading to the Cantor topology on the space of binary languages, can be carried out for the class of computable functions. The

14

Chapter 1. Preliminaries

only difference is that the binary alphabet E is replaced by the infinite alphabet N, the set of natural numbers. Such a topology is considered in Chapter 2. Often the topology that is considered will be stated upfront, and in this case the superscripts C and S will be omitted. Unfortunately, the classical setting is not good enough for our purposes. It can be seen that any countable class of subsets of E°° is meagre relative to the Cantor topology. The same holds relative to the superset topology for any countable class that does not contain infinite binary strings in which almost every bit is 1. Indeed, to consider just the case of the Cantor topology, if Y = (li)igN is a countable class of subsets of E°°, then Y = UieN^} anc^e a c n class {Yj} is nowhere dense, because for each [/£ € Bc one can easily find lf£ € Bc such that [/£ C U^ and U^ n Yi = 0. The string v \v^\, U2C7) 7^ Yi(sj). Of course, this is not surprising. By viewing Y as a set of real points in the interval [0,1] (obtained by associating to each Yi £ E°°, the real number 0.1^(1)1^(2)..., written here in base 2), we see that Y, being a countable set, is "full of holes." As we deal with algorithmic objects, it is natural to overcome this difficulty by considering an effective or even resource-bounded version of Definition 1.2.1. Namely, returning to the previous example, we demand that, given v\, V2 should be found in a computable way or even by an algorithm acting within predetermined resource bounds. In other words, a set A is nowhere dense in the effective sense, if the holes can be effectively constructed. Thus, in the effective analogues of Definition 1.2.1, part (1) that we will use in the forthcoming chapters, we require the existence of computable or resource-bounded witness functions that compute U 0, there exist a closed set F and an open set G (in the standard topology on the real line) such that F C C C G and n*{G — F) < e. It can be shown that a set C is Lebesgue measurable if H*(B) = n*(BnC)+fi*(BnC),

for all BC [0,1],

where C = [0,1] — C. Also, the class of Lebesgue measurable sets is closed under the operations of countable union and difference of sets, and that the empty set is a Lebesgue measurable set. Definition 1.2.2 (a-field) A collection of sets that contains the empty set and is closed under countable union and difference of sets is called a a-field. Thus the Lebesgue measurable sets form a a-field. Definition 1.2.3 (Lebesgue measure) The restriction of /z* on the a-field of Lebesgue measurable sets in [0,1] is denoted by (i and is called the Lebesgue measure on the interval [0,1]. The function fi is real-valued, non-negative, countably additive (i.e., if (Cj)jeN is a sequence of Lebesgue measurable pairwise disjoint sets, then /^(IJieN ^«) = SigN / i (^'i)) a n d M(0) = 0 (these are the properties of a measure in the general setting). For any class of subsets of a set X of real numbers, there is a smallest a-field of subsets of X that contains it. This is called the a-field generated by the class. The members of the cr-field generated by the class of intervals included in X are called the Borel sets of X. It turns out that we can restrict the class of measuring sticks even more and consider only intervals of the form [O.Z1X2 • • • xn,0.xiX2 • • • x n l l . . . ] . We denote this interval by Bx, where x = x^x-i • • • xn £ E*. Note that the length of Bx is 2"lxl and that the sets Bx are just the basic open sets in the Cantor topology. The key point is that the a-field generated by the collection of sets (#z)zes* coincides with the Borel sets of [0,1] (taking into account the association between subsets of S* and real numbers in [0,1]). It can be shown that

16

Chapter 1. Preliminaries

every Borel set is Lebesgue measurable, which is good news, because most classes of interest in computational complexity correspond (via the association described above) to Borel sets of [0,1]. Intuitively, most classes that play a role in computer science are obtained as a result of at most a countable number of steps that have a finite description and usually it holds that the result of such a step is a set of the form Bx. The Kolmogorov's 0-1 Law applies frequently to classes of interest in computational complexity. In this context, it states that a set of infinite binary strings that is Lebesgue measurable and is closed under finite variants has either Lebesgue measure zero or Lebesgue measure one. 6 Therefore, most classes of sets that appear in computational complexity are Lebesgue measurable, and, moreover, almost every such class has Lebesgue measure either zero or one. The concepts of measure and measurable sets can be defined in an abstract setting by imitating the construction of the Lebesgue measure in [0,1]. In lieu of the real interval [0,1], we start with an arbitrary set A. In the role of intervals (a, b) C [0,1], we use a class of subsets of ^4, called cylinders, and we require that cylinders have the following two structural properties: (i) If Ga and GT are two cylinders, then GCT C\ GT is also a cylinder, (ii) If Ga and GT are two cylinders, then there is a finite set of pairwise disjoint cylinders G1,...,Gp such that G 2~fc is an arbitrarily small value). The procedure runs in stages. We start with 2~k dollars invested in the whole interval [0,1] and 0 dollars on all others subintervals of [0,1]. Thus initially, invest([0,1]) = 2~k and invest(J) = 0, for all other subintervals /. We can imagine playing a game as follows: At each stage, the investment on each interval I doubles its value and this new amount is reinvested on It and IT, the left half and the right half intervals of /, the amount invested on each of these half intervals being decided by a computable or resource-bounded betting strategy. The goal is to concentrate the investition on the intervals that give a sufficiently precise cover of A. The procedure continues for a number of stages decided by us. Summarizing, at each stage the intervals on which we invest have half the length of their father and the available amount of money doubles. By induction on the stage number, it follows that

at each stage. Let us say that / is a winning interval if the final amount invested in / is greater or equal than 1 dollar. We win the game if A is covered by winning intervals. If we win the game, then we effectively found a covering of A of total length < 2~h, because it follows that

To show that a set A has measure zero, we would like to win the game for all k > 0, so that we find coverings of arbitrarily small total length. Equivalenly, by scaling, we can assume that we play a sequence of games, gamei,game2, • • • ,gamen,..., and in each game we start with the same amount, say 1 dollar. In gamen, a winning interval is an interval on which, at the end of the game, we have invested n dollars. If, in all the games, we manage to cover A by winning intervals, then we can infer that A has measure 0 (this argument is made rigorous in Lemma 1.2.9). The intervals are given by the basic sets Bx. Thus, [0,1] = B\, [0,1/2] = BQ, [1/2,1] = B\, and so on. Let d(x) be the amount invested on Bx. The rule of the game can be written as d(xO) + d(xl) = 2d(x), for each x 6 £*. Such a function is called a martingale. The above ideas are formalized in the following definition.

1.2. Short guide to topology and measure theory

19

Definition 1.2.6 (Martingale) (i) A martingale is a function d: S* —» [0, oo) satisfying

for all strings in £*. (ii) The global value of the martingale d is d(\), where A is the empty word. (iii) The set covered by a martingale d is

S[d] =

\J

Bw.

wes' ,i (iv) A martingale d covers a set X C S°° if X C S[d]. (v) For each n £ N, the set n-covered by a martingale d is

Sn[d] =

(J

Bw.

u/GS* ,d(w)>n

(vi) A martingale d n-covers a set X C E 0 0 if X C 5 n [d]. (vii) J4 martingale d succeeds on a set X C T,°° if, for all n £ N, X C iSn[d].

Let us play this betting game on a few classes of sets. Example 1.2.7 Consider a class C1 containing a single set A and let k £ N. We start with 2~k dollars, i.e., d(\) = 2~k. We bet

and

Let w = A(si)A(s2) • • • A(sk)- Observe that d(w) = 1 and, since A e Bw, it follows that d covers the set C\. It is easy to see that in fact d succeeds on C\. | Example 1.2.8 A set A is sparse if there is a polynomial p such that ||j4- n || < p(n), for all n £ N. Consider Ci the class of sparse sets and let us build a martingale that covers C2. Let k € N. We start with d(X) = 2~k and, recursively, we define d(xO) = (3/2) -d(x), and d(xl) = (1/2) -d(x). Let us look at the value of d(A-n), when A is a sparse set. For all the strings of length at most n that are not in A (let out(n) be the number of such strings), we have increased the investment by a factor of 3/2. For all the strings of length at most n that are

20

Chapter 1. Preliminaries

in A (let in(n) be the number of such strings), we have decreased the investment by a factor of 1/2. Thus

where p is the polynomial that bounds from above ||J4-™|| • Clearly, for n sufficiently large, d(A-n) > 1. Thus, A e S[d], and, consequently, C2 C S[d]. It is easy to see that, in fact, d succeeds on CiI As discussed, martingales can be used as an alternative way to define the measure of a set C C E°°. Lemma 1.2.9 Let C CS°° (equivalently, C C [0,1]) and a € K. (i) C has an a-cover if there is a martingale d with global value d(X) < a such thatCCS[d). (ii) // there is a martingale d with global value d(X) < a such that C C iSn[d], then C has an a/n-cover. Proof, (i) Let {BXn \ n > 0} be an a-cover of A. Define dXn : S* -> [0,1] by , , , _ J2l»l-I x "l, 2, • • •, Wk} are the descendants of a common node WQ £ Cd- Then it is easy to see that

So, if in the sum in the left hand side of (1.1) we replace all the terms of nodes that have a common ancestor u>o in Cd by the term d(wo)2~\w°\ corresponding to that ancestor, then the sum in the left hand side of (1.1) does not change. Furthermore, if we delete from the modified sum all the terms contributed by the nodes that have no descendant in Cd, we can only decrease the sum in the left hand side of (1.1), which therefore becomes at most d(\). Since 7 is the limit of these modified sums, it follows that 7 < d(\). | Corollary 1.2.10 A set C has measure 0 if and only if there is a martingale d that succeeds on C. This corollary is the basis for the definition of effective and resource-bounded measure. In these cases, we only add the requirement that the martingale is computable or that it belongs to a certain complexity class. We only define what it means for a set to have measure zero or measure one, because, as we have already mentioned, the classes of interest in computational complexity, if they are measurable at all, only have classical Lebesgue measure zero or one (these classes are closed under finite variations and thus they are subject to the Kolmogorov 0-1 law). Definition 1.2.11 Let T be a class of functions. (i) A class C C E°° has T-measure zero if there is a martingale d in T that succeeds on C. (ii) A class C C E°° has T-measure one if the complement of C has F measure zero. (iii) A class C C £°° has T-measure zero in a class D C E°° if C n D has T measure zero. (iv) A class C C E°° has T-measure one in a class D C E°° if the complement of C has T measure zero in D. In our investigations, we will consider F to be a class of effectively computable functions such as the class of computable functions, or the class of functions computable in polynomial time. In the standard definitions, these types of functions

22

Chapter 1. Preliminaries

take values in the set of natural numbers, or in the set of strings over some alphabet. In our context, we want them to be martingales which in general are defined to take values that are nonnegative real numbers. We will assume that effective martingales take values in the set of nonnegative dyadic rational numbers, i.e., in the set D = {m2~n \ m,n £ N}. Thus, the values taken by these martingales have a finite representation and, therefore, we can talk about effectively computable martingales. It is important to note that, depending on F, a class C containing a single set A may not have F-measure zero (the reader can look at Example 1.2.7 to see why this is so). The second basic property of measure zero sets still holds: If C C D and D has F-measure zero, then C has F-measure zero. The third basic property of measure zero sets (if C = (J n > 0 Cn and all Cn have measure zero, then C has measure zero) in general fails. The reason is that in order to build the martingale that succeeds on C, we need a universal function able to simulate all the martingales dn that succeed on C n , and such a universal function may not be in F. However, this difficulty can be overcome if F has a few nice closure properties and if there is a certain uniformity among the martingales which show that the classes in the union have F-measure zero. Thus, we need several definitions. A function d: N x S* —> [0,1] is a martingale system if, for each t £ N, the function di: E* —> [0,1], defined by di(x) = d(i, x) is a martingale. A class C is a T-uniform union of T-measure zero sets if there is a countable family (Cn)nepj and d a martingale system such that (a) d £ F, (b) C = [JneN Cn, and (c), for all n £ N, dn succeeds on Cn. We say that a class of functions F is closed under bounded sum if, for any martingale system d, with d £ F, the function d': E* —> [0,1], defined by

d'(x) = £ Ux) i dn{x). It follows that d succeeds on Cn. This holds for every n, and, therefore, we conclude that d succeds on C. | Example 1.2.13 Let C be the class of sets A such that for almost every n G N, 0™ € A. We show that C has F-measure zero, where F is the class of computable functions. It is clear that this class of functions is closed under bounded sum and finite variation. Let Ci = { A | f o r a U n > i , 0 " € ^ } . We define a martingale di by (i) di(X) — a (a is an arbitrary strictly positive real value), (ii) di(x) = di(pred(x)), if s\x\ ^ 0 n , and Sjx| ^ 0 n ~ a l,n > i, and (iii) di(x) = 2-di(pred(a;)), if s^ =0n,n>i and d{(x) = 0 if sM = 0 n " 1 l , n > i. Since 0 n = S2", for all n, it follows that

for all n > i. Therefore di succeeds on Cj. Thus, the function d(i, x) = di(x) verifies the conditions in Proposition 1.2.12. |

This page is intentionally left blank

Chapter 2

Abstract complexity theory 2.1

Chapter overview and basic definitions

Abstract complexity theory studies fundamental quantitative aspects of computing. The theory reveals complexity related properties that are machineindependent in the sense that they are valid regardless of the particularities of a specific computational model. For instance, abstract complexity theory addresses fundamental questions such as: (1) Is there an absolute upper bound for the complexity of all (or of most) computable function? (2) Is there a best way (resource-wise) to calculate a computable function? (3) If we spend more computational resources, can we compute more functions? At the center of the theory lies the concept of an abstract complexity measure. This notion models almost any realistic computational resource that one may be interested in, in particular the running time and the amount of memory used in a computation. One could envision other computational resources as well such as the consumed energy, the number of accesses to registers and memory, etc. In this chapter, we take an abstract approach. We first consider (po, j attached to j,4>j)jeN satisfies the following two axioms, called the Blum axioms: (BA 1) For each i € N, &i(x) is defined if and only if (fi(x) is defined, or, in more formal notation,

26

Chapter 2. Abstract complexity theory (BA 2) The following predicate of three arguments

is computable. Definition 2.1.1 (Blum space) A Blum space $ is a sequence of pairs of functions {(fi,^i))ieN, such that (a) (i)ieN satisfies the two Blum axioms. To understand the justification of the two axioms, we recommend the reader to mentally check that the natural computational resources listed above satisfy the two Blum axioms.1 Consequently, the theory of abstract complexity measures (more concisely known as abstract complexity theory or Blum complexity theory) applies to them and, in fact, to virtually every natural resource in any conceivable realistic model of computation. It is remarkable that the two simple Blum axioms lead to deep results of extreme generality. In this chapter, we will present the most important results of abstract complexity theory, including answers to the questions (1), (2), and (3). In the spirit of this book, we will not content ourselves with just showing the existence of functions having interesting properties (such as, for example, functions for which the answer to question (2) is negative). We will also analyze such results quantitatively by looking at the size of classes of such functions from a topological or measure-theoretical point of view. The topological analysis follows the ideas presented in Section 1.2.1. We use the Cantor topology. In our context, it is convenient to view the finite strings over the alphabet N (or {0,1}) that define the base of the Cantor topology in the space of p.c. functions (or, respectively, p.c. predicates) as being functions whose domain is an initial segment of N. In the rest of our discussion we consider the case of p.c. functions, and just note that the p.c. predicates can be treated similarly. For f,g£ PC, we write / C. g in case dom(/) C dom(5) and f(x) = g(x), for every x in dom(/). For every t € FPC, let

ut = {/ e PC 11 c / } . The family (£/t)teFPC is a system of basic neighborhoods in PC defining the Cantor topology in the set of p.c. functions; we work with the topology generated by this 1

Sometimes, we may need to do inconsequential modifications in the standard definition of a complexity measure. For instance, to conform to axiom (BA 1), we can assume that the space used in a non-halting computation is infinite.

2.1. Chapter overview and basic definitions

27

system. In the classical framework (see the discussion in Section 1.2.1; for notation, see Section 1.1.1), a set A in a topological space is nowhere dense (or rare) if for every non-empty open set O there exists a non-empty open subset O ' C O such that O' PI A = 0. A set is of first Baire category (or meagre) if it is a finite or denumerable union of nowhere dense sets, and it is of the second Baire category if it is not meagre. In the effective variant of these notions, the open set O' is obtained effectively from O. Formally, there exists a computable function / that for almost every basic open set Ut produces a witness f(t) which indicates a basic open set £//( j implies

x n uaf(n) = 0. (2) A set X of p.c. functions is effectively of first Baire category (or effectively meagre) if there exist a sequence of sets (XJ)J £ N and a computable function f such that (i) X = [)ieN

Xu

and, for all i € N, (ii) an C a/«i,n», for all n € N, (iii)

there exists j € N such that, for alln € N, \an\ > j implies

(3) A set X of p.c. functions is a set effectively of second Baire category if X is not a set of effectively first Baire category. In the rest of this chapter, we only consider the above effective version of Baire classification. For conciseness, we usually drop the word effectively in the above terminology. The subsets of the set of p.c. functions can be classified with respect to the following hierarchy of sets of increasing size: nowhere dense, first Baire category (or meagre), second Baire category, co-meagre, and co-nowhere dense sets (see Definition 1.2.1). Intuitively, from a topological point of view, a nowhere dense set is tiny, a first Baire category set is small, a second Baire category set is not small, and co-meagre and co-nowhere dense sets are large.

28

Chapter 2. Abstract complexity theory

One can easily observe that the extensions C in the above definition can be taken to be proper (c), and this will be the case in all our further considerations. As mentioned, a topology over the set of p.c. predicates can be introduced similarly. The above definition can be stated in terms of the relativized topology of p.c. predicates (i.e., {0,1}-valued functions), by simply considering that (an)neN enumerates FPRED, the set of all p.c. predicates having the domain equal to a finite initial segment of N, (i.e., each an can be considered to be a binary string). In this case, the topology is generated by the basic open sets (£/t)teFPREDi where Ut = {/ I t Q / , / is a p.c. predicate}. This abuse of notation (i.e., we use the same notation for the basic open sets of both PC and PRED) will always be clarified by context.

2.2

Complexity classes

IN BRIEF: Any complexity class is topologically small. The central concept in computational complexity is that of a complexity class. Definition 2.2.1 (Complexity class) Let $ = ((

\ 0,

if

®'(x}< 9^ for

aiix>

i

otherwise.

One can easily check that C* = Ui I G N ^ W ) ' an

• for x — |a n |, a

,, (msx(l - (pi(x),0), if$i(x)

Marius Zimand

Elsevier

COMPUTATIONAL COMPLEXITY: A QUANTITATIVE PERSPECTIVE

NORTH-HOLLAND MATHEMATICS STUDIES 196 (Continuation of the Notas de Matematica)

Editor: Saul LUBKIN University of Rochester New York, U.S.A.

ELSEVTER 2004 Amsterdam - Boston - Heidelberg - London - New York - Oxford Paris - San Diego - San Francisco - Singapore - Sydney - Tokyo

COMPUTATIONAL COMPLEXITY: A QUANTITATIVE PERSPECTIVE

Marius ZIMAND Department of Computer and Information Sciences Towson University Towson, U.S.A.

ELSEVIER 2004 Amsterdam - Boston - Heidelberg - London - New York - Oxford Paris - San Diego - San Francisco - Singapore - Sydney - Tokyo

ELSEVIERB.V. Sara Burgerhartstraat 25 P.O. Box 211,1000 AE Amsterdam The Netherlands

ELSEVIERInc. 525 B Street, Suite 1900 San Diego, CA 92101-4495 USA

ELSEVIERLtd The Boulevard, Langford Lane Kidlington, Oxford OX5 1GB UK

ELSEVIERLtd 84 Theobalds Road London WC1X 8RR UK

® 2004 Elsevier B.V. All rights reserved. This work is protected under copyright by Elsevier B.V., and the following terms and conditions apply to its use: Photocopying Single photocopies of single chapters may be made for personal use as allowed by national copyright laws. Permission of the Publisher and payment of a fee is required for all other photocopying, including multiple or systematic copying, copying for advertising or promotional purposes, resale, and all forms of document delivery. Special rates are available for educational institutions that wish to make photocopies for non-profit educational classroom use. Permissions may be sought directly from Elsevier's Rights Department in Oxford, UK: phone (+44) 1865 843830, fax (+44) 1865 853333, e-mail: [email protected] Requests may also be completed on-line via the Elsevier homepage (http://www.elsevier.com/locate/permissions). In the USA, users may clear permissions and make payments through the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, USA; phone: (+1) (978) 7508400, fax: (+1) (978) 7504744, and in the UK through the Copyright Licensing Agency Rapid Clearance Service (CLARCS), 90 Tottenham Court Road, London W1P OLP, UK; phone: (+44) 20 7631 5555; fax: (+44) 20 7631 5500. Other countries may have a local reprographic rights agency for payments. Derivative Works Tables of contents may be reproduced for internal circulation, but permission of the Publisher is required for external resale or distribution of such material. Permission of the Publisher is required for all other derivative works, including compilations and translations. Electronic Storage or Usage Permission of the Publisher is required to store or use electronically any material contained in this work, including any chapter or part of a chapter. Except as outlined above, no part of this work may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without prior written permission of the Publisher. Address permissions requests to: Elsevier's Rights Department, at the fax and e-mail addresses noted above. Notice No responsibility is assumed by the Publisher for any injury and/or damage to persons or property as a matter of products liability, negligence or otherwise, or from any use or operation of any methods, products, instructions or ideas contained in the material herein. Because of rapid advances in the medical sciences, in particular, independent verification of diagnoses and drug dosages should be made.

First edition 2004

Library of Congress Cataloging in Publication Data A catalog record is available from the Library of Congress. British Library Cataloguing in Publication Data A catalogue record is available from the British Library.

ISBN: ISSN:

0-444-82841-9 0304-0208

© The paper used in this publication meets the requirements of ANSI/NISO Z39.48-1992 (Permanence of Paper). Printed in The Netherlands.

V

To my family

This page is intentionally left blank

Preface About "quantitative perspective." The subtitle of the book seems to be redundant and requires an explanation. The main purpose of computational complexity is to measure the amount of time, or of space, or of some other resource, that is necessary to solve a computational problem. Thus, by its very nature, computational complexity is a quantitative theory. However, a look at some of the best-known results in complexity (e.g., results asserting the absolute or the conditional separation of complexity classes, or the hardness of certain computational tasks) reveals that the quantitative component is, in many aspects, quite weak. For instance, from the deterministic time hierarchy theorem, we know that there exists a problem that is solvable in exponential time but not in polynomial time. This result, important as it is, raises several questions of a quantitative nature. We would like to know (a) something about the abundance of such problems, (b) if the hardness of the problem manifests itself for just a few rare and accidental inputs, or, on the contrary, for most inputs, and (c) if there is perhaps some approximation of the problem, in some natural sense, that is solvable in polynomial time. This book analyzes such quantitative aspects of some of the most important results in computational complexity. From a certain point of view, most theorems in computational complexity can be divided into two types. Type one consists of those theorems that state a complexity-related attribute of one individual function. Type two consists of those theorems that involve an entire class, or several classes, of functions. This taxonomy is important because it indicates the technical tools that we can use for the quantitative analysis. For type one results, the quantitative attributes of interest have a concrete numerical formulation expressed as a function of the input length. For example, if a function is hard (in some sense), we can ask on how many inputs of length n it is hard. The quantitative analysis of type two results is not so straightforward. A generic formulation of many theorems in this category is that there exists a function / in some class C that has property Q (for example: "There is a function in EXP that is not polynomial-time computable," or, "There exists a computable function that is speedable"). The obvious quantitative question, "How many functions / in C have property Q," is usually not too meaningful. Indeed, for most classes C and properties Q, it holds that if a function / in C has property Q, then almost every finite variation of / is in C and has property Q as well, and, vii

vm therefore, the answer is trivially "An infinity." Fortunately, mathematicians have already developed tools and theories to handle this type of situations. The solution is to rephrase the question as "How large is the subset of function in C that have property Q," and to seek answers such as "small," or "large," or several nuances inbetween by using concepts from topology and measure theory. The theoretical foundations of this approach are presented in Chapter 1, Section 1.2. A result enhanced with relevant quantitative attributes is more informative and more convincing and, therefore, clearly has theoretical merit. Besides that, a quantitative result can have, especially for type one results, practical value as well. At some point, there has been a common perception that computational complexity is a theory of "bad news," because common results, such as showing that a problem is NP-complete, assert that real-world and innocent-looking tasks are not feasible (in general, if we assume some reasonable hypothesis). In fact, "bad news" is a relative term, and, indeed, in some situations, we want an adversary to not be able to perform a task, e.g., to not be able to break our cryptography protocol. However, a "bad news" result does not automatically become useful in such a scenario. For this to happen, its hardness features have to be quantitatively evaluated and shown to manifest extensively. Audience. My intention has been to write the book so that it appeals to a large audience. Experts in computational complexity may be interested in the special "quantitative" angle from which most results are presented. However, my primary target audience is elsewhere. In my intention, the book should benefit the most a reader who knows already the basic tenets of complexity, enjoys a rigorous mathematical treatment of a subject, wants to find out more about complexity than what is covered in a standard course, and, in particular, is interested in the novel major developments in complexity. The book is self-contained and can serve as a textbook for a course in advanced computational complexity. In general, the book should appeal to graduate computer science students and postdocs, and to researchers who have an interest in theory and need a good understanding of computational complexity, e.g., researchers in algorithms, AI, logic, and other disciplines. Topics. The intended audience has influenced the choice of topics. Most of them are relevant outside the immediate scope of computational complexity. Also, most of them go beyond the material that is covered in a standard first course in complexity theory. One chapter is dedicated to abstract complexity theory, an older field which, however, deserves attention because it lays out the foundations of complexity. The other chapters, on the other hand, focus on recent and important developments in complexity. The book presents in a fairly detailed manner concepts that have been at the center of the main research lines in complexity in the last decade or so, such as: average-complexity, quantum computation, hardness amplification, resource-bounded measure, the relation between one-way functions and pseudo-random generators, the relation between hard predicates and pseudorandom generators, extractors, derandomization of bounded-error probabilistic algorithms, probabilistically checkable proofs, non-approximability of optimization

IX

problems, and others. In some cases, it has not been possible, given the book's scope, to present the ultimate results regarding some of these concepts. However, I have included a presentation of the proof techniques that are required to obtain such results. Chapter 1 presents basic facts from the theory of computation, computational complexity, topology, and measure theory that are used throughout the book. Depending on the reader's familiarity with these matters, this chapter should be read first, or just browsed and used as a reference. The other chapters are independent and can be read in any order. Chapter 2 presents the most important results in abstract complexity theory. These are classical results, which are displayed here from a novel angle that emphasizes some important quantitative facets. Chapter 3 explores quantitative issues regarding the most important complexity classes, namely P, NP, E, and EXP. It includes a section on average-case complexity. Chapter 4 is dedicated to quantum computation. The discussion concentrates on the potential of quantum computation to vastly outperform classical computation. Chapter 5 focuses on some of the basic primitive objects that are used in cryptography: One-way functions, pseudo-random generators, and hard functions and predicates. The presentation emphasizes the quantitative attributes of these primitives, an aspect that is essential for their utilization in cryptography. Chapter 6 is dedicated to NP optimization problems. The chapter concentrates on the issue of whether individual problems from this category admit polynomialtime good approximation algorithms. I will maintain a website for this book (accessible from my web page at http://triton.towson.edu/~mzimand). It will contain a list of comments and updates for the topics presented in the book, and a list of errata. Please send me your comments and any error that you find in the book. Acknowledgments. I would like to thank Saul Lubkin who gave me the idea to write this book and encouraged me over the years to complete this undertaking. I am grateful to Richard Chang, William Gasarch, Sanjay Gupta, Omer Horvitz, and Jon Squire who read parts of the book and gave me useful suggestions. I thank Mirko Jane for his expert advice on typesetting issues and for the many hours he spent struggling with my poorly Latex-edited manuscript. Special thanks to my wife Iliana and my son Paul. This book would not exist without their patience, support, and love. Baltimore, February 18, 2004.

Marius Zimand

This page is intentionally left blank

Contents Preface

vii

Contents 1

xi

Preliminaries 1.1

1.2

Short 1.1.1 1.1.2 Short 1.2.1 1.2.2

1

guide to computability and computational complexity . . . . Computability Computational complexity guide to topology and measure theory Topology Measure theory

2

Abstract complexity theory 2.1 Chapter overview and basic definitions 2.2 Complexity classes 2.3 Speed-up 2.4 Gap and compression 2.5 Union theorem 2.6 Effective measure 2.7 Notes

3

P, NP, and E 3.1 Chapter overview and basic definitions 3.2 Upper bound for 3-SAT 3.3 NP vs. P—the topological view 3.4 P, NP, E—the measure-theoretical view 3.5 Strong relativized separation of P and NP 3.6 Average-case complexity 3.7 Notes xi

1 1 6 11 12 14 25 25 28 30 38 45 46 49 51 51 55 60 71 85 92 106

xii

CONTENTS

4 Quantum computation 4.1 Chapter overview and basic definitions 4.2 Quantum finite automata 4.3 Polynomial-time quantum algorithms 4.4 Notes

109 109 118 126 140

5 One-way functions, pseudo-random generators 5.1 Chapter overview and basic definitions 5.2 From weak to strong one-way functions 5.3 From one-way permutations to extenders 5.4 From extenders to pseudo-random generators 5.5 Pseudo-random functions 5.6 Hard functions 5.7 Hard predicates 5.8 From hard predicates to pseudo-random generators 5.9 BPP = P? 5.10 Extractors 5.11 Notes

143 143 157 161 171 175 179 197 200 209 211 222

6 Optimization problems 6.1 Chapter overview and basic definitions 6.2 Logical characterization of NP 6.3 Logic and NP optimization 6.4 Maximization problems 6.5 Minimization problems 6.6 Non-approximation properties 6.7 Non-approximability of MAX CLIQUE 6.8 Non-approximability of SET COVER 6.9 Probabilistically checkable proofs 6.10 Notes

225 225 230 239 252 257 266 282 289 296 313

A Tail bounds

317

Bibliography

321

Index

333

Chapter 1

Preliminaries 1.1

Short guide to computability and computational complexity

The purpose of this section is to fix some terminology and to briefly overview a few basic facts from computability theory and computational complexity theory that will be used in the book. Of course, this being a book on computational complexity, many other concepts will be introduced throughout the book.

1.1.1

Computability

Computability theory explores the capabilities and the limits of algorithms. Intuitively, an algorithm is a mechanical procedure given by a finite description. An algorithm's objective is to solve a computational problem. A computational problem consists of a (usually infinite) set of inputs and of associated tasks. For example, an input can be a positive integer and the associated task is to determine if the number is prime or not. An algorithm that solves a computational problem takes an arbitrary input and performs the associated task. One of the questions addressed by computability theory, perhaps the most basic one, is whether, for a given computational problem P, there exists or not an algorithm that solves it. According to the Church-Turing thesis, the informal notion of an algorithm is fully captured by the formal concept of a Turing machine. A Turing machine models a device (e.g., computer) that is able to perform mechanical computations. For this reason, a Turing machine is said to be a computational model. Many other computational models have been considered: Random-access machines, Markov algorithms, A-calculus, and others. They all turned out to have identical computational power. For instance, for any Turing machine M, there is a random-access machine R that simulates the computations performed by M, and vice-versa, for any random-access machine R, there is a Turing machine M that simulates the computations performed by R. 1

2

Chapter 1. Preliminaries

In this book, we adopt the Turing machine as the standard model of computation. Among other things, this implies that the term machine, unless specified otherwise, signifies a Turing machine. A Turing machine (TM), in its basic variant, is given by seven components denoted Q, F, S, 5, gstart, logn and s2(n) > logn, for all n. (a) //ti(n)logti(n) = o(t2(n)), then DTIME[ii] C DTIME[i2]. (b) Ifh(n + 1) = o(t2(n)), then NTIMEfc] C NTIME[£2]. (c) //si(n) = o(s2(n)), then DSPACE[Sl] C DSPACE[a2](d) Ifsi(n) = o(s2(n)), then NSPACE[si] C NSPACE[s2]. The following relations are known between deterministic and nondeterministic complexity classes. Theorem 1.1.4 (Deterministic classes vs. nondeterministic Classes, see [DKOO]) Let / 1 : N —> N be a fully space-constructible function, f\{n) > n, for all n £ N, and let f2: N —> N be a fully space-constructible function, f2(n) > logn, for all n £ N. Then, (a) NTIME[/i(n)] C (JC>ODTIME[2C^W]. (b) NSPACE[/2(n)] C (Jc>0DTIME[2c'2W]. (c) NTIME[/i(n)]CDSPACE[/i(n)]. (d) NSPACE[/2(n)] C DSPACE[(/2(n))2].

8

Chapter 1. Preliminaries

There are numerous complexity classes and some are defined by different mechanisms (in Chapter 6, for instance, we will see complexity classes defined by syntactically restricted formulas in some logical systems). However, it is universally accepted that the following classes are the most important. Definition 1.1.5

• L = DSPACE[logn] (deterministic space);

• NL = NSPACE[logn] (nondeterministic space); •

p

= Ufc>i DTIME[n'°] (polynomial time);

• NP = (Jfc>i NTIME[nfe] (nondeterministic polynomial time); • PSPACE = (Jfc>i DSPACEjn*] (polynomial space, equal to \Jk>1 NSPACE[n*];; • E = UC>ODTIME[2C"]; • NE = UC>ONTIME[2C"]; • EXP = |J fc>1 DTIME[2"fc] (exponential time); • NEXP = (Jfc>i NTIME[2n ] (nondeterministic exponential time); Nondeterministic computation can be viewed in a different way. We can assume without loss of generality that a nondeterministic Turing machine has exactly two choices at each non-final step (i.e., each non-halting configuration has exactly two ordered successor configurations). In this case, at each step, a guess takes the form of a bit b, such that b = 0 (6 = 1) means the machine will go in the first successor configuration (respectively, the second successor configuration). In fact, we can consider that the machine on input x makes all the guesses upfront in the form of a binary string y, written perhaps on a separate tape, after which the rest of the computation runs in a deterministic fashion. Via these observations, the following alternative definition of the class NP can be shown. Theorem 1.1.6 For any language A, A £ NP if and only if there is a predicate Q computable in polynomial time and a polynomial p such that, for any input x, x£A&3y£Z*

(|y| 1/2. (b) (BPP) A language A is in BPP if there is a constant e > 0 and a polynomialtime probabilistic Turing machine M such that x£ L 1/2 + e, x $ L o Proby (M{x, y) = l)< 1/2 - e. (c) (RP) A language A is in RP if there is a polynomial-time probabilistic Turing machine M such that i e L » Proby(M(x, y) = 1) > 1/2, x 1, be the i-th string in E* according to this ordering and pos(x) £ N — {0} be the rank of string x in this ordering (i.e., pos(a;) = i •£> x — s^). For x £ E*, \x\ denotes the length of x. The cardinality of a set A is denoted by \\A\\. For x £ E* U S°°, x(i) £ {0,1} is the z-th bit of x, and x(i : j) is the string x(i)x(i + 1).. .x(j) (defined for i and j at most |a;|, in case x £ S*). We identify a language A C S * with its characteristic sequence A(si)A(s2)... A(sn)..., where for each positive integer i, A(si) — 1 if Si £ A, and A(si) = 0 if s* £ A. By this codification, A£E°°. Therefore, classes of computable sets are subsets of S°° and, thus, X is taken to be E°°. In this book, we consider two bases Bc and Bs, generating the Cantor topology and, respectively, the superset topology. Both these bases are formed by sets indexed by finite binary strings. Thus, Bc = (U£)vex* and Bs = (U^)t,es* • For v £ E*, U£ (the basic open set defined by v in the Cantor topology) is defined by U% = {w £ E°° | Vi (1 < i < \v\ ^ («(») = w(i)))}. For v £ E*, U^ (the basic open set defined by v in the superset topology) is defined by U£ = {w £ E°° | Vi ((1 < i < \v\ and v(i) = 1) =» (v(i) = w(i) = 1))}. It is readily checked that for every Vi and v2 in E*, if U^ t~] U^2 ^ 0, then there exits i>3 in E* such that U^ D U^ = U^3, and that for every w in E°°, there exists v in S* such that w £ U!~. The same properties hold for the sets in Bs, which implies that Bc and Bs are indeed valid basis for £°°. Let Oc be the set of open sets generated by the base Bc, and Os be the set of open sets generated by the base Bs. The Baire Category Theorem holds for the topological spaces (X, Oc) and (X,OS). The Cantor topology is arguably the most natural topology on E°°. It can also be defined as the infinite product of the discrete topology on S. The Cantor topology corresponds to extensions of finite initial binary segments (i.e., predicates with domain of the form {0,1,... ,n} for some n), an operation which is extensively used in computable function theory and in computational complexity theory. Indeed, U^ can be regarded as the class of predicates that extend the finite initial predicate encoded by v. The superset topology is the "next natural" topology on E°°. It corresponds to extension of finite sets, an operation which is also widely used. Indeed, U^ can be regarded as the class of sets that are supersets of the finite set encoded by v. A construction, similar to the one leading to the Cantor topology on the space of binary languages, can be carried out for the class of computable functions. The

14

Chapter 1. Preliminaries

only difference is that the binary alphabet E is replaced by the infinite alphabet N, the set of natural numbers. Such a topology is considered in Chapter 2. Often the topology that is considered will be stated upfront, and in this case the superscripts C and S will be omitted. Unfortunately, the classical setting is not good enough for our purposes. It can be seen that any countable class of subsets of E°° is meagre relative to the Cantor topology. The same holds relative to the superset topology for any countable class that does not contain infinite binary strings in which almost every bit is 1. Indeed, to consider just the case of the Cantor topology, if Y = (li)igN is a countable class of subsets of E°°, then Y = UieN^} anc^e a c n class {Yj} is nowhere dense, because for each [/£ € Bc one can easily find lf£ € Bc such that [/£ C U^ and U^ n Yi = 0. The string v \v^\, U2C7) 7^ Yi(sj). Of course, this is not surprising. By viewing Y as a set of real points in the interval [0,1] (obtained by associating to each Yi £ E°°, the real number 0.1^(1)1^(2)..., written here in base 2), we see that Y, being a countable set, is "full of holes." As we deal with algorithmic objects, it is natural to overcome this difficulty by considering an effective or even resource-bounded version of Definition 1.2.1. Namely, returning to the previous example, we demand that, given v\, V2 should be found in a computable way or even by an algorithm acting within predetermined resource bounds. In other words, a set A is nowhere dense in the effective sense, if the holes can be effectively constructed. Thus, in the effective analogues of Definition 1.2.1, part (1) that we will use in the forthcoming chapters, we require the existence of computable or resource-bounded witness functions that compute U 0, there exist a closed set F and an open set G (in the standard topology on the real line) such that F C C C G and n*{G — F) < e. It can be shown that a set C is Lebesgue measurable if H*(B) = n*(BnC)+fi*(BnC),

for all BC [0,1],

where C = [0,1] — C. Also, the class of Lebesgue measurable sets is closed under the operations of countable union and difference of sets, and that the empty set is a Lebesgue measurable set. Definition 1.2.2 (a-field) A collection of sets that contains the empty set and is closed under countable union and difference of sets is called a a-field. Thus the Lebesgue measurable sets form a a-field. Definition 1.2.3 (Lebesgue measure) The restriction of /z* on the a-field of Lebesgue measurable sets in [0,1] is denoted by (i and is called the Lebesgue measure on the interval [0,1]. The function fi is real-valued, non-negative, countably additive (i.e., if (Cj)jeN is a sequence of Lebesgue measurable pairwise disjoint sets, then /^(IJieN ^«) = SigN / i (^'i)) a n d M(0) = 0 (these are the properties of a measure in the general setting). For any class of subsets of a set X of real numbers, there is a smallest a-field of subsets of X that contains it. This is called the a-field generated by the class. The members of the cr-field generated by the class of intervals included in X are called the Borel sets of X. It turns out that we can restrict the class of measuring sticks even more and consider only intervals of the form [O.Z1X2 • • • xn,0.xiX2 • • • x n l l . . . ] . We denote this interval by Bx, where x = x^x-i • • • xn £ E*. Note that the length of Bx is 2"lxl and that the sets Bx are just the basic open sets in the Cantor topology. The key point is that the a-field generated by the collection of sets (#z)zes* coincides with the Borel sets of [0,1] (taking into account the association between subsets of S* and real numbers in [0,1]). It can be shown that

16

Chapter 1. Preliminaries

every Borel set is Lebesgue measurable, which is good news, because most classes of interest in computational complexity correspond (via the association described above) to Borel sets of [0,1]. Intuitively, most classes that play a role in computer science are obtained as a result of at most a countable number of steps that have a finite description and usually it holds that the result of such a step is a set of the form Bx. The Kolmogorov's 0-1 Law applies frequently to classes of interest in computational complexity. In this context, it states that a set of infinite binary strings that is Lebesgue measurable and is closed under finite variants has either Lebesgue measure zero or Lebesgue measure one. 6 Therefore, most classes of sets that appear in computational complexity are Lebesgue measurable, and, moreover, almost every such class has Lebesgue measure either zero or one. The concepts of measure and measurable sets can be defined in an abstract setting by imitating the construction of the Lebesgue measure in [0,1]. In lieu of the real interval [0,1], we start with an arbitrary set A. In the role of intervals (a, b) C [0,1], we use a class of subsets of ^4, called cylinders, and we require that cylinders have the following two structural properties: (i) If Ga and GT are two cylinders, then GCT C\ GT is also a cylinder, (ii) If Ga and GT are two cylinders, then there is a finite set of pairwise disjoint cylinders G1,...,Gp such that G 2~fc is an arbitrarily small value). The procedure runs in stages. We start with 2~k dollars invested in the whole interval [0,1] and 0 dollars on all others subintervals of [0,1]. Thus initially, invest([0,1]) = 2~k and invest(J) = 0, for all other subintervals /. We can imagine playing a game as follows: At each stage, the investment on each interval I doubles its value and this new amount is reinvested on It and IT, the left half and the right half intervals of /, the amount invested on each of these half intervals being decided by a computable or resource-bounded betting strategy. The goal is to concentrate the investition on the intervals that give a sufficiently precise cover of A. The procedure continues for a number of stages decided by us. Summarizing, at each stage the intervals on which we invest have half the length of their father and the available amount of money doubles. By induction on the stage number, it follows that

at each stage. Let us say that / is a winning interval if the final amount invested in / is greater or equal than 1 dollar. We win the game if A is covered by winning intervals. If we win the game, then we effectively found a covering of A of total length < 2~h, because it follows that

To show that a set A has measure zero, we would like to win the game for all k > 0, so that we find coverings of arbitrarily small total length. Equivalenly, by scaling, we can assume that we play a sequence of games, gamei,game2, • • • ,gamen,..., and in each game we start with the same amount, say 1 dollar. In gamen, a winning interval is an interval on which, at the end of the game, we have invested n dollars. If, in all the games, we manage to cover A by winning intervals, then we can infer that A has measure 0 (this argument is made rigorous in Lemma 1.2.9). The intervals are given by the basic sets Bx. Thus, [0,1] = B\, [0,1/2] = BQ, [1/2,1] = B\, and so on. Let d(x) be the amount invested on Bx. The rule of the game can be written as d(xO) + d(xl) = 2d(x), for each x 6 £*. Such a function is called a martingale. The above ideas are formalized in the following definition.

1.2. Short guide to topology and measure theory

19

Definition 1.2.6 (Martingale) (i) A martingale is a function d: S* —» [0, oo) satisfying

for all strings in £*. (ii) The global value of the martingale d is d(\), where A is the empty word. (iii) The set covered by a martingale d is

S[d] =

\J

Bw.

wes' ,i (iv) A martingale d covers a set X C S°° if X C S[d]. (v) For each n £ N, the set n-covered by a martingale d is

Sn[d] =

(J

Bw.

u/GS* ,d(w)>n

(vi) A martingale d n-covers a set X C E 0 0 if X C 5 n [d]. (vii) J4 martingale d succeeds on a set X C T,°° if, for all n £ N, X C iSn[d].

Let us play this betting game on a few classes of sets. Example 1.2.7 Consider a class C1 containing a single set A and let k £ N. We start with 2~k dollars, i.e., d(\) = 2~k. We bet

and

Let w = A(si)A(s2) • • • A(sk)- Observe that d(w) = 1 and, since A e Bw, it follows that d covers the set C\. It is easy to see that in fact d succeeds on C\. | Example 1.2.8 A set A is sparse if there is a polynomial p such that ||j4- n || < p(n), for all n £ N. Consider Ci the class of sparse sets and let us build a martingale that covers C2. Let k € N. We start with d(X) = 2~k and, recursively, we define d(xO) = (3/2) -d(x), and d(xl) = (1/2) -d(x). Let us look at the value of d(A-n), when A is a sparse set. For all the strings of length at most n that are not in A (let out(n) be the number of such strings), we have increased the investment by a factor of 3/2. For all the strings of length at most n that are

20

Chapter 1. Preliminaries

in A (let in(n) be the number of such strings), we have decreased the investment by a factor of 1/2. Thus

where p is the polynomial that bounds from above ||J4-™|| • Clearly, for n sufficiently large, d(A-n) > 1. Thus, A e S[d], and, consequently, C2 C S[d]. It is easy to see that, in fact, d succeeds on CiI As discussed, martingales can be used as an alternative way to define the measure of a set C C E°°. Lemma 1.2.9 Let C CS°° (equivalently, C C [0,1]) and a € K. (i) C has an a-cover if there is a martingale d with global value d(X) < a such thatCCS[d). (ii) // there is a martingale d with global value d(X) < a such that C C iSn[d], then C has an a/n-cover. Proof, (i) Let {BXn \ n > 0} be an a-cover of A. Define dXn : S* -> [0,1] by , , , _ J2l»l-I x "l, 2, • • •, Wk} are the descendants of a common node WQ £ Cd- Then it is easy to see that

So, if in the sum in the left hand side of (1.1) we replace all the terms of nodes that have a common ancestor u>o in Cd by the term d(wo)2~\w°\ corresponding to that ancestor, then the sum in the left hand side of (1.1) does not change. Furthermore, if we delete from the modified sum all the terms contributed by the nodes that have no descendant in Cd, we can only decrease the sum in the left hand side of (1.1), which therefore becomes at most d(\). Since 7 is the limit of these modified sums, it follows that 7 < d(\). | Corollary 1.2.10 A set C has measure 0 if and only if there is a martingale d that succeeds on C. This corollary is the basis for the definition of effective and resource-bounded measure. In these cases, we only add the requirement that the martingale is computable or that it belongs to a certain complexity class. We only define what it means for a set to have measure zero or measure one, because, as we have already mentioned, the classes of interest in computational complexity, if they are measurable at all, only have classical Lebesgue measure zero or one (these classes are closed under finite variations and thus they are subject to the Kolmogorov 0-1 law). Definition 1.2.11 Let T be a class of functions. (i) A class C C E°° has T-measure zero if there is a martingale d in T that succeeds on C. (ii) A class C C E°° has T-measure one if the complement of C has F measure zero. (iii) A class C C £°° has T-measure zero in a class D C E°° if C n D has T measure zero. (iv) A class C C E°° has T-measure one in a class D C E°° if the complement of C has T measure zero in D. In our investigations, we will consider F to be a class of effectively computable functions such as the class of computable functions, or the class of functions computable in polynomial time. In the standard definitions, these types of functions

22

Chapter 1. Preliminaries

take values in the set of natural numbers, or in the set of strings over some alphabet. In our context, we want them to be martingales which in general are defined to take values that are nonnegative real numbers. We will assume that effective martingales take values in the set of nonnegative dyadic rational numbers, i.e., in the set D = {m2~n \ m,n £ N}. Thus, the values taken by these martingales have a finite representation and, therefore, we can talk about effectively computable martingales. It is important to note that, depending on F, a class C containing a single set A may not have F-measure zero (the reader can look at Example 1.2.7 to see why this is so). The second basic property of measure zero sets still holds: If C C D and D has F-measure zero, then C has F-measure zero. The third basic property of measure zero sets (if C = (J n > 0 Cn and all Cn have measure zero, then C has measure zero) in general fails. The reason is that in order to build the martingale that succeeds on C, we need a universal function able to simulate all the martingales dn that succeed on C n , and such a universal function may not be in F. However, this difficulty can be overcome if F has a few nice closure properties and if there is a certain uniformity among the martingales which show that the classes in the union have F-measure zero. Thus, we need several definitions. A function d: N x S* —> [0,1] is a martingale system if, for each t £ N, the function di: E* —> [0,1], defined by di(x) = d(i, x) is a martingale. A class C is a T-uniform union of T-measure zero sets if there is a countable family (Cn)nepj and d a martingale system such that (a) d £ F, (b) C = [JneN Cn, and (c), for all n £ N, dn succeeds on Cn. We say that a class of functions F is closed under bounded sum if, for any martingale system d, with d £ F, the function d': E* —> [0,1], defined by

d'(x) = £ Ux) i dn{x). It follows that d succeeds on Cn. This holds for every n, and, therefore, we conclude that d succeds on C. | Example 1.2.13 Let C be the class of sets A such that for almost every n G N, 0™ € A. We show that C has F-measure zero, where F is the class of computable functions. It is clear that this class of functions is closed under bounded sum and finite variation. Let Ci = { A | f o r a U n > i , 0 " € ^ } . We define a martingale di by (i) di(X) — a (a is an arbitrary strictly positive real value), (ii) di(x) = di(pred(x)), if s\x\ ^ 0 n , and Sjx| ^ 0 n ~ a l,n > i, and (iii) di(x) = 2-di(pred(a;)), if s^ =0n,n>i and d{(x) = 0 if sM = 0 n " 1 l , n > i. Since 0 n = S2", for all n, it follows that

for all n > i. Therefore di succeeds on Cj. Thus, the function d(i, x) = di(x) verifies the conditions in Proposition 1.2.12. |

This page is intentionally left blank

Chapter 2

Abstract complexity theory 2.1

Chapter overview and basic definitions

Abstract complexity theory studies fundamental quantitative aspects of computing. The theory reveals complexity related properties that are machineindependent in the sense that they are valid regardless of the particularities of a specific computational model. For instance, abstract complexity theory addresses fundamental questions such as: (1) Is there an absolute upper bound for the complexity of all (or of most) computable function? (2) Is there a best way (resource-wise) to calculate a computable function? (3) If we spend more computational resources, can we compute more functions? At the center of the theory lies the concept of an abstract complexity measure. This notion models almost any realistic computational resource that one may be interested in, in particular the running time and the amount of memory used in a computation. One could envision other computational resources as well such as the consumed energy, the number of accesses to registers and memory, etc. In this chapter, we take an abstract approach. We first consider (po, j attached to j,4>j)jeN satisfies the following two axioms, called the Blum axioms: (BA 1) For each i € N, &i(x) is defined if and only if (fi(x) is defined, or, in more formal notation,

26

Chapter 2. Abstract complexity theory (BA 2) The following predicate of three arguments

is computable. Definition 2.1.1 (Blum space) A Blum space $ is a sequence of pairs of functions {(fi,^i))ieN, such that (a) (i)ieN satisfies the two Blum axioms. To understand the justification of the two axioms, we recommend the reader to mentally check that the natural computational resources listed above satisfy the two Blum axioms.1 Consequently, the theory of abstract complexity measures (more concisely known as abstract complexity theory or Blum complexity theory) applies to them and, in fact, to virtually every natural resource in any conceivable realistic model of computation. It is remarkable that the two simple Blum axioms lead to deep results of extreme generality. In this chapter, we will present the most important results of abstract complexity theory, including answers to the questions (1), (2), and (3). In the spirit of this book, we will not content ourselves with just showing the existence of functions having interesting properties (such as, for example, functions for which the answer to question (2) is negative). We will also analyze such results quantitatively by looking at the size of classes of such functions from a topological or measure-theoretical point of view. The topological analysis follows the ideas presented in Section 1.2.1. We use the Cantor topology. In our context, it is convenient to view the finite strings over the alphabet N (or {0,1}) that define the base of the Cantor topology in the space of p.c. functions (or, respectively, p.c. predicates) as being functions whose domain is an initial segment of N. In the rest of our discussion we consider the case of p.c. functions, and just note that the p.c. predicates can be treated similarly. For f,g£ PC, we write / C. g in case dom(/) C dom(5) and f(x) = g(x), for every x in dom(/). For every t € FPC, let

ut = {/ e PC 11 c / } . The family (£/t)teFPC is a system of basic neighborhoods in PC defining the Cantor topology in the set of p.c. functions; we work with the topology generated by this 1

Sometimes, we may need to do inconsequential modifications in the standard definition of a complexity measure. For instance, to conform to axiom (BA 1), we can assume that the space used in a non-halting computation is infinite.

2.1. Chapter overview and basic definitions

27

system. In the classical framework (see the discussion in Section 1.2.1; for notation, see Section 1.1.1), a set A in a topological space is nowhere dense (or rare) if for every non-empty open set O there exists a non-empty open subset O ' C O such that O' PI A = 0. A set is of first Baire category (or meagre) if it is a finite or denumerable union of nowhere dense sets, and it is of the second Baire category if it is not meagre. In the effective variant of these notions, the open set O' is obtained effectively from O. Formally, there exists a computable function / that for almost every basic open set Ut produces a witness f(t) which indicates a basic open set £//( j implies

x n uaf(n) = 0. (2) A set X of p.c. functions is effectively of first Baire category (or effectively meagre) if there exist a sequence of sets (XJ)J £ N and a computable function f such that (i) X = [)ieN

Xu

and, for all i € N, (ii) an C a/«i,n», for all n € N, (iii)

there exists j € N such that, for alln € N, \an\ > j implies

(3) A set X of p.c. functions is a set effectively of second Baire category if X is not a set of effectively first Baire category. In the rest of this chapter, we only consider the above effective version of Baire classification. For conciseness, we usually drop the word effectively in the above terminology. The subsets of the set of p.c. functions can be classified with respect to the following hierarchy of sets of increasing size: nowhere dense, first Baire category (or meagre), second Baire category, co-meagre, and co-nowhere dense sets (see Definition 1.2.1). Intuitively, from a topological point of view, a nowhere dense set is tiny, a first Baire category set is small, a second Baire category set is not small, and co-meagre and co-nowhere dense sets are large.

28

Chapter 2. Abstract complexity theory

One can easily observe that the extensions C in the above definition can be taken to be proper (c), and this will be the case in all our further considerations. As mentioned, a topology over the set of p.c. predicates can be introduced similarly. The above definition can be stated in terms of the relativized topology of p.c. predicates (i.e., {0,1}-valued functions), by simply considering that (an)neN enumerates FPRED, the set of all p.c. predicates having the domain equal to a finite initial segment of N, (i.e., each an can be considered to be a binary string). In this case, the topology is generated by the basic open sets (£/t)teFPREDi where Ut = {/ I t Q / , / is a p.c. predicate}. This abuse of notation (i.e., we use the same notation for the basic open sets of both PC and PRED) will always be clarified by context.

2.2

Complexity classes

IN BRIEF: Any complexity class is topologically small. The central concept in computational complexity is that of a complexity class. Definition 2.2.1 (Complexity class) Let $ = ((

\ 0,

if

®'(x}< 9^ for

aiix>

i

otherwise.

One can easily check that C* = Ui I G N ^ W ) ' an

• for x — |a n |, a

,, (msx(l - (pi(x),0), if$i(x)

Our partners will collect data and use cookies for ad personalization and measurement. Learn how we and our ad partner Google, collect and use data. Agree & close