cs-lora-training-data / structured /0707.1364.structured.json
Shivatandav64's picture
Upload folder using huggingface_hub
a3b809c verified
{"paper_meta":{"paper_id":"arxiv:0707.1364","title":"0707.1364","authors":[],"year":null,"published":null,"updated":null,"venue_or_source":"arxiv-papers-shard","primary_category":"cs","secondary_categories":[],"doi":null,"license":"unknown","source_type":"pdf+shard","source_url":null,"pdf_url":null},"abstract":{"raw":"","cleaned":"","offsets":[]},"full_paper_text":{"raw_ordered_text":"arXiv:0707.1364v1 [cs.CC] 10 Jul 2007\nReport on Generic Case Complexity\nRobert Gilman\nAlexei G. Miasnikov\nAlexey D. Myasnikov\nAlexander Ushakov\nMarch 20, 2007\nAbstract\nThis article is a short introduction to generic case complexity, which\nis a recently developed way of measuring the difficulty of a computa-\ntional problem while ignoring atypical behavior on a small set of in-\nputs. Generic case complexity applies to both recursively solvable and\nrecursively unsolvable problems.\nContents\n1\nIntroduction\n2\n2\nComputational problems\n3\n2.1\nDecision problems and search problems\n. . . . . . . . . . . .\n3\n2.2\nSize functions and stratifications\n. . . . . . . . . . . . . . . .\n3\n2.3\nWorst case complexity . . . . . . . . . . . . . . . . . . . . . .\n4\n3\nGeneric case complexity\n6\n3.1\nAsymptotic density . . . . . . . . . . . . . . . . . . . . . . . .\n6\n3.2\nConvergence rates\n. . . . . . . . . . . . . . . . . . . . . . . .\n6\n3.3\nGeneric case complexity of algorithms and problems\n. . . . .\n7\n4\nComplexity of unsolvable and NP-complete problems\n8\n4.1\nThe halting problem . . . . . . . . . . . . . . . . . . . . . . .\n8\n4.2\nThe Post Correspondence Problem . . . . . . . . . . . . . . .\n10\n4.3\n3-Satisfiability . . . . . . . . . . . . . . . . . . . . . . . . . . .\n10\n5\nDifficult instances\n11\n1\n\n6\nDistributional computational problems\n12\n6.1\nAverage case complexity . . . . . . . . . . . . . . . . . . . . .\n13\n6.2\nAverage Case vs Generic Case . . . . . . . . . . . . . . . . . .\n14\n1\nIntroduction\nGeneric case complexity was introduced a few years ago [15] as a way of\nestimating the difficulty of recursively unsolvable problems in combinato-\nrial group theory. More recently generic complexity and related ideas have\nproved useful in cryptanalysis of public key systems[20].\nCombinatorial group theory has its own computational tradition extend-\ning back for more than a century. Almost all computational problems in\ncombinatorial group theory are recursively unsolvable. During the 1990’s\npeople working under the leadership of Gilbert Baumslag on the Magnus\nComputational Group Theory Package [19] noticed that for some difficult\nproblems, simple strategies worked well in practice.\nComputer scientists\nhad come to similar conclusions earlier in regard to NP-complete problems.\nThe group theoretic version of this theme is developed in [15]. The authors\ndefine a generic set of inputs and show that for a large class of finitely gener-\nated groups the word, conjugacy and membership problems can be solved in\nlinear time on a generic set even though these problems might be recursively\nunsolvable for the group in question.\nThe main point here is that it can be convenient and practical to work\nwith a complexity measure which focuses on generic sets of inputs to al-\ngorithms and ignores sparse sets of atypical inputs. Generic complexity is\nclose in spirit to the analyses by Smale [21] and Vershik and Sporyshev [23]\nof the simplex algorithm, and to errorless heuristic case complexity [2]. It\nis also close to average case complexity. Generic complexity is simpler and\nbroader in scope than average case complexity.\nIn addition it is a more\ndirect measure of the performance of an algorithm on most inputs. These\npoints are discussed in Section 6.2.\nThis article is an informal introduction to generic case complexity. It\nis not a complete survey of current developments.\nWe restrict ourselves\nto polynomial time complexity, and we omit probabilistic algorithms. We\nalso do not discuss generic case completeness or the emerging theory of\nproblems undecidable on generic sets. These topics will be included in a\nmore comprehensive treatment to appear later.\n2\n\n2\nComputational problems\n2.1\nDecision problems and search problems\nThe usual approach to the study of computational problems is to begin with\nTuring machines and membership problems for formal languages. Member-\nship problems are particular cases of decision problems, that is, computa-\ntional problems whose answer is “yes” or “no”. Every decision problem can\nbe turned into a membership problem, but this transformation may add\ncomplications and even change the nature of the problem. For example rep-\nresenting graphs by words over an alphabet is possible but inconvenient and\nsometimes misleading [1]. Thus we are led to a more general view.\nDefinition 2.1. A decision problem is a pair P = (L, I), where I is a\ncountable set of inputs for P and L ⊂I is the positive part of P. That is,\nthe answer for input w ∈I is “yes” if w ∈L and “no” otherwise.\nDefinition 2.2. A search problem is a pair P = (R, I × J), where I and J\nare countable sets, and R ⊂I × J is a binary predicate. Given an element\nw ∈I, one is required to find v ∈J such that (w, v) ∈R; that is, such that\nR(w, v) is true.\nFor example take J to be the integers, I be the set of polynomials with\ncoefficients in J, and R the set of pairs (w, v) such that v is a root of w.\nGiven a polynomial, w, one is required to find an integer root, v, of w.\nIn the preceding example the desired v may not exist. In other search\nproblems one may know in advance that v’s always exist and that the only\ntask is to find one.\nWhen we speak of a problem P, we mean either a decision problem or a\nsearch problem.\n2.2\nSize functions and stratifications\nDecision and search problems are solved by algorithms and partial algo-\nrithms. In general to study the complexity of an algorithm A, one compares\nthe resources spent by A on input w to the size of w. In our case the re-\nsource is time, or more precisely, the number of steps required for A to deal\nwith w. We are being informal here. The usual formal definition is stated\nin terms of the number of steps required by a deterministic Turing machine\nwhich implements A.\nDefinition 2.3. The time consumed by an algorithm A on an input w is\nTA(w), the number of steps performed by an algorithm A on the input w.\n3\n\nIf A is a partial algorithm, then TA is a partial function. Its domain is set\non inputs on which A halts.\nDefinition 2.4. A size function for a set I is a map σ : I →N, the nonneg-\native integers, such that the preimage of each integer is finite.\nDefinition 2.5. A stratification for a set I is an ascending sequence of finite\nsubsets whose union is I.\nFor each size function σ determines a stratification with subsets σ−1({0}),\nσ−1({0, 1}), . . ., and every stratification can be obtained from a size func-\ntion. The finiteness condition in Definitions 2.4 and 2.5 will be relaxed later\nwhen we discuss computational problems with a probability distribution on\nthe set of inputs.\nThe choice of the size function depends of course on the problem at hand.\nIf the input w is a natural number, its size may be taken to be the number\nof symbols in its representation of to a certain base. For any two integer\nbases greater than 1 the corresponding sizes are about the same; they differ\nby at most a fixed multiplicative factor. However if w is written down in\nunary notation, that is, as a sequence of w 1’s, its size will be exponentially\ngreater than its size with respect to the bases greater than 1.\nConsider another example. An input for the satisfiability problem, SAT,\nis a boolean expression in conjunctive normal form. There is a standard\nway to write such an expression as a word over a finite alphabet. A natural\nchoice for input size is the length of that word. But if we are taking the\ntrouble to find difficult instances of SAT, it might be reasonable to take\nthe time needed to generate the word as its size instead. It is also worth\nnoting that converting an arbitrary formula to CNF may increase its length\nexponentially.\nIt is easy to obtain surprising complexity bounds by choosing artificial\nsize functions. We do not pursue further here the question of defining pre-\ncisely what is a reasonable size function; nevertheless we trust the reader\nwill agree that the size functions which appear below are reasonable.\n2.3\nWorst case complexity\nDefinition 2.6. Let A be an algorithm, TA its time function, I the set\nof inputs, and σ a size function for I.\nThe worst case complexity of A\nwith respect to σ is the function WCA : N →N defined by WCA(n) =\nmaxσ(w)≤n TA(w).\n4\n\nWe are usually not interested in the precise worst case complexity but\nrather in estimating its rate of growth. We say that a problem P has poly-\nnomial worst case complexity if it is solved by an algorithm A for which\nWCA(n) is O(nk) for some k. To define exponential worst case complexity,\nwe replace the condition O(nk) for some k by O(2nε) for some ε > 0. We\nwrite P ∈P and P ∈E respectively.\nWorst case complexity was the first and is still the most commonly used\ncomplexity measure. When an algorithm has low worst case complexity, say\nCw\nA(n) is O(n2), we can be pretty sure that it is practical. But the converse\nis not true because the worst cases, which determine WCA, may be rare.\nThis phenomenon has been well known since the 1970’s.\nThe simplex algorithm for linear programming is frequently used as an\nexample of an algorithm for which hard inputs are rare.\nThe algorithm\nis used hundreds of times daily and almost always works quickly. But it\nhas been shown by V. Klee and G. Minty [14] that there are hard inputs.\nMore precisely, the simplex algorithm is in E −P. Khachiyan devised an\ningenious polynomial time algorithm for linear programming problems [13],\nbut the simplex algorithm continues to be widely used because the hard\ninputs never occur in practice. Vershik and Sporyshev [23] and Smale [21]\nshowed independently that the simplex algorithm runs in linear time on a\nset of inputs of measure one.\nSometimes we want a problem to be difficult.\nThis is the case when\nwe are looking for a computational problem on which to base a public key\ncryptosystem. Solving an instance of the problem is equivalent to breaking\nthe cryptosystem for a particular key choice, so we want the computational\nproblem to be hard almost all the time (of course it should be easy if you are\nin possession of certain secret information, otherwise it would be impossible\nto decode messages). In this situation the worst case behavior of algorithms\nis irrelevant.\nWorst case complexity is not defined for partial algorithms, because they\ndo not always halt. Nevertheless it can be the case that the nonhalting in-\nstances are rare for a partial algorithm just as hard instances can be rare for\nan algorithm. Coset enumeration (probably the first mathematical proce-\ndure to be programmed on a computer) is an example of a partial algorithm\nwhich is useful in practice for solving instances of a recursively unsolvable\nproblem, namely whether or not a given finite presentation present a finite\ngroup.\nIn the next section we propose a new complexity measure, generic case\ncomplexity, which applies to partial algorithms as well as to algorithms.\nSubsequently we will discuss the extent to which generic case complexity\n5\n\novercomes the deficiencies of worst case complexity and the relation between\ngeneric case and average case complexity.\n3\nGeneric case complexity\nGeneric case complexity is an attempt to deal with the fact that worst case\ncomplexity can be unsatisfactory when the difficult inputs to an algorithm\nare sparse and not observable in practice. The main idea is to ignore small\nsets of difficult inputs and consider the worst case complexity on the re-\nmaining large set of more tractable inputs. By large we mean generic as\ndefined below.\nThe treatment here will be generalized when we discuss\ndistributional problems in Section 6\n3.1\nAsymptotic density\nDefinition 3.1. Let I be a set of inputs with size function σ. Define Bn, the\nball of radius n, by Bn = {w | w ∈I, σ(w) ≤n}. A subset R ⊂I is said to\nhave asymptotic density α, written ρ(R) = α, if limn→∞|R ∩Bn|/|Bn| = α\nwhere |X| denotes the size of a set X. If R has asymptotic density 1, it is\ncalled generic; and if it has asymptotic density 0, it is negligible.\nRecall from Definition 2.4 that σ−1(n) is always finite. Some authors\nuse lim sup rather than lim in Definition 3.1.\nAsymptotic density can be defined using spheres in place of balls. The\nsphere of radius n is In = {w | w ∈I, σ(w) = n}, that is, the set of inputs\nof size n. We say spherical density and volume density to distinguish the\ntwo definitions, and we write ρ◦for spherical density.\nLemma 3.2. Keep the notation of Definition 3.1. If almost all spheres are\nnonempty and ρ◦(K) exists, then so does ρ(K), and the two are equal.\nProof. Set xn = |K ∩Bn| and yn = |Bn|. Then yn < yn+1 for almost all n,\nand lim yn = ∞. By Stolz’s theorem\nρ(K) = lim\nn→∞\nxn\nyn\n= lim\nn→∞\nxn −xn−1\nyn −yn−1\n= lim\nn→∞\n|K ∩Sn|\n|Sn|\n= ρ◦(K).\n3.2\nConvergence rates\nA generic subset of inputs is asymptotically large. Whether it appears large\nin practice depends on how fast the limit in Definition 3.1 converges.\n6\n\nDefinition 3.3. Let R be a subset of I, and suppose that the asymptotic\ndensity ρ(R) exists. The function δR(n) = |R ∩Bn|/|Bn| is called the fre-\nquency function for R.\nDefinition 3.4. Suppose R ⊆I and δR is the density function of R. We\nsay that R has asymptotic density ρ(R) with superpolynomial convergence\nif |ρ(R) −δR(n)| is o(n−k) for every natural number k. For short we call a\ngeneric set with superpolynomial convergence strongly generic. Its comple-\nment is strongly negligible.\nOf course one can introduce exponential convergence, superexponential\nconvergence, etc. In the original papers [15, 16] strong genericity was re-\nserved for generic sets with exponential convergence,but seems that super-\npolynomial convergence is fast enough to obtain the same results.\n3.3\nGeneric case complexity of algorithms and problems\nIn this section we come to the main notion of the paper.\nDefinition 3.5. Let P be a problem. A partial algorithm, A, for P gener-\nically solves P if the halting set, HA, of A is a generic subset of the set of\ninputs, I. In this case we say that P is generically solvable.\nIn particular any algorithm for P generically solves P. We will see that\na generically solvable problem may be recursively unsolvable.\nDefinition 3.6. Let P be a problem with size function σ, and let A a partial\nalgorithm for P. A function f : N →N is a generic upper bound for A if\nthe set HA,f = {w ∈I | w ∈HA and TA(w) ≤f(σ(w))} is generic in I. If\nHA,f is strongly generic, then f is a strongly generic upper bound.\nNow we are ready to define generic complexity classes of algorithmic\nproblems.\nDefinition 3.7. A problem P is generically solvable in polynomial time if\nthere exists a partial algorithm for P with a polynomial generic upper bound.\nIf there exists a partial algorithm with a polynomial strongly generic upper\nbound, then P is strongly generically solvable in polynomial time.\nFor short we refer to problems in two classes defined above as generically\npolynomial and strongly generically polynomial respectively. We denote the\ntwo classes by GenP and SGP.\nIt is clear that one can extend Definition 3.7 to other time bounds.\n7\n\n4\nComplexity of unsolvable and NP-complete prob-\nlems\nAnalysis of some unsolvable and NP-complete decision problems yields in\neach case an easy partial algorithm with a generic halting set. We present a\nfew of these results here. A more thorough treatment with complete proofs\nwill appear later.\n4.1\nThe halting problem\nTheorem 4.1 ([10]). The halting problem for deterministic Turing ma-\nchines with semi-infinite tape and tape alphabet {a0, a1} is generically solv-\nable in polynomial time; that is, it is in GenP.\nWe do not know whether similar results hold for Turing machines with\nbi-infinite tapes.\nThe halting problem is the premier recursively unsolvable problem. For\nTuring machines with semi-infinite tape extending to the right it is required\nto decide whether or not a given Turing machine halts when started at the\nleftmost square of a tape filled with a0’s. The set of inputs, I, is the set\nof Turing machines of the given type.\nRecall that a Turing machine M\nsatisfying the conditions of Theorem 4.1 may be thought of as a map\np : {1, 2, . . . , n} × {a0, a1} →{0, 1, 2, . . . , n} × {a0, a1} × {L, R}\n(1)\nwhere 1 is the initial state of M, 0 is the halting state, and {2, . . . , n} are the\nother states. The meaning of p(i, ar) = (j, as, L) is that if M is in state i and\nscanning a square containing ar, then its next move is to overwrite ar with\nas, move left on the tape, and go to state j. Likewise p(i, ar) = (j, as, R)\nhas the same effect except that M moves right instead of left. If M reaches\nstate 0, there are no further moves to make, and M halts. As the tape for\nM extends infinitely far to the right but not to the left, M may attempt to\nmove offthe tape to the left. In this case the move is not completed, and\nM crashes.\nThe map p may be thought of as a program. The states are the numbers\nof the instructions, and the instruction, except for instruction number 0,\ntells what to do depending on which letter of the tape alphabet is currently\nbeing scanned. Instruction 0 halts the machine.\nWe take the inputs, I, to be the set of programs p defined above, and\nthe size of p is defined to be the the number of non-halting states (of which\nthere must be at least one); In is the set of programs with n non-halting\n8\n\nstates. Here is a polynomial time partial algorithm which decides the halting\nproblem.\nAlgorithm 4.2. Input a program p\nRun p until the first time it repeats a state\nIf p halts, say “Yes”\nIf p crashes, say ”No“\nElse loop forever.\nIt would be more informative to say ”Don’t know“ than to loop forever,\nbut accommodating this possibility would slightly complicate the definitions\nin Section 3.3. We have opted for simplicity.\nAlgorithm 4.2 is obviously polynomial time on its domain and clearly\ncorrect. Its domain, D, is the set of programs which either halt or crash\nbefore repeating a state. It remains only to show that D is generic. We\nsketch the argument.\nLet D′ be the the set of programs which crash before repeating a state.\nSince D′ ⊂D, it is enough to show that D′ is generic. We can easily count\nthe number of programs in In, the sphere of radius n; |In| = (4n)2n for\nn ≥1. Thus by Lemma 3.2 we are free to use spherical density, ρ◦instead\nof volume density, ρ.\nConsider the programs in the sphere In. Half of them have L in their\nfirst instruction, and the other half have R. Thus half the programs in In\ncrash immediately, and the other half move right to square 1 and transfer\nfrom state 1 to another state. There are n −1 non-halting states besides\nstate 1. Thus the proportion of programs in In which do not halt or repeat\nstates at the first step is 1\n2 + 1\n2\nn−1\nn+1.\nLet Ck ⊂I be the subset of programs not repeating states or halting\nwithin the first k moves. The preceding discussion shows that ρ◦(C1) = 1.\nFurther analysis yields ρ◦(Ck) = 1 for all k.\nPrograms in Ck move to a new non-halting state for each of their first k\nsteps. At each of these steps half the remaining programs (those which have\nnot previously crashed) move left on the tape and half move right. Thus for\nn > k the proportion of programs in Ck ∩In which do not crash in their\nfirst k steps is the same as the fraction of random walks of length k on the\nintegers which start at 0 and reach only nonnegative numbers. By known\nresults that fraction goes to 0 as k goes to infinity.\nFix ε > 0. If k is large enough, the fraction of random walks of length k\nwhich avoid negative numbers is less than ε. Thus for n > k the proportion\nof programs in Ck ∩In which do not crash in their first k steps is also less\nthan ε. But for n large enough, |Ck ∩In|/|In| > 1 −ε because ρ◦(Ck) = 1.\n9\n\nHence the fraction of programs in In which crash without repeating a state\nis at least (1 −ε)2. Consequently ρ◦(D′) = 1 as desired.\n4.2\nThe Post Correspondence Problem\nThe set of inputs for the Post Correspondence Problem all finite sequences\nof pairs of words (u1, v1) . . . (un, vn), n ≥1, over a fixed finite alphabet\n{a1, . . . , ak}, k ≥2. The output is ”Yes“ if ui1 · · · uim = vi1 · · · vim for some\nsequence of indices of length m ≥1 and ”No“ otherwise. We define In to be\nthe collection of inputs with n pairs of words of length between 1 and n.\nIt is well known that PCP is recursively unsolvable. Nevertheless there\nis a trivial partial algorithm which works well enough to show that PCP is\nstrongly generically polynomial.\nAlgorithm 4.3. Input an instance of the Post Correspondence Problem\nIf for all i, neither ui nor vi is a prefix of the other,say ”No“\nElse loop forever\nFor any solution ui1 · · · uim = vi1 · · · vim it is clear that one of ui1, vi1 is\na prefix of the other. Thus our algorithm never gives a wrong answer.\nTheorem 4.4. The Post Correspondence Problem is strongly generically\npolynomial; that is, it is in SGP.\nProof. The size of In is (1+k+· · ·+kn)2n. If we restrict u1 to be a prefix of vk,\nthen there are at most n + 1 possibilities for u1. Thus the number of inputs\nin In in which u1 is a prefix of v1 is no more than (n+1)(1+k+· · ·+kn)2n−1.\nWe conclude that the number of inputs in In for which some ui is a prefix\nof vi or vice-versa is at most 2n(n + 1)(1 + k + · · · + kn)2n−1. Dividing this\nnumber by |In| yields\n2n(n+1)\n1+k+···+kn, which approaches 0 exponentially fast as\nn goes to infinity.\n4.3\n3-Satisfiability\nSAT has long been known to be easy almost all the time, and there is\nconsiderable experimental evidence that 3-SAT is too [4].\nThus it is no\nsurprise that 3-SAT is generically easy.\nAn instance of 3-SAT, i.e., an input for 3-SAT, is a finite conjunction of\nclauses\n[10′ ∨101 ∨1] ∧[110 ∨11′ ∨111] ∧· · ·\n10\n\nwhere the variables are positive integers written in binary, and ′ denotes\nnegation. The problem is to decide whether or not there is a truth assign-\nment to the variables which makes all the clauses true.\nIf the eight different clauses with variables 1, 10, 11 and their negations\nall appear in the input, then the formula is not satisfiable. Thus the following\npartial algorithm is correct.\nAlgorithm 4.5. Input an instance of 3-SAT\nIf all the clauses with variables 1, 10, 11 occur, say ”No“\nElse loop forever\nTheorem 4.6. 3-SAT is in SGP\nStart with the regular language of clauses\nR = [1(0 + 1)∗(∨+′ ∨)1(0 + 1)∗(∨+′ ∨)1(0 + 1)∗(]+′]).\nInputs for 3-SAT are words in the free submonoid (R∧)∗of Σ∗, and size is\nword length.\nThink of inputs as words over the countable alphabet of clauses.\nTo\nprove Theorem 4.6 it suffices to show that the set of words which omit some\nfixed clause is strongly negligible; for then the set of words omitting any\nof the eight clauses just mentioned will be strongly negligible too. Hence\nAlgorithm 4.5, which searches the input for these clauses, will find them in\nlinear time on a generic set of inputs.\nIn fact the set of words which omit some fixed clause is asymptotically\nnegligible with exponential convergence. Proof of this fact requires a using\nthe Perron Frobenius Theorem to compare maximum eigenvalue for the\nincidence matrix of a finite automaton recognizing R with the maximum\neigenvalue for the incidence matrix of a finite automaton recognizing the\nsublanguage of R which omits the eight clauses.\n5\nDifficult instances\nLet P be a hard problem, say undecidable or NP-complete. The results of\nSection 4 show that difficult instances of P may be rare. Sometimes we want\nto find hard instances. For example consider a cryptosystem based on an\nunderlying computational problem P. The partial algorithms for P may be\nviewed as attacks on C; the hard instances are the good keys.\nHow do we find hard instances? Typical existing descriptions for NP-\ncomplete problems use the notions of parameters and phase-transitions. See\n11\n\nfor example [4, Section 3] for a discussion of the location of difficult instances\nof 3-SAT. This approach is good for initial analysis, but quite often further\nstudy reveals that the description does not reflect the complexity of the set\nof hard instances of the problem. Our strong belief is that if the problem P\nis algorithmically hard then the set of hard instances cannot be satisfactorily\ndescribed by parameters.\nIn [18] Nancy Lynch showed that if P is a decision problem not in P,\nthen one can construct a recursive subset of inputs, J ⊂I, such that for\nany partial algorithm, A for P and any polynomial p, A succeeds in time\np(n), where n is the size of the input, on only finitely many inputs in J. J\nis called a polynomial complexity core for P.\nLynch’s construction involves enumerating all partial algorithms, so it\nis not practical. In her paper she asks whether certain decision problems\nmight admit a practical construction. As far as we know, none has been\nproposed.\nLynch’s result attracted the interest of many other researchers. See [24]\nfor a recent account of subsequent work. The implications of this work for\nthe theory of generic complexity are not yet known.\n6\nDistributional computational problems\nIn this section we generalize the definition of asymptotic density (Defini-\ntion 3.1) by allowing ensembles {μn} of probability distributions. Each μn is\na probability distribution on the ball Bn (or sphere In.) Balls no longer need\nto be finite, and a subset R ⊂I has volume density α if lim μn(R∩Bn) = α.\nSpherical density is defined similarly. The discussion of generic case com-\nplexity in Section 3 makes sense with the generalized definition of asymptotic\ndensity in place of the original definition. The original definition corresponds\nto the case of uniform distributions on finite balls and spheres. We write ρμ\nand ρ◦\nμ for volume density and spherical density defined with respect to the\nmeasure μ.\nOne source of ensembles {μn} is probability distributions on I. Given a\nprobability distribution, μ, on I, we define μn for each n to be the conditional\nprobability on Bn or In. We assume that μ is atomic, i.e., that μ(x) is defined\nfor every singleton {x}. For any subset R ⊂I, μ(R) = P\nx∈R μ(x).\nDefinition 6.1. A distributional computational problem is a pair (P, μ)\nwhere P is a computational problem and μ is a probability measure on I.\nHere is an example to illustrate how μ might arise in practice. Consider\nthe following search problem from combinatorial group theory. For a fixed\n12\n\nfinite presentation of a group G, the set of inputs, I, consists of all words (in\nthe generators of G) defining the identity in G. It is required for each w ∈I\nto verify that w does define the identity by constructing a certain kind of\nproof, and a particular procedure is introduced for that purpose. The details\nare not important here, the point is that I is recursively enumerable but need\nnot be recursive. How then are we to define a reasonable stratification in\norder to estimate the generic complexity of our procedure? Stratifying by\nthe length of w is not useful because the resulting Bn’s need not be recursive.\nThe answer [22] is to define a random walk over I which stops at each point\nin I with positive probability and thus induces μ.\n6.1\nAverage case complexity\nAverage case complexity provides a measure of the difficulty of a distribu-\ntional problem. The definition of average case complexity was motivated by\nthe observation that some NP-complete problems admit algorithms which\nseem to run quickly in practice. The idea was to explain this phenomenon\nby showing that although in the maximum running time of an algorithm A\nover all inputs of size n might be very high, the average running time might\nbe much smaller. For this purpose the NP-complete problem was converted\nto a distributional problem by introducing a probability distribution μ on\nthe set of inputs, I.\nAs average case complexity is very similar to generic case complexity,\nwe will discuss the relation between the two in some detail. We begin with\na quick review of average case complexity. We refer the reader to Levin’s\noriginal paper [17], which has been further developed by Gurevich [7] and\nImpagliazzo [12].\nDefinition 6.2. An algorithm A is polynomial time on μ-average if its time\nfunction, TA satisfies TA(x) ≤f(x) for some polynomial on μ-average func-\ntion f. The class of distributional problems decidable in time polynomial\non average is denoted by AvP.\nIt remains to define when a function is polynomial on average. A straight-\nforward definition would be the following.\nDefinition 6.3. A function f : I →R+ is expected polynomial on spheres\n(with respect to an ensemble of spherical distributions {μn}) if there exists\nk ≥1 such that\nZ\nIn\nf(w)μn(w) = O(nk).\n(2)\n13\n\nHowever, in order to obtain closure under addition, multiplication, and\nmultiplication by a scalar we must define a larger class.\nDefinition 6.4 ([17]). A function f : I →R+ is polynomial on μ-average\nif there exists ε > 0 such that\nR\nI(f(x))εσ(x)−1μ(x) < ∞.\nWhich is equivalent to the following.\nDefinition 6.5 ([11]). Let {μn} be an ensemble of volume distributions on\nballs {Bn} of I. A function f : I →R is polynomial on average with respect\nto {μn} if there exists an ε > 0 such that\nR\nBn f ε(x)μn(x) = O(n).\n6.2\nAverage Case vs Generic Case\nAverage case complexity provides a more balanced assessment of the diffi-\nculty of an algorithmic problem than worst-case complexity. Many algorith-\nmic problems, such as the NP-complete Hamiltonian Circuit Problem [9],\nare hard in the worst case but easy on average for reasonable distributions.\nAverage case complexity is very similar to generic case complexity, but\nwe argue that the latter has certain advantages. Generic complexity applies\nto undecidable problems as well as to decidable problems, it is easier to\nemploy than average complexity, and it is a direct measure of the difficulty\nof a problem on most inputs. Average case complexity tells us something\nelse. In [8] Gurevich explains, in terms of a Challenger-Solver game, that\naverage case analysis describes the fraction of hard instances of the problem\nwith respect to a measure of difficulty. In other words to have polynomial\non average time an algorithm should have only a sub-polynomial fraction of\ninputs that require superpolynomial time to compute.\nNow we give some more precise comparisons. Our first observation is that\nAvP and GenP are incomparable; that is, GenP−AvP and AvP−GenP\nboth contain functions. We leave it as an exercise for the reader to verify the\nfirst assertion by constructing a function which is very large on a negligible\nset and small on the complementary generic set. The second part follows\nfrom the next example.\nExample 6.6. Let I = {0, 1}∗. For w ∈I define σ(w) = |w|, the length of\nw, and define μ(w) = 2−2|w|−1. Consider f : I →N defined by F(w) = 2|w|.\nObserve that f ∈AvP by Definition 6.4 with ε < 1, but f /∈GenP.\nHowever, a big chunk of AvP does lie in GenP, namely the functions\nsatisfying Definition 6.3.\n14\n\nProposition 6.7. If a function f : I →R+ is polynomial on μ-average on\nspheres, then f is generically polynomial relative to the asymptotic density\nρμ.\nProof. If f is an expected polynomial then there exists a constant c and\nk ≥1 such that for any n\nZ\nIn\nf\n1\nk (w)μn(w) ≤cn.\nIt follows that for any polynomial q(n)\nμn{x ∈In | f\n1\nk (x) > q(n)cn} ≤1/q(n),\nNow let S(f, q, k) = {x ∈I | f(x) ≥(cq(s(x))s(x))k} be the set of those\ninstances from I on which f(x) is not bounded by (cq(s(x))s(x))k. Then\nμn(In ∩S(f, q, k)) = μn{x ∈In | f\n1\nk (x) > q(n)cn} ≤1/q(n),\ntherefore, the asymptotic density ρμ of S(f, q, k) exists and equal to 0. This\nshows that f is generically bounded by the polynomial (cq(n)n)k.\nProposition 6.7 gives a large class of polynomial on average functions\nwhich are generically polynomial.\nCorollary 6.8. Let A be an algorithm for the distributional problem P. If\nthe expected time of A with respect to the spherical distributions is bounded\nabove by a polynomial then A ∈GenP.\nOn the other hand under some conditions membership in GenP implies\nmembership in AvP. We refer the reader to [16].\nReferences\n[1] A. Blass, Y. Gurevich and S. Shelah, On Polynomial Time Com-\nputation Over Unordered Structures Journal of Symbolic Logic 67\n(2002), 1093-1125.\n[2] A. Bogdanov and L. Trevisan, Average-Case Complexity, Now-\npublishers, 2006.\n[3] Book, Ronald V., and Du, Ding Zhu, The existence and density of\ngeneralized complexity cores. J. Assoc. Comput. Mach. 34 (1987),\nno. 3, 718–730.\n15\n\n[4] S. A. Cook and D. G. Mitchell, Finding hard instances of the sat-\nisfiability problem: a survey, in Satisfiability Problem: Theory and\nApplications, D. Du, J. Gu, and P. M. Pardalos, eds., DIMACS\nSeries in Discrete Mathematics and TheoreticalComputer Science,\n35 1997, 1–17.\n[5] S.B.Cooper, Computability Theory, Chapman and Hall/CRC\nMathematics, 2003.\n[6] M. Garey and J. Johnson, Computers and Intractability, A Guide\nto NP-Completeness, W. H. Freeman, 1979\n[7] Y. Gurevich, Average case completeness, J. of Computer and Sys-\ntem Science 42 (1991), 346–398.\n[8] Y. Gurevich, The Challenger-Solver game:\nVariations on the\ntheme of P =?NP, Logic in Computer Science Column, The Bul-\nletin of EATCS, October 1989, p.112-121.\n[9] Y. Gurevich and S. Shelah. Expected computation time for Hamil-\ntonian Path Problem, SIAM J. on Computing 16:3 (1987) p. 486-\n502.\n[10] J.D. Hamkins, A. Miasnikov. The halting problem is decidable on\na set of asymptotic probability one. Notre Dame Journal of Formal\nLogic, 47 (2006), No. 4, 515–524.\n[11] R. Impagliazzo, A personal view of average-case complexity,\nPreprint, 1995.\n[12] R. Impagliazzo, Computational Complexity Since 1980, Springer-\nVerlag Berlin Heidelberg, R. Ramanujam and S. Sen (Eds.):\nFSTTCS 2005, LNCS 3821, 2005, pp. 1947.\n[13] L. Khachiyan, A polynomial algorithm in linear programming.\nDokl. Akad. Nauk SSSR 244 (1979), no. 5, 1093–1096. {English\ntranslation: Soviet Math. Dokl. 20 (1979), no. 1, 191–194.}\n[14] V. Klee and G. Minty, How good is the simplex algorithm? in\nInequalities, III (Proc. Third Sympos., UCLA), 1969, pp. 159–175.\nAcademic Press, New York, 1972.\n[15] I.Kapovich, A.Myasnikov, P.Schupp, V.Shpilrain Generic-case\ncomplexity and decision problems in group theory J. of Algebra,\n264 (2003), 665-694.\n16\n\n[16] I. Kapovich, A. Myasnikov, P. Schupp, V. Shpilrain Average-case\ncomplexity for the word and membership problems in group theory.\nAdvances in Mathematics 190 (2005), 343-359.\n[17] L. Levin, Average case complete problems, SIAM Journal of Com-\nputing 15 (1986), 285–286.\n[18] N. Lynch, On reducibility to complex or sparse sets. J. Assoc.\nComput. Mach. 22 (1975), 341–345.\n[19] http://sourceforge.net/projects/magnus\n[20] A. Myasnikov, V. Shpilrain, A. Ushakov, A Practical Attack on a\nBraid Group Based Cryptographic Protocol, in Lecture Notes in\nComputer Science, 3621, Springer Verlag, 2005, 86–96.\n[21] S. Smale, On the average number of steps of the simplex method of\nlinear programming, Mathematical Programming, 27 (1983), pp.\n241–262.\n[22] A. Ushakov, Dissertation, City University of New York, 2005.\n[23] A. M. Vershik, P. V. Sporyshev, An estimate of the average num-\nber of steps in the simplex method, and problems in asymptotic\nintegral geometry. Dokl. Akad. Nauk SSSR 271, No.5, 1044-1048\n(1983). English translation: Sov. Math. Dokl. 28, 195-199 (1983).\n[24] T. Yamakami, T. Suzuki, Resource bounded immunity and sim-\nplicity, Theoret. Comput. Sci. 347 (2005), 90–129.\n17","paragraphs":[{"paragraph_id":"p1","order":1,"text":"arXiv:0707.1364v1 [cs.CC] 10 Jul 2007\nReport on Generic Case Complexity\nRobert Gilman\nAlexei G. Miasnikov\nAlexey D. Myasnikov\nAlexander Ushakov\nMarch 20, 2007\nAbstract\nThis article is a short introduction to generic case complexity, which\nis a recently developed way of measuring the difficulty of a computa-\ntional problem while ignoring atypical behavior on a small set of in-\nputs. Generic case complexity applies to both recursively solvable and\nrecursively unsolvable problems.\nContents\n1\nIntroduction\n2\n2\nComputational problems\n3\n2.1\nDecision problems and search problems\n. . . . . . . . . . . .\n3\n2.2\nSize functions and stratifications\n. . . . . . . . . . . . . . . .\n3\n2.3\nWorst case complexity . . . . . . . . . . . . . . . . . . . . . .\n4\n3\nGeneric case complexity\n6\n3.1\nAsymptotic density . . . . . . . . . . . . . . . . . . . . . . . .\n6\n3.2\nConvergence rates\n. . . . . . . . . . . . . . . . . . . . . . . .\n6\n3.3\nGeneric case complexity of algorithms and problems\n. . . . .\n7\n4\nComplexity of unsolvable and NP-complete problems\n8\n4.1\nThe halting problem . . . . . . . . . . . . . . . . . . . . . . .\n8\n4.2\nThe Post Correspondence Problem . . . . . . . . . . . . . . .\n10\n4.3\n3-Satisfiability . . . . . . . . . . . . . . . . . . . . . . . . . . .\n10\n5\nDifficult instances\n11\n1"},{"paragraph_id":"p2","order":2,"text":"6\nDistributional computational problems\n12\n6.1\nAverage case complexity . . . . . . . . . . . . . . . . . . . . .\n13\n6.2\nAverage Case vs Generic Case . . . . . . . . . . . . . . . . . .\n14\n1\nIntroduction\nGeneric case complexity was introduced a few years ago [15] as a way of\nestimating the difficulty of recursively unsolvable problems in combinato-\nrial group theory. More recently generic complexity and related ideas have\nproved useful in cryptanalysis of public key systems[20].\nCombinatorial group theory has its own computational tradition extend-\ning back for more than a century. Almost all computational problems in\ncombinatorial group theory are recursively unsolvable. During the 1990’s\npeople working under the leadership of Gilbert Baumslag on the Magnus\nComputational Group Theory Package [19] noticed that for some difficult\nproblems, simple strategies worked well in practice.\nComputer scientists\nhad come to similar conclusions earlier in regard to NP-complete problems.\nThe group theoretic version of this theme is developed in [15]. The authors\ndefine a generic set of inputs and show that for a large class of finitely gener-\nated groups the word, conjugacy and membership problems can be solved in\nlinear time on a generic set even though these problems might be recursively\nunsolvable for the group in question.\nThe main point here is that it can be convenient and practical to work\nwith a complexity measure which focuses on generic sets of inputs to al-\ngorithms and ignores sparse sets of atypical inputs. Generic complexity is\nclose in spirit to the analyses by Smale [21] and Vershik and Sporyshev [23]\nof the simplex algorithm, and to errorless heuristic case complexity [2]. It\nis also close to average case complexity. Generic complexity is simpler and\nbroader in scope than average case complexity.\nIn addition it is a more\ndirect measure of the performance of an algorithm on most inputs. These\npoints are discussed in Section 6.2.\nThis article is an informal introduction to generic case complexity. It\nis not a complete survey of current developments.\nWe restrict ourselves\nto polynomial time complexity, and we omit probabilistic algorithms. We\nalso do not discuss generic case completeness or the emerging theory of\nproblems undecidable on generic sets. These topics will be included in a\nmore comprehensive treatment to appear later.\n2"},{"paragraph_id":"p3","order":3,"text":"2\nComputational problems\n2.1\nDecision problems and search problems\nThe usual approach to the study of computational problems is to begin with\nTuring machines and membership problems for formal languages. Member-\nship problems are particular cases of decision problems, that is, computa-\ntional problems whose answer is “yes” or “no”. Every decision problem can\nbe turned into a membership problem, but this transformation may add\ncomplications and even change the nature of the problem. For example rep-\nresenting graphs by words over an alphabet is possible but inconvenient and\nsometimes misleading [1]. Thus we are led to a more general view.\nDefinition 2.1. A decision problem is a pair P = (L, I), where I is a\ncountable set of inputs for P and L ⊂I is the positive part of P. That is,\nthe answer for input w ∈I is “yes” if w ∈L and “no” otherwise.\nDefinition 2.2. A search problem is a pair P = (R, I × J), where I and J\nare countable sets, and R ⊂I × J is a binary predicate. Given an element\nw ∈I, one is required to find v ∈J such that (w, v) ∈R; that is, such that\nR(w, v) is true.\nFor example take J to be the integers, I be the set of polynomials with\ncoefficients in J, and R the set of pairs (w, v) such that v is a root of w.\nGiven a polynomial, w, one is required to find an integer root, v, of w.\nIn the preceding example the desired v may not exist. In other search\nproblems one may know in advance that v’s always exist and that the only\ntask is to find one.\nWhen we speak of a problem P, we mean either a decision problem or a\nsearch problem.\n2.2\nSize functions and stratifications\nDecision and search problems are solved by algorithms and partial algo-\nrithms. In general to study the complexity of an algorithm A, one compares\nthe resources spent by A on input w to the size of w. In our case the re-\nsource is time, or more precisely, the number of steps required for A to deal\nwith w. We are being informal here. The usual formal definition is stated\nin terms of the number of steps required by a deterministic Turing machine\nwhich implements A.\nDefinition 2.3. The time consumed by an algorithm A on an input w is\nTA(w), the number of steps performed by an algorithm A on the input w.\n3"},{"paragraph_id":"p4","order":4,"text":"If A is a partial algorithm, then TA is a partial function. Its domain is set\non inputs on which A halts.\nDefinition 2.4. A size function for a set I is a map σ : I →N, the nonneg-\native integers, such that the preimage of each integer is finite.\nDefinition 2.5. A stratification for a set I is an ascending sequence of finite\nsubsets whose union is I.\nFor each size function σ determines a stratification with subsets σ−1({0}),\nσ−1({0, 1}), . . ., and every stratification can be obtained from a size func-\ntion. The finiteness condition in Definitions 2.4 and 2.5 will be relaxed later\nwhen we discuss computational problems with a probability distribution on\nthe set of inputs.\nThe choice of the size function depends of course on the problem at hand.\nIf the input w is a natural number, its size may be taken to be the number\nof symbols in its representation of to a certain base. For any two integer\nbases greater than 1 the corresponding sizes are about the same; they differ\nby at most a fixed multiplicative factor. However if w is written down in\nunary notation, that is, as a sequence of w 1’s, its size will be exponentially\ngreater than its size with respect to the bases greater than 1.\nConsider another example. An input for the satisfiability problem, SAT,\nis a boolean expression in conjunctive normal form. There is a standard\nway to write such an expression as a word over a finite alphabet. A natural\nchoice for input size is the length of that word. But if we are taking the\ntrouble to find difficult instances of SAT, it might be reasonable to take\nthe time needed to generate the word as its size instead. It is also worth\nnoting that converting an arbitrary formula to CNF may increase its length\nexponentially.\nIt is easy to obtain surprising complexity bounds by choosing artificial\nsize functions. We do not pursue further here the question of defining pre-\ncisely what is a reasonable size function; nevertheless we trust the reader\nwill agree that the size functions which appear below are reasonable.\n2.3\nWorst case complexity\nDefinition 2.6. Let A be an algorithm, TA its time function, I the set\nof inputs, and σ a size function for I.\nThe worst case complexity of A\nwith respect to σ is the function WCA : N →N defined by WCA(n) =\nmaxσ(w)≤n TA(w).\n4"},{"paragraph_id":"p5","order":5,"text":"We are usually not interested in the precise worst case complexity but\nrather in estimating its rate of growth. We say that a problem P has poly-\nnomial worst case complexity if it is solved by an algorithm A for which\nWCA(n) is O(nk) for some k. To define exponential worst case complexity,\nwe replace the condition O(nk) for some k by O(2nε) for some ε > 0. We\nwrite P ∈P and P ∈E respectively.\nWorst case complexity was the first and is still the most commonly used\ncomplexity measure. When an algorithm has low worst case complexity, say\nCw\nA(n) is O(n2), we can be pretty sure that it is practical. But the converse\nis not true because the worst cases, which determine WCA, may be rare.\nThis phenomenon has been well known since the 1970’s.\nThe simplex algorithm for linear programming is frequently used as an\nexample of an algorithm for which hard inputs are rare.\nThe algorithm\nis used hundreds of times daily and almost always works quickly. But it\nhas been shown by V. Klee and G. Minty [14] that there are hard inputs.\nMore precisely, the simplex algorithm is in E −P. Khachiyan devised an\ningenious polynomial time algorithm for linear programming problems [13],\nbut the simplex algorithm continues to be widely used because the hard\ninputs never occur in practice. Vershik and Sporyshev [23] and Smale [21]\nshowed independently that the simplex algorithm runs in linear time on a\nset of inputs of measure one.\nSometimes we want a problem to be difficult.\nThis is the case when\nwe are looking for a computational problem on which to base a public key\ncryptosystem. Solving an instance of the problem is equivalent to breaking\nthe cryptosystem for a particular key choice, so we want the computational\nproblem to be hard almost all the time (of course it should be easy if you are\nin possession of certain secret information, otherwise it would be impossible\nto decode messages). In this situation the worst case behavior of algorithms\nis irrelevant.\nWorst case complexity is not defined for partial algorithms, because they\ndo not always halt. Nevertheless it can be the case that the nonhalting in-\nstances are rare for a partial algorithm just as hard instances can be rare for\nan algorithm. Coset enumeration (probably the first mathematical proce-\ndure to be programmed on a computer) is an example of a partial algorithm\nwhich is useful in practice for solving instances of a recursively unsolvable\nproblem, namely whether or not a given finite presentation present a finite\ngroup.\nIn the next section we propose a new complexity measure, generic case\ncomplexity, which applies to partial algorithms as well as to algorithms.\nSubsequently we will discuss the extent to which generic case complexity\n5"},{"paragraph_id":"p6","order":6,"text":"overcomes the deficiencies of worst case complexity and the relation between\ngeneric case and average case complexity.\n3\nGeneric case complexity\nGeneric case complexity is an attempt to deal with the fact that worst case\ncomplexity can be unsatisfactory when the difficult inputs to an algorithm\nare sparse and not observable in practice. The main idea is to ignore small\nsets of difficult inputs and consider the worst case complexity on the re-\nmaining large set of more tractable inputs. By large we mean generic as\ndefined below.\nThe treatment here will be generalized when we discuss\ndistributional problems in Section 6\n3.1\nAsymptotic density\nDefinition 3.1. Let I be a set of inputs with size function σ. Define Bn, the\nball of radius n, by Bn = {w | w ∈I, σ(w) ≤n}. A subset R ⊂I is said to\nhave asymptotic density α, written ρ(R) = α, if limn→∞|R ∩Bn|/|Bn| = α\nwhere |X| denotes the size of a set X. If R has asymptotic density 1, it is\ncalled generic; and if it has asymptotic density 0, it is negligible.\nRecall from Definition 2.4 that σ−1(n) is always finite. Some authors\nuse lim sup rather than lim in Definition 3.1.\nAsymptotic density can be defined using spheres in place of balls. The\nsphere of radius n is In = {w | w ∈I, σ(w) = n}, that is, the set of inputs\nof size n. We say spherical density and volume density to distinguish the\ntwo definitions, and we write ρ◦for spherical density.\nLemma 3.2. Keep the notation of Definition 3.1. If almost all spheres are\nnonempty and ρ◦(K) exists, then so does ρ(K), and the two are equal.\nProof. Set xn = |K ∩Bn| and yn = |Bn|. Then yn < yn+1 for almost all n,\nand lim yn = ∞. By Stolz’s theorem\nρ(K) = lim\nn→∞\nxn\nyn\n= lim\nn→∞\nxn −xn−1\nyn −yn−1\n= lim\nn→∞\n|K ∩Sn|\n|Sn|\n= ρ◦(K).\n3.2\nConvergence rates\nA generic subset of inputs is asymptotically large. Whether it appears large\nin practice depends on how fast the limit in Definition 3.1 converges.\n6"},{"paragraph_id":"p7","order":7,"text":"Definition 3.3. Let R be a subset of I, and suppose that the asymptotic\ndensity ρ(R) exists. The function δR(n) = |R ∩Bn|/|Bn| is called the fre-\nquency function for R.\nDefinition 3.4. Suppose R ⊆I and δR is the density function of R. We\nsay that R has asymptotic density ρ(R) with superpolynomial convergence\nif |ρ(R) −δR(n)| is o(n−k) for every natural number k. For short we call a\ngeneric set with superpolynomial convergence strongly generic. Its comple-\nment is strongly negligible.\nOf course one can introduce exponential convergence, superexponential\nconvergence, etc. In the original papers [15, 16] strong genericity was re-\nserved for generic sets with exponential convergence,but seems that super-\npolynomial convergence is fast enough to obtain the same results.\n3.3\nGeneric case complexity of algorithms and problems\nIn this section we come to the main notion of the paper.\nDefinition 3.5. Let P be a problem. A partial algorithm, A, for P gener-\nically solves P if the halting set, HA, of A is a generic subset of the set of\ninputs, I. In this case we say that P is generically solvable.\nIn particular any algorithm for P generically solves P. We will see that\na generically solvable problem may be recursively unsolvable.\nDefinition 3.6. Let P be a problem with size function σ, and let A a partial\nalgorithm for P. A function f : N →N is a generic upper bound for A if\nthe set HA,f = {w ∈I | w ∈HA and TA(w) ≤f(σ(w))} is generic in I. If\nHA,f is strongly generic, then f is a strongly generic upper bound.\nNow we are ready to define generic complexity classes of algorithmic\nproblems.\nDefinition 3.7. A problem P is generically solvable in polynomial time if\nthere exists a partial algorithm for P with a polynomial generic upper bound.\nIf there exists a partial algorithm with a polynomial strongly generic upper\nbound, then P is strongly generically solvable in polynomial time.\nFor short we refer to problems in two classes defined above as generically\npolynomial and strongly generically polynomial respectively. We denote the\ntwo classes by GenP and SGP.\nIt is clear that one can extend Definition 3.7 to other time bounds.\n7"},{"paragraph_id":"p8","order":8,"text":"4\nComplexity of unsolvable and NP-complete prob-\nlems\nAnalysis of some unsolvable and NP-complete decision problems yields in\neach case an easy partial algorithm with a generic halting set. We present a\nfew of these results here. A more thorough treatment with complete proofs\nwill appear later.\n4.1\nThe halting problem\nTheorem 4.1 ([10]). The halting problem for deterministic Turing ma-\nchines with semi-infinite tape and tape alphabet {a0, a1} is generically solv-\nable in polynomial time; that is, it is in GenP.\nWe do not know whether similar results hold for Turing machines with\nbi-infinite tapes.\nThe halting problem is the premier recursively unsolvable problem. For\nTuring machines with semi-infinite tape extending to the right it is required\nto decide whether or not a given Turing machine halts when started at the\nleftmost square of a tape filled with a0’s. The set of inputs, I, is the set\nof Turing machines of the given type.\nRecall that a Turing machine M\nsatisfying the conditions of Theorem 4.1 may be thought of as a map\np : {1, 2, . . . , n} × {a0, a1} →{0, 1, 2, . . . , n} × {a0, a1} × {L, R}\n(1)\nwhere 1 is the initial state of M, 0 is the halting state, and {2, . . . , n} are the\nother states. The meaning of p(i, ar) = (j, as, L) is that if M is in state i and\nscanning a square containing ar, then its next move is to overwrite ar with\nas, move left on the tape, and go to state j. Likewise p(i, ar) = (j, as, R)\nhas the same effect except that M moves right instead of left. If M reaches\nstate 0, there are no further moves to make, and M halts. As the tape for\nM extends infinitely far to the right but not to the left, M may attempt to\nmove offthe tape to the left. In this case the move is not completed, and\nM crashes.\nThe map p may be thought of as a program. The states are the numbers\nof the instructions, and the instruction, except for instruction number 0,\ntells what to do depending on which letter of the tape alphabet is currently\nbeing scanned. Instruction 0 halts the machine.\nWe take the inputs, I, to be the set of programs p defined above, and\nthe size of p is defined to be the the number of non-halting states (of which\nthere must be at least one); In is the set of programs with n non-halting\n8"},{"paragraph_id":"p9","order":9,"text":"states. Here is a polynomial time partial algorithm which decides the halting\nproblem.\nAlgorithm 4.2. Input a program p\nRun p until the first time it repeats a state\nIf p halts, say “Yes”\nIf p crashes, say ”No“\nElse loop forever.\nIt would be more informative to say ”Don’t know“ than to loop forever,\nbut accommodating this possibility would slightly complicate the definitions\nin Section 3.3. We have opted for simplicity.\nAlgorithm 4.2 is obviously polynomial time on its domain and clearly\ncorrect. Its domain, D, is the set of programs which either halt or crash\nbefore repeating a state. It remains only to show that D is generic. We\nsketch the argument.\nLet D′ be the the set of programs which crash before repeating a state.\nSince D′ ⊂D, it is enough to show that D′ is generic. We can easily count\nthe number of programs in In, the sphere of radius n; |In| = (4n)2n for\nn ≥1. Thus by Lemma 3.2 we are free to use spherical density, ρ◦instead\nof volume density, ρ.\nConsider the programs in the sphere In. Half of them have L in their\nfirst instruction, and the other half have R. Thus half the programs in In\ncrash immediately, and the other half move right to square 1 and transfer\nfrom state 1 to another state. There are n −1 non-halting states besides\nstate 1. Thus the proportion of programs in In which do not halt or repeat\nstates at the first step is 1\n2 + 1\n2\nn−1\nn+1.\nLet Ck ⊂I be the subset of programs not repeating states or halting\nwithin the first k moves. The preceding discussion shows that ρ◦(C1) = 1.\nFurther analysis yields ρ◦(Ck) = 1 for all k.\nPrograms in Ck move to a new non-halting state for each of their first k\nsteps. At each of these steps half the remaining programs (those which have\nnot previously crashed) move left on the tape and half move right. Thus for\nn > k the proportion of programs in Ck ∩In which do not crash in their\nfirst k steps is the same as the fraction of random walks of length k on the\nintegers which start at 0 and reach only nonnegative numbers. By known\nresults that fraction goes to 0 as k goes to infinity.\nFix ε > 0. If k is large enough, the fraction of random walks of length k\nwhich avoid negative numbers is less than ε. Thus for n > k the proportion\nof programs in Ck ∩In which do not crash in their first k steps is also less\nthan ε. But for n large enough, |Ck ∩In|/|In| > 1 −ε because ρ◦(Ck) = 1.\n9"},{"paragraph_id":"p10","order":10,"text":"Hence the fraction of programs in In which crash without repeating a state\nis at least (1 −ε)2. Consequently ρ◦(D′) = 1 as desired.\n4.2\nThe Post Correspondence Problem\nThe set of inputs for the Post Correspondence Problem all finite sequences\nof pairs of words (u1, v1) . . . (un, vn), n ≥1, over a fixed finite alphabet\n{a1, . . . , ak}, k ≥2. The output is ”Yes“ if ui1 · · · uim = vi1 · · · vim for some\nsequence of indices of length m ≥1 and ”No“ otherwise. We define In to be\nthe collection of inputs with n pairs of words of length between 1 and n.\nIt is well known that PCP is recursively unsolvable. Nevertheless there\nis a trivial partial algorithm which works well enough to show that PCP is\nstrongly generically polynomial.\nAlgorithm 4.3. Input an instance of the Post Correspondence Problem\nIf for all i, neither ui nor vi is a prefix of the other,say ”No“\nElse loop forever\nFor any solution ui1 · · · uim = vi1 · · · vim it is clear that one of ui1, vi1 is\na prefix of the other. Thus our algorithm never gives a wrong answer.\nTheorem 4.4. The Post Correspondence Problem is strongly generically\npolynomial; that is, it is in SGP.\nProof. The size of In is (1+k+· · ·+kn)2n. If we restrict u1 to be a prefix of vk,\nthen there are at most n + 1 possibilities for u1. Thus the number of inputs\nin In in which u1 is a prefix of v1 is no more than (n+1)(1+k+· · ·+kn)2n−1.\nWe conclude that the number of inputs in In for which some ui is a prefix\nof vi or vice-versa is at most 2n(n + 1)(1 + k + · · · + kn)2n−1. Dividing this\nnumber by |In| yields\n2n(n+1)\n1+k+···+kn, which approaches 0 exponentially fast as\nn goes to infinity.\n4.3\n3-Satisfiability\nSAT has long been known to be easy almost all the time, and there is\nconsiderable experimental evidence that 3-SAT is too [4].\nThus it is no\nsurprise that 3-SAT is generically easy.\nAn instance of 3-SAT, i.e., an input for 3-SAT, is a finite conjunction of\nclauses\n[10′ ∨101 ∨1] ∧[110 ∨11′ ∨111] ∧· · ·\n10"},{"paragraph_id":"p11","order":11,"text":"where the variables are positive integers written in binary, and ′ denotes\nnegation. The problem is to decide whether or not there is a truth assign-\nment to the variables which makes all the clauses true.\nIf the eight different clauses with variables 1, 10, 11 and their negations\nall appear in the input, then the formula is not satisfiable. Thus the following\npartial algorithm is correct.\nAlgorithm 4.5. Input an instance of 3-SAT\nIf all the clauses with variables 1, 10, 11 occur, say ”No“\nElse loop forever\nTheorem 4.6. 3-SAT is in SGP\nStart with the regular language of clauses\nR = [1(0 + 1)∗(∨+′ ∨)1(0 + 1)∗(∨+′ ∨)1(0 + 1)∗(]+′]).\nInputs for 3-SAT are words in the free submonoid (R∧)∗of Σ∗, and size is\nword length.\nThink of inputs as words over the countable alphabet of clauses.\nTo\nprove Theorem 4.6 it suffices to show that the set of words which omit some\nfixed clause is strongly negligible; for then the set of words omitting any\nof the eight clauses just mentioned will be strongly negligible too. Hence\nAlgorithm 4.5, which searches the input for these clauses, will find them in\nlinear time on a generic set of inputs.\nIn fact the set of words which omit some fixed clause is asymptotically\nnegligible with exponential convergence. Proof of this fact requires a using\nthe Perron Frobenius Theorem to compare maximum eigenvalue for the\nincidence matrix of a finite automaton recognizing R with the maximum\neigenvalue for the incidence matrix of a finite automaton recognizing the\nsublanguage of R which omits the eight clauses.\n5\nDifficult instances\nLet P be a hard problem, say undecidable or NP-complete. The results of\nSection 4 show that difficult instances of P may be rare. Sometimes we want\nto find hard instances. For example consider a cryptosystem based on an\nunderlying computational problem P. The partial algorithms for P may be\nviewed as attacks on C; the hard instances are the good keys.\nHow do we find hard instances? Typical existing descriptions for NP-\ncomplete problems use the notions of parameters and phase-transitions. See\n11"},{"paragraph_id":"p12","order":12,"text":"for example [4, Section 3] for a discussion of the location of difficult instances\nof 3-SAT. This approach is good for initial analysis, but quite often further\nstudy reveals that the description does not reflect the complexity of the set\nof hard instances of the problem. Our strong belief is that if the problem P\nis algorithmically hard then the set of hard instances cannot be satisfactorily\ndescribed by parameters.\nIn [18] Nancy Lynch showed that if P is a decision problem not in P,\nthen one can construct a recursive subset of inputs, J ⊂I, such that for\nany partial algorithm, A for P and any polynomial p, A succeeds in time\np(n), where n is the size of the input, on only finitely many inputs in J. J\nis called a polynomial complexity core for P.\nLynch’s construction involves enumerating all partial algorithms, so it\nis not practical. In her paper she asks whether certain decision problems\nmight admit a practical construction. As far as we know, none has been\nproposed.\nLynch’s result attracted the interest of many other researchers. See [24]\nfor a recent account of subsequent work. The implications of this work for\nthe theory of generic complexity are not yet known.\n6\nDistributional computational problems\nIn this section we generalize the definition of asymptotic density (Defini-\ntion 3.1) by allowing ensembles {μn} of probability distributions. Each μn is\na probability distribution on the ball Bn (or sphere In.) Balls no longer need\nto be finite, and a subset R ⊂I has volume density α if lim μn(R∩Bn) = α.\nSpherical density is defined similarly. The discussion of generic case com-\nplexity in Section 3 makes sense with the generalized definition of asymptotic\ndensity in place of the original definition. The original definition corresponds\nto the case of uniform distributions on finite balls and spheres. We write ρμ\nand ρ◦\nμ for volume density and spherical density defined with respect to the\nmeasure μ.\nOne source of ensembles {μn} is probability distributions on I. Given a\nprobability distribution, μ, on I, we define μn for each n to be the conditional\nprobability on Bn or In. We assume that μ is atomic, i.e., that μ(x) is defined\nfor every singleton {x}. For any subset R ⊂I, μ(R) = P\nx∈R μ(x).\nDefinition 6.1. A distributional computational problem is a pair (P, μ)\nwhere P is a computational problem and μ is a probability measure on I.\nHere is an example to illustrate how μ might arise in practice. Consider\nthe following search problem from combinatorial group theory. For a fixed\n12"},{"paragraph_id":"p13","order":13,"text":"finite presentation of a group G, the set of inputs, I, consists of all words (in\nthe generators of G) defining the identity in G. It is required for each w ∈I\nto verify that w does define the identity by constructing a certain kind of\nproof, and a particular procedure is introduced for that purpose. The details\nare not important here, the point is that I is recursively enumerable but need\nnot be recursive. How then are we to define a reasonable stratification in\norder to estimate the generic complexity of our procedure? Stratifying by\nthe length of w is not useful because the resulting Bn’s need not be recursive.\nThe answer [22] is to define a random walk over I which stops at each point\nin I with positive probability and thus induces μ.\n6.1\nAverage case complexity\nAverage case complexity provides a measure of the difficulty of a distribu-\ntional problem. The definition of average case complexity was motivated by\nthe observation that some NP-complete problems admit algorithms which\nseem to run quickly in practice. The idea was to explain this phenomenon\nby showing that although in the maximum running time of an algorithm A\nover all inputs of size n might be very high, the average running time might\nbe much smaller. For this purpose the NP-complete problem was converted\nto a distributional problem by introducing a probability distribution μ on\nthe set of inputs, I.\nAs average case complexity is very similar to generic case complexity,\nwe will discuss the relation between the two in some detail. We begin with\na quick review of average case complexity. We refer the reader to Levin’s\noriginal paper [17], which has been further developed by Gurevich [7] and\nImpagliazzo [12].\nDefinition 6.2. An algorithm A is polynomial time on μ-average if its time\nfunction, TA satisfies TA(x) ≤f(x) for some polynomial on μ-average func-\ntion f. The class of distributional problems decidable in time polynomial\non average is denoted by AvP.\nIt remains to define when a function is polynomial on average. A straight-\nforward definition would be the following.\nDefinition 6.3. A function f : I →R+ is expected polynomial on spheres\n(with respect to an ensemble of spherical distributions {μn}) if there exists\nk ≥1 such that\nZ\nIn\nf(w)μn(w) = O(nk).\n(2)\n13"},{"paragraph_id":"p14","order":14,"text":"However, in order to obtain closure under addition, multiplication, and\nmultiplication by a scalar we must define a larger class.\nDefinition 6.4 ([17]). A function f : I →R+ is polynomial on μ-average\nif there exists ε > 0 such that\nR\nI(f(x))εσ(x)−1μ(x) < ∞.\nWhich is equivalent to the following.\nDefinition 6.5 ([11]). Let {μn} be an ensemble of volume distributions on\nballs {Bn} of I. A function f : I →R is polynomial on average with respect\nto {μn} if there exists an ε > 0 such that\nR\nBn f ε(x)μn(x) = O(n).\n6.2\nAverage Case vs Generic Case\nAverage case complexity provides a more balanced assessment of the diffi-\nculty of an algorithmic problem than worst-case complexity. Many algorith-\nmic problems, such as the NP-complete Hamiltonian Circuit Problem [9],\nare hard in the worst case but easy on average for reasonable distributions.\nAverage case complexity is very similar to generic case complexity, but\nwe argue that the latter has certain advantages. Generic complexity applies\nto undecidable problems as well as to decidable problems, it is easier to\nemploy than average complexity, and it is a direct measure of the difficulty\nof a problem on most inputs. Average case complexity tells us something\nelse. In [8] Gurevich explains, in terms of a Challenger-Solver game, that\naverage case analysis describes the fraction of hard instances of the problem\nwith respect to a measure of difficulty. In other words to have polynomial\non average time an algorithm should have only a sub-polynomial fraction of\ninputs that require superpolynomial time to compute.\nNow we give some more precise comparisons. Our first observation is that\nAvP and GenP are incomparable; that is, GenP−AvP and AvP−GenP\nboth contain functions. We leave it as an exercise for the reader to verify the\nfirst assertion by constructing a function which is very large on a negligible\nset and small on the complementary generic set. The second part follows\nfrom the next example.\nExample 6.6. Let I = {0, 1}∗. For w ∈I define σ(w) = |w|, the length of\nw, and define μ(w) = 2−2|w|−1. Consider f : I →N defined by F(w) = 2|w|.\nObserve that f ∈AvP by Definition 6.4 with ε < 1, but f /∈GenP.\nHowever, a big chunk of AvP does lie in GenP, namely the functions\nsatisfying Definition 6.3.\n14"},{"paragraph_id":"p15","order":15,"text":"Proposition 6.7. If a function f : I →R+ is polynomial on μ-average on\nspheres, then f is generically polynomial relative to the asymptotic density\nρμ.\nProof. If f is an expected polynomial then there exists a constant c and\nk ≥1 such that for any n\nZ\nIn\nf\n1\nk (w)μn(w) ≤cn.\nIt follows that for any polynomial q(n)\nμn{x ∈In | f\n1\nk (x) > q(n)cn} ≤1/q(n),\nNow let S(f, q, k) = {x ∈I | f(x) ≥(cq(s(x))s(x))k} be the set of those\ninstances from I on which f(x) is not bounded by (cq(s(x))s(x))k. Then\nμn(In ∩S(f, q, k)) = μn{x ∈In | f\n1\nk (x) > q(n)cn} ≤1/q(n),\ntherefore, the asymptotic density ρμ of S(f, q, k) exists and equal to 0. This\nshows that f is generically bounded by the polynomial (cq(n)n)k.\nProposition 6.7 gives a large class of polynomial on average functions\nwhich are generically polynomial.\nCorollary 6.8. Let A be an algorithm for the distributional problem P. If\nthe expected time of A with respect to the spherical distributions is bounded\nabove by a polynomial then A ∈GenP.\nOn the other hand under some conditions membership in GenP implies\nmembership in AvP. We refer the reader to [16].\nReferences\n[1] A. Blass, Y. Gurevich and S. Shelah, On Polynomial Time Com-\nputation Over Unordered Structures Journal of Symbolic Logic 67\n(2002), 1093-1125.\n[2] A. Bogdanov and L. Trevisan, Average-Case Complexity, Now-\npublishers, 2006.\n[3] Book, Ronald V., and Du, Ding Zhu, The existence and density of\ngeneralized complexity cores. J. Assoc. Comput. Mach. 34 (1987),\nno. 3, 718–730.\n15"},{"paragraph_id":"p16","order":16,"text":"[4] S. A. Cook and D. G. Mitchell, Finding hard instances of the sat-\nisfiability problem: a survey, in Satisfiability Problem: Theory and\nApplications, D. Du, J. Gu, and P. M. Pardalos, eds., DIMACS\nSeries in Discrete Mathematics and TheoreticalComputer Science,\n35 1997, 1–17.\n[5] S.B.Cooper, Computability Theory, Chapman and Hall/CRC\nMathematics, 2003.\n[6] M. Garey and J. Johnson, Computers and Intractability, A Guide\nto NP-Completeness, W. H. Freeman, 1979\n[7] Y. Gurevich, Average case completeness, J. of Computer and Sys-\ntem Science 42 (1991), 346–398.\n[8] Y. Gurevich, The Challenger-Solver game:\nVariations on the\ntheme of P =?NP, Logic in Computer Science Column, The Bul-\nletin of EATCS, October 1989, p.112-121.\n[9] Y. Gurevich and S. Shelah. Expected computation time for Hamil-\ntonian Path Problem, SIAM J. on Computing 16:3 (1987) p. 486-\n502.\n[10] J.D. Hamkins, A. Miasnikov. The halting problem is decidable on\na set of asymptotic probability one. Notre Dame Journal of Formal\nLogic, 47 (2006), No. 4, 515–524.\n[11] R. Impagliazzo, A personal view of average-case complexity,\nPreprint, 1995.\n[12] R. Impagliazzo, Computational Complexity Since 1980, Springer-\nVerlag Berlin Heidelberg, R. Ramanujam and S. Sen (Eds.):\nFSTTCS 2005, LNCS 3821, 2005, pp. 1947.\n[13] L. Khachiyan, A polynomial algorithm in linear programming.\nDokl. Akad. Nauk SSSR 244 (1979), no. 5, 1093–1096. {English\ntranslation: Soviet Math. Dokl. 20 (1979), no. 1, 191–194.}\n[14] V. Klee and G. Minty, How good is the simplex algorithm? in\nInequalities, III (Proc. Third Sympos., UCLA), 1969, pp. 159–175.\nAcademic Press, New York, 1972.\n[15] I.Kapovich, A.Myasnikov, P.Schupp, V.Shpilrain Generic-case\ncomplexity and decision problems in group theory J. of Algebra,\n264 (2003), 665-694.\n16"},{"paragraph_id":"p17","order":17,"text":"[16] I. Kapovich, A. Myasnikov, P. Schupp, V. Shpilrain Average-case\ncomplexity for the word and membership problems in group theory.\nAdvances in Mathematics 190 (2005), 343-359.\n[17] L. Levin, Average case complete problems, SIAM Journal of Com-\nputing 15 (1986), 285–286.\n[18] N. Lynch, On reducibility to complex or sparse sets. J. Assoc.\nComput. Mach. 22 (1975), 341–345.\n[19] http://sourceforge.net/projects/magnus\n[20] A. Myasnikov, V. Shpilrain, A. Ushakov, A Practical Attack on a\nBraid Group Based Cryptographic Protocol, in Lecture Notes in\nComputer Science, 3621, Springer Verlag, 2005, 86–96.\n[21] S. Smale, On the average number of steps of the simplex method of\nlinear programming, Mathematical Programming, 27 (1983), pp.\n241–262.\n[22] A. Ushakov, Dissertation, City University of New York, 2005.\n[23] A. M. Vershik, P. V. Sporyshev, An estimate of the average num-\nber of steps in the simplex method, and problems in asymptotic\nintegral geometry. Dokl. Akad. Nauk SSSR 271, No.5, 1044-1048\n(1983). English translation: Sov. Math. Dokl. 28, 195-199 (1983).\n[24] T. Yamakami, T. Suzuki, Resource bounded immunity and sim-\nplicity, Theoret. Comput. Sci. 347 (2005), 90–129.\n17"}],"pages":[{"page":1,"text":"arXiv:0707.1364v1 [cs.CC] 10 Jul 2007\nReport on Generic Case Complexity\nRobert Gilman\nAlexei G. Miasnikov\nAlexey D. Myasnikov\nAlexander Ushakov\nMarch 20, 2007\nAbstract\nThis article is a short introduction to generic case complexity, which\nis a recently developed way of measuring the difficulty of a computa-\ntional problem while ignoring atypical behavior on a small set of in-\nputs. Generic case complexity applies to both recursively solvable and\nrecursively unsolvable problems.\nContents\n1\nIntroduction\n2\n2\nComputational problems\n3\n2.1\nDecision problems and search problems\n. . . . . . . . . . . .\n3\n2.2\nSize functions and stratifications\n. . . . . . . . . . . . . . . .\n3\n2.3\nWorst case complexity . . . . . . . . . . . . . . . . . . . . . .\n4\n3\nGeneric case complexity\n6\n3.1\nAsymptotic density . . . . . . . . . . . . . . . . . . . . . . . .\n6\n3.2\nConvergence rates\n. . . . . . . . . . . . . . . . . . . . . . . .\n6\n3.3\nGeneric case complexity of algorithms and problems\n. . . . .\n7\n4\nComplexity of unsolvable and NP-complete problems\n8\n4.1\nThe halting problem . . . . . . . . . . . . . . . . . . . . . . .\n8\n4.2\nThe Post Correspondence Problem . . . . . . . . . . . . . . .\n10\n4.3\n3-Satisfiability . . . . . . . . . . . . . . . . . . . . . . . . . . .\n10\n5\nDifficult instances\n11\n1"},{"page":2,"text":"6\nDistributional computational problems\n12\n6.1\nAverage case complexity . . . . . . . . . . . . . . . . . . . . .\n13\n6.2\nAverage Case vs Generic Case . . . . . . . . . . . . . . . . . .\n14\n1\nIntroduction\nGeneric case complexity was introduced a few years ago [15] as a way of\nestimating the difficulty of recursively unsolvable problems in combinato-\nrial group theory. More recently generic complexity and related ideas have\nproved useful in cryptanalysis of public key systems[20].\nCombinatorial group theory has its own computational tradition extend-\ning back for more than a century. Almost all computational problems in\ncombinatorial group theory are recursively unsolvable. During the 1990’s\npeople working under the leadership of Gilbert Baumslag on the Magnus\nComputational Group Theory Package [19] noticed that for some difficult\nproblems, simple strategies worked well in practice.\nComputer scientists\nhad come to similar conclusions earlier in regard to NP-complete problems.\nThe group theoretic version of this theme is developed in [15]. The authors\ndefine a generic set of inputs and show that for a large class of finitely gener-\nated groups the word, conjugacy and membership problems can be solved in\nlinear time on a generic set even though these problems might be recursively\nunsolvable for the group in question.\nThe main point here is that it can be convenient and practical to work\nwith a complexity measure which focuses on generic sets of inputs to al-\ngorithms and ignores sparse sets of atypical inputs. Generic complexity is\nclose in spirit to the analyses by Smale [21] and Vershik and Sporyshev [23]\nof the simplex algorithm, and to errorless heuristic case complexity [2]. It\nis also close to average case complexity. Generic complexity is simpler and\nbroader in scope than average case complexity.\nIn addition it is a more\ndirect measure of the performance of an algorithm on most inputs. These\npoints are discussed in Section 6.2.\nThis article is an informal introduction to generic case complexity. It\nis not a complete survey of current developments.\nWe restrict ourselves\nto polynomial time complexity, and we omit probabilistic algorithms. We\nalso do not discuss generic case completeness or the emerging theory of\nproblems undecidable on generic sets. These topics will be included in a\nmore comprehensive treatment to appear later.\n2"},{"page":3,"text":"2\nComputational problems\n2.1\nDecision problems and search problems\nThe usual approach to the study of computational problems is to begin with\nTuring machines and membership problems for formal languages. Member-\nship problems are particular cases of decision problems, that is, computa-\ntional problems whose answer is “yes” or “no”. Every decision problem can\nbe turned into a membership problem, but this transformation may add\ncomplications and even change the nature of the problem. For example rep-\nresenting graphs by words over an alphabet is possible but inconvenient and\nsometimes misleading [1]. Thus we are led to a more general view.\nDefinition 2.1. A decision problem is a pair P = (L, I), where I is a\ncountable set of inputs for P and L ⊂I is the positive part of P. That is,\nthe answer for input w ∈I is “yes” if w ∈L and “no” otherwise.\nDefinition 2.2. A search problem is a pair P = (R, I × J), where I and J\nare countable sets, and R ⊂I × J is a binary predicate. Given an element\nw ∈I, one is required to find v ∈J such that (w, v) ∈R; that is, such that\nR(w, v) is true.\nFor example take J to be the integers, I be the set of polynomials with\ncoefficients in J, and R the set of pairs (w, v) such that v is a root of w.\nGiven a polynomial, w, one is required to find an integer root, v, of w.\nIn the preceding example the desired v may not exist. In other search\nproblems one may know in advance that v’s always exist and that the only\ntask is to find one.\nWhen we speak of a problem P, we mean either a decision problem or a\nsearch problem.\n2.2\nSize functions and stratifications\nDecision and search problems are solved by algorithms and partial algo-\nrithms. In general to study the complexity of an algorithm A, one compares\nthe resources spent by A on input w to the size of w. In our case the re-\nsource is time, or more precisely, the number of steps required for A to deal\nwith w. We are being informal here. The usual formal definition is stated\nin terms of the number of steps required by a deterministic Turing machine\nwhich implements A.\nDefinition 2.3. The time consumed by an algorithm A on an input w is\nTA(w), the number of steps performed by an algorithm A on the input w.\n3"},{"page":4,"text":"If A is a partial algorithm, then TA is a partial function. Its domain is set\non inputs on which A halts.\nDefinition 2.4. A size function for a set I is a map σ : I →N, the nonneg-\native integers, such that the preimage of each integer is finite.\nDefinition 2.5. A stratification for a set I is an ascending sequence of finite\nsubsets whose union is I.\nFor each size function σ determines a stratification with subsets σ−1({0}),\nσ−1({0, 1}), . . ., and every stratification can be obtained from a size func-\ntion. The finiteness condition in Definitions 2.4 and 2.5 will be relaxed later\nwhen we discuss computational problems with a probability distribution on\nthe set of inputs.\nThe choice of the size function depends of course on the problem at hand.\nIf the input w is a natural number, its size may be taken to be the number\nof symbols in its representation of to a certain base. For any two integer\nbases greater than 1 the corresponding sizes are about the same; they differ\nby at most a fixed multiplicative factor. However if w is written down in\nunary notation, that is, as a sequence of w 1’s, its size will be exponentially\ngreater than its size with respect to the bases greater than 1.\nConsider another example. An input for the satisfiability problem, SAT,\nis a boolean expression in conjunctive normal form. There is a standard\nway to write such an expression as a word over a finite alphabet. A natural\nchoice for input size is the length of that word. But if we are taking the\ntrouble to find difficult instances of SAT, it might be reasonable to take\nthe time needed to generate the word as its size instead. It is also worth\nnoting that converting an arbitrary formula to CNF may increase its length\nexponentially.\nIt is easy to obtain surprising complexity bounds by choosing artificial\nsize functions. We do not pursue further here the question of defining pre-\ncisely what is a reasonable size function; nevertheless we trust the reader\nwill agree that the size functions which appear below are reasonable.\n2.3\nWorst case complexity\nDefinition 2.6. Let A be an algorithm, TA its time function, I the set\nof inputs, and σ a size function for I.\nThe worst case complexity of A\nwith respect to σ is the function WCA : N →N defined by WCA(n) =\nmaxσ(w)≤n TA(w).\n4"},{"page":5,"text":"We are usually not interested in the precise worst case complexity but\nrather in estimating its rate of growth. We say that a problem P has poly-\nnomial worst case complexity if it is solved by an algorithm A for which\nWCA(n) is O(nk) for some k. To define exponential worst case complexity,\nwe replace the condition O(nk) for some k by O(2nε) for some ε > 0. We\nwrite P ∈P and P ∈E respectively.\nWorst case complexity was the first and is still the most commonly used\ncomplexity measure. When an algorithm has low worst case complexity, say\nCw\nA(n) is O(n2), we can be pretty sure that it is practical. But the converse\nis not true because the worst cases, which determine WCA, may be rare.\nThis phenomenon has been well known since the 1970’s.\nThe simplex algorithm for linear programming is frequently used as an\nexample of an algorithm for which hard inputs are rare.\nThe algorithm\nis used hundreds of times daily and almost always works quickly. But it\nhas been shown by V. Klee and G. Minty [14] that there are hard inputs.\nMore precisely, the simplex algorithm is in E −P. Khachiyan devised an\ningenious polynomial time algorithm for linear programming problems [13],\nbut the simplex algorithm continues to be widely used because the hard\ninputs never occur in practice. Vershik and Sporyshev [23] and Smale [21]\nshowed independently that the simplex algorithm runs in linear time on a\nset of inputs of measure one.\nSometimes we want a problem to be difficult.\nThis is the case when\nwe are looking for a computational problem on which to base a public key\ncryptosystem. Solving an instance of the problem is equivalent to breaking\nthe cryptosystem for a particular key choice, so we want the computational\nproblem to be hard almost all the time (of course it should be easy if you are\nin possession of certain secret information, otherwise it would be impossible\nto decode messages). In this situation the worst case behavior of algorithms\nis irrelevant.\nWorst case complexity is not defined for partial algorithms, because they\ndo not always halt. Nevertheless it can be the case that the nonhalting in-\nstances are rare for a partial algorithm just as hard instances can be rare for\nan algorithm. Coset enumeration (probably the first mathematical proce-\ndure to be programmed on a computer) is an example of a partial algorithm\nwhich is useful in practice for solving instances of a recursively unsolvable\nproblem, namely whether or not a given finite presentation present a finite\ngroup.\nIn the next section we propose a new complexity measure, generic case\ncomplexity, which applies to partial algorithms as well as to algorithms.\nSubsequently we will discuss the extent to which generic case complexity\n5"},{"page":6,"text":"overcomes the deficiencies of worst case complexity and the relation between\ngeneric case and average case complexity.\n3\nGeneric case complexity\nGeneric case complexity is an attempt to deal with the fact that worst case\ncomplexity can be unsatisfactory when the difficult inputs to an algorithm\nare sparse and not observable in practice. The main idea is to ignore small\nsets of difficult inputs and consider the worst case complexity on the re-\nmaining large set of more tractable inputs. By large we mean generic as\ndefined below.\nThe treatment here will be generalized when we discuss\ndistributional problems in Section 6\n3.1\nAsymptotic density\nDefinition 3.1. Let I be a set of inputs with size function σ. Define Bn, the\nball of radius n, by Bn = {w | w ∈I, σ(w) ≤n}. A subset R ⊂I is said to\nhave asymptotic density α, written ρ(R) = α, if limn→∞|R ∩Bn|/|Bn| = α\nwhere |X| denotes the size of a set X. If R has asymptotic density 1, it is\ncalled generic; and if it has asymptotic density 0, it is negligible.\nRecall from Definition 2.4 that σ−1(n) is always finite. Some authors\nuse lim sup rather than lim in Definition 3.1.\nAsymptotic density can be defined using spheres in place of balls. The\nsphere of radius n is In = {w | w ∈I, σ(w) = n}, that is, the set of inputs\nof size n. We say spherical density and volume density to distinguish the\ntwo definitions, and we write ρ◦for spherical density.\nLemma 3.2. Keep the notation of Definition 3.1. If almost all spheres are\nnonempty and ρ◦(K) exists, then so does ρ(K), and the two are equal.\nProof. Set xn = |K ∩Bn| and yn = |Bn|. Then yn < yn+1 for almost all n,\nand lim yn = ∞. By Stolz’s theorem\nρ(K) = lim\nn→∞\nxn\nyn\n= lim\nn→∞\nxn −xn−1\nyn −yn−1\n= lim\nn→∞\n|K ∩Sn|\n|Sn|\n= ρ◦(K).\n3.2\nConvergence rates\nA generic subset of inputs is asymptotically large. Whether it appears large\nin practice depends on how fast the limit in Definition 3.1 converges.\n6"},{"page":7,"text":"Definition 3.3. Let R be a subset of I, and suppose that the asymptotic\ndensity ρ(R) exists. The function δR(n) = |R ∩Bn|/|Bn| is called the fre-\nquency function for R.\nDefinition 3.4. Suppose R ⊆I and δR is the density function of R. We\nsay that R has asymptotic density ρ(R) with superpolynomial convergence\nif |ρ(R) −δR(n)| is o(n−k) for every natural number k. For short we call a\ngeneric set with superpolynomial convergence strongly generic. Its comple-\nment is strongly negligible.\nOf course one can introduce exponential convergence, superexponential\nconvergence, etc. In the original papers [15, 16] strong genericity was re-\nserved for generic sets with exponential convergence,but seems that super-\npolynomial convergence is fast enough to obtain the same results.\n3.3\nGeneric case complexity of algorithms and problems\nIn this section we come to the main notion of the paper.\nDefinition 3.5. Let P be a problem. A partial algorithm, A, for P gener-\nically solves P if the halting set, HA, of A is a generic subset of the set of\ninputs, I. In this case we say that P is generically solvable.\nIn particular any algorithm for P generically solves P. We will see that\na generically solvable problem may be recursively unsolvable.\nDefinition 3.6. Let P be a problem with size function σ, and let A a partial\nalgorithm for P. A function f : N →N is a generic upper bound for A if\nthe set HA,f = {w ∈I | w ∈HA and TA(w) ≤f(σ(w))} is generic in I. If\nHA,f is strongly generic, then f is a strongly generic upper bound.\nNow we are ready to define generic complexity classes of algorithmic\nproblems.\nDefinition 3.7. A problem P is generically solvable in polynomial time if\nthere exists a partial algorithm for P with a polynomial generic upper bound.\nIf there exists a partial algorithm with a polynomial strongly generic upper\nbound, then P is strongly generically solvable in polynomial time.\nFor short we refer to problems in two classes defined above as generically\npolynomial and strongly generically polynomial respectively. We denote the\ntwo classes by GenP and SGP.\nIt is clear that one can extend Definition 3.7 to other time bounds.\n7"},{"page":8,"text":"4\nComplexity of unsolvable and NP-complete prob-\nlems\nAnalysis of some unsolvable and NP-complete decision problems yields in\neach case an easy partial algorithm with a generic halting set. We present a\nfew of these results here. A more thorough treatment with complete proofs\nwill appear later.\n4.1\nThe halting problem\nTheorem 4.1 ([10]). The halting problem for deterministic Turing ma-\nchines with semi-infinite tape and tape alphabet {a0, a1} is generically solv-\nable in polynomial time; that is, it is in GenP.\nWe do not know whether similar results hold for Turing machines with\nbi-infinite tapes.\nThe halting problem is the premier recursively unsolvable problem. For\nTuring machines with semi-infinite tape extending to the right it is required\nto decide whether or not a given Turing machine halts when started at the\nleftmost square of a tape filled with a0’s. The set of inputs, I, is the set\nof Turing machines of the given type.\nRecall that a Turing machine M\nsatisfying the conditions of Theorem 4.1 may be thought of as a map\np : {1, 2, . . . , n} × {a0, a1} →{0, 1, 2, . . . , n} × {a0, a1} × {L, R}\n(1)\nwhere 1 is the initial state of M, 0 is the halting state, and {2, . . . , n} are the\nother states. The meaning of p(i, ar) = (j, as, L) is that if M is in state i and\nscanning a square containing ar, then its next move is to overwrite ar with\nas, move left on the tape, and go to state j. Likewise p(i, ar) = (j, as, R)\nhas the same effect except that M moves right instead of left. If M reaches\nstate 0, there are no further moves to make, and M halts. As the tape for\nM extends infinitely far to the right but not to the left, M may attempt to\nmove offthe tape to the left. In this case the move is not completed, and\nM crashes.\nThe map p may be thought of as a program. The states are the numbers\nof the instructions, and the instruction, except for instruction number 0,\ntells what to do depending on which letter of the tape alphabet is currently\nbeing scanned. Instruction 0 halts the machine.\nWe take the inputs, I, to be the set of programs p defined above, and\nthe size of p is defined to be the the number of non-halting states (of which\nthere must be at least one); In is the set of programs with n non-halting\n8"},{"page":9,"text":"states. Here is a polynomial time partial algorithm which decides the halting\nproblem.\nAlgorithm 4.2. Input a program p\nRun p until the first time it repeats a state\nIf p halts, say “Yes”\nIf p crashes, say ”No“\nElse loop forever.\nIt would be more informative to say ”Don’t know“ than to loop forever,\nbut accommodating this possibility would slightly complicate the definitions\nin Section 3.3. We have opted for simplicity.\nAlgorithm 4.2 is obviously polynomial time on its domain and clearly\ncorrect. Its domain, D, is the set of programs which either halt or crash\nbefore repeating a state. It remains only to show that D is generic. We\nsketch the argument.\nLet D′ be the the set of programs which crash before repeating a state.\nSince D′ ⊂D, it is enough to show that D′ is generic. We can easily count\nthe number of programs in In, the sphere of radius n; |In| = (4n)2n for\nn ≥1. Thus by Lemma 3.2 we are free to use spherical density, ρ◦instead\nof volume density, ρ.\nConsider the programs in the sphere In. Half of them have L in their\nfirst instruction, and the other half have R. Thus half the programs in In\ncrash immediately, and the other half move right to square 1 and transfer\nfrom state 1 to another state. There are n −1 non-halting states besides\nstate 1. Thus the proportion of programs in In which do not halt or repeat\nstates at the first step is 1\n2 + 1\n2\nn−1\nn+1.\nLet Ck ⊂I be the subset of programs not repeating states or halting\nwithin the first k moves. The preceding discussion shows that ρ◦(C1) = 1.\nFurther analysis yields ρ◦(Ck) = 1 for all k.\nPrograms in Ck move to a new non-halting state for each of their first k\nsteps. At each of these steps half the remaining programs (those which have\nnot previously crashed) move left on the tape and half move right. Thus for\nn > k the proportion of programs in Ck ∩In which do not crash in their\nfirst k steps is the same as the fraction of random walks of length k on the\nintegers which start at 0 and reach only nonnegative numbers. By known\nresults that fraction goes to 0 as k goes to infinity.\nFix ε > 0. If k is large enough, the fraction of random walks of length k\nwhich avoid negative numbers is less than ε. Thus for n > k the proportion\nof programs in Ck ∩In which do not crash in their first k steps is also less\nthan ε. But for n large enough, |Ck ∩In|/|In| > 1 −ε because ρ◦(Ck) = 1.\n9"},{"page":10,"text":"Hence the fraction of programs in In which crash without repeating a state\nis at least (1 −ε)2. Consequently ρ◦(D′) = 1 as desired.\n4.2\nThe Post Correspondence Problem\nThe set of inputs for the Post Correspondence Problem all finite sequences\nof pairs of words (u1, v1) . . . (un, vn), n ≥1, over a fixed finite alphabet\n{a1, . . . , ak}, k ≥2. The output is ”Yes“ if ui1 · · · uim = vi1 · · · vim for some\nsequence of indices of length m ≥1 and ”No“ otherwise. We define In to be\nthe collection of inputs with n pairs of words of length between 1 and n.\nIt is well known that PCP is recursively unsolvable. Nevertheless there\nis a trivial partial algorithm which works well enough to show that PCP is\nstrongly generically polynomial.\nAlgorithm 4.3. Input an instance of the Post Correspondence Problem\nIf for all i, neither ui nor vi is a prefix of the other,say ”No“\nElse loop forever\nFor any solution ui1 · · · uim = vi1 · · · vim it is clear that one of ui1, vi1 is\na prefix of the other. Thus our algorithm never gives a wrong answer.\nTheorem 4.4. The Post Correspondence Problem is strongly generically\npolynomial; that is, it is in SGP.\nProof. The size of In is (1+k+· · ·+kn)2n. If we restrict u1 to be a prefix of vk,\nthen there are at most n + 1 possibilities for u1. Thus the number of inputs\nin In in which u1 is a prefix of v1 is no more than (n+1)(1+k+· · ·+kn)2n−1.\nWe conclude that the number of inputs in In for which some ui is a prefix\nof vi or vice-versa is at most 2n(n + 1)(1 + k + · · · + kn)2n−1. Dividing this\nnumber by |In| yields\n2n(n+1)\n1+k+···+kn, which approaches 0 exponentially fast as\nn goes to infinity.\n4.3\n3-Satisfiability\nSAT has long been known to be easy almost all the time, and there is\nconsiderable experimental evidence that 3-SAT is too [4].\nThus it is no\nsurprise that 3-SAT is generically easy.\nAn instance of 3-SAT, i.e., an input for 3-SAT, is a finite conjunction of\nclauses\n[10′ ∨101 ∨1] ∧[110 ∨11′ ∨111] ∧· · ·\n10"},{"page":11,"text":"where the variables are positive integers written in binary, and ′ denotes\nnegation. The problem is to decide whether or not there is a truth assign-\nment to the variables which makes all the clauses true.\nIf the eight different clauses with variables 1, 10, 11 and their negations\nall appear in the input, then the formula is not satisfiable. Thus the following\npartial algorithm is correct.\nAlgorithm 4.5. Input an instance of 3-SAT\nIf all the clauses with variables 1, 10, 11 occur, say ”No“\nElse loop forever\nTheorem 4.6. 3-SAT is in SGP\nStart with the regular language of clauses\nR = [1(0 + 1)∗(∨+′ ∨)1(0 + 1)∗(∨+′ ∨)1(0 + 1)∗(]+′]).\nInputs for 3-SAT are words in the free submonoid (R∧)∗of Σ∗, and size is\nword length.\nThink of inputs as words over the countable alphabet of clauses.\nTo\nprove Theorem 4.6 it suffices to show that the set of words which omit some\nfixed clause is strongly negligible; for then the set of words omitting any\nof the eight clauses just mentioned will be strongly negligible too. Hence\nAlgorithm 4.5, which searches the input for these clauses, will find them in\nlinear time on a generic set of inputs.\nIn fact the set of words which omit some fixed clause is asymptotically\nnegligible with exponential convergence. Proof of this fact requires a using\nthe Perron Frobenius Theorem to compare maximum eigenvalue for the\nincidence matrix of a finite automaton recognizing R with the maximum\neigenvalue for the incidence matrix of a finite automaton recognizing the\nsublanguage of R which omits the eight clauses.\n5\nDifficult instances\nLet P be a hard problem, say undecidable or NP-complete. The results of\nSection 4 show that difficult instances of P may be rare. Sometimes we want\nto find hard instances. For example consider a cryptosystem based on an\nunderlying computational problem P. The partial algorithms for P may be\nviewed as attacks on C; the hard instances are the good keys.\nHow do we find hard instances? Typical existing descriptions for NP-\ncomplete problems use the notions of parameters and phase-transitions. See\n11"},{"page":12,"text":"for example [4, Section 3] for a discussion of the location of difficult instances\nof 3-SAT. This approach is good for initial analysis, but quite often further\nstudy reveals that the description does not reflect the complexity of the set\nof hard instances of the problem. Our strong belief is that if the problem P\nis algorithmically hard then the set of hard instances cannot be satisfactorily\ndescribed by parameters.\nIn [18] Nancy Lynch showed that if P is a decision problem not in P,\nthen one can construct a recursive subset of inputs, J ⊂I, such that for\nany partial algorithm, A for P and any polynomial p, A succeeds in time\np(n), where n is the size of the input, on only finitely many inputs in J. J\nis called a polynomial complexity core for P.\nLynch’s construction involves enumerating all partial algorithms, so it\nis not practical. In her paper she asks whether certain decision problems\nmight admit a practical construction. As far as we know, none has been\nproposed.\nLynch’s result attracted the interest of many other researchers. See [24]\nfor a recent account of subsequent work. The implications of this work for\nthe theory of generic complexity are not yet known.\n6\nDistributional computational problems\nIn this section we generalize the definition of asymptotic density (Defini-\ntion 3.1) by allowing ensembles {μn} of probability distributions. Each μn is\na probability distribution on the ball Bn (or sphere In.) Balls no longer need\nto be finite, and a subset R ⊂I has volume density α if lim μn(R∩Bn) = α.\nSpherical density is defined similarly. The discussion of generic case com-\nplexity in Section 3 makes sense with the generalized definition of asymptotic\ndensity in place of the original definition. The original definition corresponds\nto the case of uniform distributions on finite balls and spheres. We write ρμ\nand ρ◦\nμ for volume density and spherical density defined with respect to the\nmeasure μ.\nOne source of ensembles {μn} is probability distributions on I. Given a\nprobability distribution, μ, on I, we define μn for each n to be the conditional\nprobability on Bn or In. We assume that μ is atomic, i.e., that μ(x) is defined\nfor every singleton {x}. For any subset R ⊂I, μ(R) = P\nx∈R μ(x).\nDefinition 6.1. A distributional computational problem is a pair (P, μ)\nwhere P is a computational problem and μ is a probability measure on I.\nHere is an example to illustrate how μ might arise in practice. Consider\nthe following search problem from combinatorial group theory. For a fixed\n12"},{"page":13,"text":"finite presentation of a group G, the set of inputs, I, consists of all words (in\nthe generators of G) defining the identity in G. It is required for each w ∈I\nto verify that w does define the identity by constructing a certain kind of\nproof, and a particular procedure is introduced for that purpose. The details\nare not important here, the point is that I is recursively enumerable but need\nnot be recursive. How then are we to define a reasonable stratification in\norder to estimate the generic complexity of our procedure? Stratifying by\nthe length of w is not useful because the resulting Bn’s need not be recursive.\nThe answer [22] is to define a random walk over I which stops at each point\nin I with positive probability and thus induces μ.\n6.1\nAverage case complexity\nAverage case complexity provides a measure of the difficulty of a distribu-\ntional problem. The definition of average case complexity was motivated by\nthe observation that some NP-complete problems admit algorithms which\nseem to run quickly in practice. The idea was to explain this phenomenon\nby showing that although in the maximum running time of an algorithm A\nover all inputs of size n might be very high, the average running time might\nbe much smaller. For this purpose the NP-complete problem was converted\nto a distributional problem by introducing a probability distribution μ on\nthe set of inputs, I.\nAs average case complexity is very similar to generic case complexity,\nwe will discuss the relation between the two in some detail. We begin with\na quick review of average case complexity. We refer the reader to Levin’s\noriginal paper [17], which has been further developed by Gurevich [7] and\nImpagliazzo [12].\nDefinition 6.2. An algorithm A is polynomial time on μ-average if its time\nfunction, TA satisfies TA(x) ≤f(x) for some polynomial on μ-average func-\ntion f. The class of distributional problems decidable in time polynomial\non average is denoted by AvP.\nIt remains to define when a function is polynomial on average. A straight-\nforward definition would be the following.\nDefinition 6.3. A function f : I →R+ is expected polynomial on spheres\n(with respect to an ensemble of spherical distributions {μn}) if there exists\nk ≥1 such that\nZ\nIn\nf(w)μn(w) = O(nk).\n(2)\n13"},{"page":14,"text":"However, in order to obtain closure under addition, multiplication, and\nmultiplication by a scalar we must define a larger class.\nDefinition 6.4 ([17]). A function f : I →R+ is polynomial on μ-average\nif there exists ε > 0 such that\nR\nI(f(x))εσ(x)−1μ(x) < ∞.\nWhich is equivalent to the following.\nDefinition 6.5 ([11]). Let {μn} be an ensemble of volume distributions on\nballs {Bn} of I. A function f : I →R is polynomial on average with respect\nto {μn} if there exists an ε > 0 such that\nR\nBn f ε(x)μn(x) = O(n).\n6.2\nAverage Case vs Generic Case\nAverage case complexity provides a more balanced assessment of the diffi-\nculty of an algorithmic problem than worst-case complexity. Many algorith-\nmic problems, such as the NP-complete Hamiltonian Circuit Problem [9],\nare hard in the worst case but easy on average for reasonable distributions.\nAverage case complexity is very similar to generic case complexity, but\nwe argue that the latter has certain advantages. Generic complexity applies\nto undecidable problems as well as to decidable problems, it is easier to\nemploy than average complexity, and it is a direct measure of the difficulty\nof a problem on most inputs. Average case complexity tells us something\nelse. In [8] Gurevich explains, in terms of a Challenger-Solver game, that\naverage case analysis describes the fraction of hard instances of the problem\nwith respect to a measure of difficulty. In other words to have polynomial\non average time an algorithm should have only a sub-polynomial fraction of\ninputs that require superpolynomial time to compute.\nNow we give some more precise comparisons. Our first observation is that\nAvP and GenP are incomparable; that is, GenP−AvP and AvP−GenP\nboth contain functions. We leave it as an exercise for the reader to verify the\nfirst assertion by constructing a function which is very large on a negligible\nset and small on the complementary generic set. The second part follows\nfrom the next example.\nExample 6.6. Let I = {0, 1}∗. For w ∈I define σ(w) = |w|, the length of\nw, and define μ(w) = 2−2|w|−1. Consider f : I →N defined by F(w) = 2|w|.\nObserve that f ∈AvP by Definition 6.4 with ε < 1, but f /∈GenP.\nHowever, a big chunk of AvP does lie in GenP, namely the functions\nsatisfying Definition 6.3.\n14"},{"page":15,"text":"Proposition 6.7. If a function f : I →R+ is polynomial on μ-average on\nspheres, then f is generically polynomial relative to the asymptotic density\nρμ.\nProof. If f is an expected polynomial then there exists a constant c and\nk ≥1 such that for any n\nZ\nIn\nf\n1\nk (w)μn(w) ≤cn.\nIt follows that for any polynomial q(n)\nμn{x ∈In | f\n1\nk (x) > q(n)cn} ≤1/q(n),\nNow let S(f, q, k) = {x ∈I | f(x) ≥(cq(s(x))s(x))k} be the set of those\ninstances from I on which f(x) is not bounded by (cq(s(x))s(x))k. Then\nμn(In ∩S(f, q, k)) = μn{x ∈In | f\n1\nk (x) > q(n)cn} ≤1/q(n),\ntherefore, the asymptotic density ρμ of S(f, q, k) exists and equal to 0. This\nshows that f is generically bounded by the polynomial (cq(n)n)k.\nProposition 6.7 gives a large class of polynomial on average functions\nwhich are generically polynomial.\nCorollary 6.8. Let A be an algorithm for the distributional problem P. If\nthe expected time of A with respect to the spherical distributions is bounded\nabove by a polynomial then A ∈GenP.\nOn the other hand under some conditions membership in GenP implies\nmembership in AvP. We refer the reader to [16].\nReferences\n[1] A. Blass, Y. Gurevich and S. Shelah, On Polynomial Time Com-\nputation Over Unordered Structures Journal of Symbolic Logic 67\n(2002), 1093-1125.\n[2] A. Bogdanov and L. Trevisan, Average-Case Complexity, Now-\npublishers, 2006.\n[3] Book, Ronald V., and Du, Ding Zhu, The existence and density of\ngeneralized complexity cores. J. Assoc. Comput. Mach. 34 (1987),\nno. 3, 718–730.\n15"},{"page":16,"text":"[4] S. A. Cook and D. G. Mitchell, Finding hard instances of the sat-\nisfiability problem: a survey, in Satisfiability Problem: Theory and\nApplications, D. Du, J. Gu, and P. M. Pardalos, eds., DIMACS\nSeries in Discrete Mathematics and TheoreticalComputer Science,\n35 1997, 1–17.\n[5] S.B.Cooper, Computability Theory, Chapman and Hall/CRC\nMathematics, 2003.\n[6] M. Garey and J. Johnson, Computers and Intractability, A Guide\nto NP-Completeness, W. H. Freeman, 1979\n[7] Y. Gurevich, Average case completeness, J. of Computer and Sys-\ntem Science 42 (1991), 346–398.\n[8] Y. Gurevich, The Challenger-Solver game:\nVariations on the\ntheme of P =?NP, Logic in Computer Science Column, The Bul-\nletin of EATCS, October 1989, p.112-121.\n[9] Y. Gurevich and S. Shelah. Expected computation time for Hamil-\ntonian Path Problem, SIAM J. on Computing 16:3 (1987) p. 486-\n502.\n[10] J.D. Hamkins, A. Miasnikov. The halting problem is decidable on\na set of asymptotic probability one. Notre Dame Journal of Formal\nLogic, 47 (2006), No. 4, 515–524.\n[11] R. Impagliazzo, A personal view of average-case complexity,\nPreprint, 1995.\n[12] R. Impagliazzo, Computational Complexity Since 1980, Springer-\nVerlag Berlin Heidelberg, R. Ramanujam and S. Sen (Eds.):\nFSTTCS 2005, LNCS 3821, 2005, pp. 1947.\n[13] L. Khachiyan, A polynomial algorithm in linear programming.\nDokl. Akad. Nauk SSSR 244 (1979), no. 5, 1093–1096. {English\ntranslation: Soviet Math. Dokl. 20 (1979), no. 1, 191–194.}\n[14] V. Klee and G. Minty, How good is the simplex algorithm? in\nInequalities, III (Proc. Third Sympos., UCLA), 1969, pp. 159–175.\nAcademic Press, New York, 1972.\n[15] I.Kapovich, A.Myasnikov, P.Schupp, V.Shpilrain Generic-case\ncomplexity and decision problems in group theory J. of Algebra,\n264 (2003), 665-694.\n16"},{"page":17,"text":"[16] I. Kapovich, A. Myasnikov, P. Schupp, V. Shpilrain Average-case\ncomplexity for the word and membership problems in group theory.\nAdvances in Mathematics 190 (2005), 343-359.\n[17] L. Levin, Average case complete problems, SIAM Journal of Com-\nputing 15 (1986), 285–286.\n[18] N. Lynch, On reducibility to complex or sparse sets. J. Assoc.\nComput. Mach. 22 (1975), 341–345.\n[19] http://sourceforge.net/projects/magnus\n[20] A. Myasnikov, V. Shpilrain, A. Ushakov, A Practical Attack on a\nBraid Group Based Cryptographic Protocol, in Lecture Notes in\nComputer Science, 3621, Springer Verlag, 2005, 86–96.\n[21] S. Smale, On the average number of steps of the simplex method of\nlinear programming, Mathematical Programming, 27 (1983), pp.\n241–262.\n[22] A. Ushakov, Dissertation, City University of New York, 2005.\n[23] A. M. Vershik, P. V. Sporyshev, An estimate of the average num-\nber of steps in the simplex method, and problems in asymptotic\nintegral geometry. Dokl. Akad. Nauk SSSR 271, No.5, 1044-1048\n(1983). English translation: Sov. Math. Dokl. 28, 195-199 (1983).\n[24] T. Yamakami, T. Suzuki, Resource bounded immunity and sim-\nplicity, Theoret. Comput. Sci. 347 (2005), 90–129.\n17"}]},"section_tree":[],"assets":{"figures":[],"tables":[],"images":[]},"math_expressions":{"inline":[],"block":[{"equation_id":"eq1","equation_number":null,"raw_text":"Definition 2.1. A decision problem is a pair P = (L, I), where I is a","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq2","equation_number":null,"raw_text":"Definition 2.2. A search problem is a pair P = (R, I × J), where I and J","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq3","equation_number":null,"raw_text":"with respect to σ is the function WCA : N →N defined by WCA(n) =","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq4","equation_number":null,"raw_text":"ball of radius n, by Bn = {w | w ∈I, σ(w) ≤n}. A subset R ⊂I is said to","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq5","equation_number":null,"raw_text":"have asymptotic density α, written ρ(R) = α, if limn→∞|R ∩Bn|/|Bn| = α","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq6","equation_number":null,"raw_text":"sphere of radius n is In = {w | w ∈I, σ(w) = n}, that is, the set of inputs","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq7","equation_number":null,"raw_text":"Proof. Set xn = |K ∩Bn| and yn = |Bn|. Then yn < yn+1 for almost all n,","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq8","equation_number":null,"raw_text":"and lim yn = ∞. By Stolz’s theorem","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq9","equation_number":null,"raw_text":"ρ(K) = lim","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq10","equation_number":null,"raw_text":"= lim","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq11","equation_number":null,"raw_text":"= lim","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq12","equation_number":null,"raw_text":"= ρ◦(K).","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq13","equation_number":null,"raw_text":"density ρ(R) exists. The function δR(n) = |R ∩Bn|/|Bn| is called the fre-","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq14","equation_number":null,"raw_text":"the set HA,f = {w ∈I | w ∈HA and TA(w) ≤f(σ(w))} is generic in I. If","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq15","equation_number":null,"raw_text":"other states. The meaning of p(i, ar) = (j, as, L) is that if M is in state i and","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq16","equation_number":null,"raw_text":"as, move left on the tape, and go to state j. Likewise p(i, ar) = (j, as, R)","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq17","equation_number":null,"raw_text":"the number of programs in In, the sphere of radius n; |In| = (4n)2n for","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq18","equation_number":null,"raw_text":"within the first k moves. The preceding discussion shows that ρ◦(C1) = 1.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq19","equation_number":null,"raw_text":"Further analysis yields ρ◦(Ck) = 1 for all k.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq20","equation_number":null,"raw_text":"than ε. But for n large enough, |Ck ∩In|/|In| > 1 −ε because ρ◦(Ck) = 1.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq21","equation_number":null,"raw_text":"is at least (1 −ε)2. Consequently ρ◦(D′) = 1 as desired.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq22","equation_number":null,"raw_text":"{a1, . . . , ak}, k ≥2. The output is ”Yes“ if ui1 · · · uim = vi1 · · · vim for some","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq23","equation_number":null,"raw_text":"For any solution ui1 · · · uim = vi1 · · · vim it is clear that one of ui1, vi1 is","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq24","equation_number":null,"raw_text":"R = [1(0 + 1)∗(∨+′ ∨)1(0 + 1)∗(∨+′ ∨)1(0 + 1)∗(]+′]).","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq25","equation_number":null,"raw_text":"to be finite, and a subset R ⊂I has volume density α if lim μn(R∩Bn) = α.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq26","equation_number":null,"raw_text":"for every singleton {x}. For any subset R ⊂I, μ(R) = P","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq27","equation_number":null,"raw_text":"f(w)μn(w) = O(nk).","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq28","equation_number":null,"raw_text":"Bn f ε(x)μn(x) = O(n).","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq29","equation_number":null,"raw_text":"Example 6.6. Let I = {0, 1}∗. For w ∈I define σ(w) = |w|, the length of","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq30","equation_number":null,"raw_text":"w, and define μ(w) = 2−2|w|−1. Consider f : I →N defined by F(w) = 2|w|.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq31","equation_number":null,"raw_text":"Now let S(f, q, k) = {x ∈I | f(x) ≥(cq(s(x))s(x))k} be the set of those","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq32","equation_number":null,"raw_text":"μn(In ∩S(f, q, k)) = μn{x ∈In | f","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq33","equation_number":null,"raw_text":"theme of P =?NP, Logic in Computer Science Column, The Bul-","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"}],"equation_refs":[]},"symbol_table":[],"references":{"in_text_markers":[],"bibliography":[]},"claims":[],"flow_graph":{"nodes":[],"edges":[]},"quality":{"text_char_count":35135,"parse_confidence":0.5,"equation_parse_rate_proxy":1.0,"citation_resolution_rate_proxy":0.0,"structure_coverage_proxy":0.0,"asset_coverage_proxy":0.0,"accepted_for_training":true}}