Just as Lebesgue measure gives a method to quantify the size of subsets of the Euclidean space
, resource bounded measure gives a method to classify the size of subsets of complexity classes.
For instance, computer scientists generally believe that the complexity class P (the set of all decision problems solvable in polynomial time) is not equal to the complexity class NP (the set of all decision problems checkable, but not necessarily solvable, in polynomial time).
Here, p-measure is a generalization of Lebesgue measure to subsets of the complexity class E, in which P is contained.
We may also view a language (a set of binary strings) as an infinite binary sequence, by setting the nth bit of the sequence to 1 if and only if the nth binary string (in lexicographical order) is contained in the language.
However, since each computable complexity class contains only a countable number of elements(because the number of computable languages is countable), each complexity class has Lebesgue measure 0.
Thus, to do measure theory inside of complexity classes, we must define an alternative measure that works meaningfully on countable sets of infinite sequences.
For this measure to be meaningful, it should reflect something about the underlying definition of each complexity class; namely, that they are defined by computational problems that can be solved within a given resource bound.
The foundation of resource-bounded measure is Ville's formulation of martingales.
such that, for all finite strings w, (This is Ville's original definition of a martingale, later extended by Joseph Leo Doob.)
Intuitively, a martingale is a gambler that starts with some finite amount of money (say, one dollar).
For a martingale d, d(w) represents the amount of money d has after reading the string w. Although the definition of a martingale has the martingale calculating how much money it will have, rather than calculating what bets to place, because of the constrained nature of the game, knowledge the values d(w), d(w0), and d(w1) suffices to calculate the bets that d placed on 0 and 1 after seeing the string w. The fact that the martingale is a function that takes as input the string seen so far means that the bets placed are solely a function of the bits already read; no other information may affect the bets (other information being the so-called filtration in the generalized theory of martingales).
The key result relating measure to martingales is Ville's observation that a set
To extend this type of measure to complexity classes, Lutz considered restricting the computational power of the martingale.