  Kolmogorov complexity measures the algorithmic complexity of a finite binary
string $\sigma$ in terms of the length of the shortest description $\sigma^*$
of $\sigma$. Traditionally, the length of a string is taken to measure the
amount of information contained in the string. However, we may also view the
length of $\sigma$ as a measure of the cost of producing $\sigma$, which
permits one to generalize the notion of length, wherein the cost of producing a
0 or a 1 can vary in some prescribed manner.
  In this article, we initiate the study of this generalization of length based
on the above information cost interpretation. We also modify the definition of
Kolmogorov complexity to use such generalized length functions instead of
standard length. We further investigate conditions under which the notion of
complexity defined in terms of a given generalized length function preserves
some essential properties of Kolmogorov complexity. We focus on a specific
class of generalized length functions that are intimately related to a specific
subcollection of Bernoulli $p$-measures, namely those corresponding to the
unique computable real $p\in(0,1)$ such that $p^k=1-p$, for integers $k\geq 1$.
We then study randomness with respect to such measures, by proving a
generalization version of the classic Levin-Schnorr theorem that involves
$k$-length functions and then proving subsequent results that involve effective
dimension and entropy.
