Budget constraints and optimization in sponsored search auctions