online algorithm competitve ratio proof added