On the Hausdorff dimension of Cantor-like sets with overlaps