Generic-case complexity is a subfield of computational complexity theory that studies the complexity of computational problems on "most inputs".
Generic-case complexity is a way of measuring the complexity of a computational problem by neglecting a small set ofunrepresentative inputs and considering worst-case complexity on the rest.Small is defined in terms of asymptotic density.The apparent efficacy of generic case complexity is because for a wide variety of concrete computational problems, the most difficult instances seem to be rare. Typical instances are relatively easy.
This approach to complexity originated in combinatorial group theory, which has a computational tradition going back to the beginning of the last century.The notion of generic complexity was introduced in a 2003 paper,[1] where authors showed that for a large class of finitely generated groups the generic time complexity of some classical decision problems from combinatorial group theory, namely the word problem, conjugacy problem and membership problem, are linear.
A detailed introduction of generic case complexity can be found in the surveys.[2] [3]
Let I be an infinite set of inputs for a computational problem.
Definition 1. A size function on I is a map
\sigma:I\toN
Bn=\{x\inI\mid\sigma(x)\len\}
If the inputs are coded as strings over a finite alphabet, size might be the string length.
Let
\{\mun\}
\mun
Bn
Bn
\mun
Bn
\mun(Bn)=0
Definition 2. The asymptotic density of a subset
X\subsetI
\rho(X)=\limn\mun(X\capBn)
When the balls
Bn
\mun
\rho(X)=\lim
|X\capBn| | |
|Bn| |
.
In this case it is often convenient to use spheres
In=\{x\inI\mid\sigma(x)=n\}
\rho'(X)=\lim
|X\capIn| | |
|In| |
\rho(X)
\rho'(X)
Definition 3
X\subseteqI
\rho(X)=1
\rho(X)=0
A generic subset X is asymptotically large. Whether X appears large in practice dependson how fast
\mun(X\capBn)
Definition 4 An algorithm is in GenP (generically polynomial time) if it never gives incorrect answers and if itgives correct answers in polynomial time on a generic set of inputs. A problem is in GenP if itadmits an algorithm in GenP. Likewise for GenL (generically linear time), GenE (genericallyexponential time with a linear exponent) GenExp (generically exponential time), etc.ExpGenP is the subclass of GenP for which the relevant generic set is exponentially generic.
More generally for any
f:N\toN
Definition 5. An algorithm solves a problem generically if it never gives incorrect answers and if it gives correct answers on a generic set of inputs. A problem is generically solvable if it is solved generically by some algorithm.
The situation for two-sided tape is unknown. However, there is a kind of lower bound for machines of both types.The halting problem is not in ExpGenP for any model of Turing machine,[9] [10]
The decision problem for Presburger arithmetic admits a double exponential worst case lower bound[11] and a triple exponential worst case upper bound. The generic complexity is not known, but it is known that the problem is not in ExpGenP.[12]
As it is well known that NP-complete problems can be easy on average, it is not a surprise that several of them are generically easy too.
There is a generic complexity version of a one-way function[14] which yields the same class of functions but allows one to consider different security assumptions than usual.
A series of articles[15] [16] [17] is devoted to cryptanalysis of the Anshel–Anshel–Goldfeld key exchange protocol, whose security is based on assumptions about the braid group. This series culminates in Miasnikov and Ushakov (2008)[18] which applies techniques from generic case complexity to obtain a complete analysis of the length based attack and the conditions under which it works. The generic point of view also suggests a kind of new attack called the quotient attack, and a more secure version of the Anshel–Anshel–Goldfeld protocol.
N
\{0,1\}
Theorem 1[19] Let I be the set of all Turing machines. If F is a subset of the set of allpartial computable function from
N
Theorem 2 The set of formal languages which are generically computable has measure zero.
Theorem 3 There is an infinite hierarchy of generic complexity classes. More precisely for a proper complexity function f,
Gen(f)\subsetneqGen(f3)
The next theorem shows that just as there are average case complete problems within distributional NP problems, there are also generic case complete problems. The arguments in the generic case are similar to those in the average case, and the generic case complete problem is also average case complete. It is the distributional bounded halting problem.
Theorem 4 There is a notion of generic-polynomial-time reduction with respect to which the distributional bounded halting problem is complete within class of distributional NP problems.
Meyer and Paterson[20] define an algorithm to be almost polynomial time, or APT, if it haltswithin p(n) steps on all but p(n) inputs of size n. Clearly, APT algorithms are included in our class GenP. We have seen several NP complete problems in GenP, but Meyer and Paterson show that this is not the case for APT. They prove that an NP complete problem is reducible to a problem in APT if and only if P = NP. Thus APT seems much more restrictive than GenP.
Generic case complexity is similar to average-case complexity. However, there are some significant differences.Generic case complexity is a direct measure of the performance of an algorithm on most inputs while average case complexitygives a measure of the balance between easy and difficult instances. In addition Generic-case complexity naturally applies to undecidable problems.
Suppose
l{A}
T:I\toN
\mu
l{A}
Example 1 Let I be the set of all words over
\{0,1\}
\sigma(w)
|w|
In
\mun
In
2n | |
T(w)=2 |
In this example T is certainly polynomial on typical inputs, but T is not polynomial on average. T is in GenP.
Example 2 Keep I and
\sigma(w)=|w|
\mu(w)=2-2|w|-1
T(w)=2|w|
In these two examples the generic complexity is more closely related to behavior on typical inputs than average case complexity. Average case complexity measures something else: the balance between the frequency of difficult instances and the degree of difficulty.[21] [22] Roughly speaking an algorithm which is polynomial time on average can have only a subpolynomial fraction of inputs that require superpolynomial time to compute.
Nevertheless, in some cases generic and average case complexity are quite close to each other.A function
f:I → R+
\mu
k\geq1
\sum | |
w\inIn |
f1/k(w)\mun(w)=O(n)
\{\mun\}
\mu
\mu
\mu
Theorem 5 If a function
f:I → R+
\mu
\rho'
Theorem 6 Suppose a complete algorithm
l{A}
l{B}
\{\mun\}
\mu
l{A}
\mu
In a 2006 paper, Bogdanov and Trevisan came close to defining generic case complexity.[24] Instead of partial algorithms, they consider so-called errorless heuristic algorithms. These arecomplete algorithms which may fail by halting with output "?". The class AvgnegP is definedto consist of all errorless heuristic algorithms A which run in polynomial time and for which theprobability of failure on
In