Let (X, d) be a metric space with a subset S ⊆ X and let s ≥ 0 be a real number. The s-dimensional packing pre-measure of S is defined to be
Unfortunately, this is just a pre-measure and not a true measure on subsets of X, as can be seen by considering dense, countable subsets. However, the pre-measure leads to a bona fide measure: the s-dimensional packing measure of S is defined to be
i.e., the packing measure of S is the infimum of the packing pre-measures of countable covers of S.
Having done this, the packing dimension dimP(S) of S is defined analogously to the Hausdorff dimension:
An example
The following example is the simplest situation where Hausdorff and packing dimensions may differ.
Fix a sequence such that and . Define inductively a nested sequence of compact subsets of the real line as follows: Let . For each connected component of (which will necessarily be an interval of length ), delete the middle interval of length , obtaining two intervals of length , which will be taken as connected components of . Next, define . Then is topologically a Cantor set (i.e., a compact totally disconnected perfect space). For example, will be the usual middle-thirds Cantor set if .
It is possible to show that the Hausdorff and the packing dimensions of the set are given respectively by:
It follows easily that given numbers , one can choose a sequence as above such that the associated (topological) Cantor set has Hausdorff dimension and packing dimension .
Generalizations
One can consider dimension functions more general than "diameter to the s": for any function h : [0, +∞) → [0, +∞], let the packing pre-measure of S with dimension function h be given by
and define the packing measure of S with dimension function h by
The function h is said to be an exact (packing) dimension function for S if Ph(S) is both finite and strictly positive.