proof for lower bound of algorithm