Consider a linear Cantor set
K
K
, which is the attractor of a linear iterated function system (i.f.s.)
S
j
x
=
ρ
j
x
+
b
j
S_{j}x = \rho _{j}x+b_{j}
,
j
=
1
,
…
,
m
j = 1,\ldots ,m
, on the line satisfying the open set condition (where the open set is an interval). It is known that
K
K
has Hausdorff dimension
α
\alpha
given by the equation
∑
j
=
1
m
ρ
j
α
=
1
\sum ^{m}_{j=1} \rho ^{\alpha }_{j} = 1
, and that
H
α
(
K
)
\mathcal {H}_{\alpha }(K)
is finite and positive, where
H
α
\mathcal {H}_{\alpha }
denotes Hausdorff measure of dimension
α
\alpha
. We give an algorithm for computing
H
α
(
K
)
\mathcal {H}_{\alpha }(K)
exactly as the maximum of a finite set of elementary functions of the parameters of the i.f.s. When
ρ
1
=
ρ
m
\rho _{1} = \rho _{m}
(or more generally, if
log
ρ
1
\log \rho _{1}
and
log
ρ
m
\log \rho _{m}
are commensurable), the algorithm also gives an interval
I
I
that maximizes the density
d
(
I
)
=
H
α
(
K
∩
I
)
/
|
I
|
α
d(I) = \mathcal {H}_{\alpha }(K \cap I)/|I|^{\alpha }
. The Hausdorff measure
H
α
(
K
)
\mathcal {H}_{\alpha }(K)
is not a continuous function of the i.f.s. parameters. We also show that given the contraction parameters
ρ
j
\rho _{j}
, it is possible to choose the translation parameters
b
j
b_{j}
in such a way that
H
α
(
K
)
=
|
K
|
α
\mathcal {H}_{\alpha }(K) = |K|^{\alpha }
, so the maximum density is one. Most of the results presented here were discovered through computer experiments, but we give traditional mathematical proofs.