Limits of local algorithms