Algorithms and strategies for web advertising