Upper and Lower Bounds for the Dictionary Problem