Algorithm Design: Foundations, Analysis, and Internet Examples