  We generalize the concept of randomness in an infinite binary sequence in
order to characterize the degree of randomness by a real number D>0. Chaitin's
halting probability \Omega is generalized to \Omega^D whose degree of
randomness is precisely D. On the basis of this generalization, we consider the
degree of randomness of each point in Euclidean space through its base-two
expansion. It is then shown that the maximum value of such a degree of
randomness provides the Hausdorff dimension of a self-similar set that is
computable in a certain sense. The class of such self-similar sets includes
familiar fractal sets such as the Cantor set, von Koch curve, and Sierpinski
gasket. Knowledge of the property of \Omega^D allows us to show that the
self-similar subset of [0,1] defined by the halting set of a universal
algorithm has a Hausdorff dimension of one.
