An enumeration problem P {\displaystyle P} is defined as a relation R {\displaystyle R} over strings of an arbitrary alphabet Σ {\displaystyle \Sigma } :
R ⊆ Σ ∗ × Σ ∗ {\displaystyle R\subseteq \Sigma ^{*}\times \Sigma ^{*}}
An algorithm solves P {\displaystyle P} if for every input x {\displaystyle x} the algorithm produces the (possibly infinite) sequence y {\displaystyle y} such that y {\displaystyle y} has no duplicate and z ∈ y {\displaystyle z\in y} if and only if ( x , z ) ∈ R {\displaystyle (x,z)\in R} . The algorithm should halt if the sequence y {\displaystyle y} is finite.
Enumeration problems have been studied in the context of computational complexity theory, and several complexity classes have been introduced for such problems.
A very general such class is EnumP,1 the class of problems for which the correctness of a possible output can be checked in polynomial time in the input and output. Formally, for such a problem, there must exist an algorithm A which takes as input the problem input x, the candidate output y, and solves the decision problem of whether y is a correct output for the input x, in polynomial time in x and y. For instance, this class contains all problems that amount to enumerating the witnesses of a problem in the class NP.
Other classes that have been defined include the following. In the case of problems that are also in EnumP, these problems are ordered from least to most specific:
The notion of enumeration algorithms is also used in the field of computability theory to define some high complexity classes such as RE, the class of all recursively enumerable problems. This is the class of sets for which there exist an enumeration algorithm that will produce all elements of the set: the algorithm may run forever if the set is infinite, but each solution must be produced by the algorithm after a finite time.
Strozecki, Yann; Mary, Arnaud (2019). "Efficient Enumeration of Solutions Produced by Closure Operations". Discrete Mathematics & Theoretical Computer Science. 21 (3). doi:10.23638/DMTCS-21-3-22. https://dmtcs.episciences.org/5549 ↩
Read, Ronald C.; Tarjan, Robert E. (1975). "Bounds on Backtrack Algorithms for Listing Cycles, Paths, and Spanning Trees". Networks. 5 (3): 237–252. doi:10.1002/net.1975.5.3.237. /wiki/Ronald_C._Read ↩
Hagen, Matthias (2008). Algorithmic and Computational Complexity Issues of MONET. Göttingen: Cuvillier. ISBN 9783736928268. 9783736928268 ↩
Bagan, Guillaume; Durand, Arnaud; Grandjean, Etienne (2007). Duparc, Jacques; Henzinger, Thomas A. (eds.). "On Acyclic Conjunctive Queries and Constant Delay Enumeration". Computer Science Logic. Lecture Notes in Computer Science. 4646. Springer Berlin Heidelberg: 208–222. doi:10.1007/978-3-540-74915-8_18. ISBN 9783540749158. 9783540749158 ↩
Marquis, P.; Darwiche, A. (2002). "A Knowledge Compilation Map". Journal of Artificial Intelligence Research. 17: 229–264. arXiv:1106.1819. doi:10.1613/jair.989. S2CID 9919794. /wiki/ArXiv_(identifier) ↩