Its a form of recommendation system which involves 3 parties (instead of 2). The search engine, the advertiser and the user.
The optimization problem here is have least number of conflicts between these 3 parties while having the most revenue (for SE) , most ROI (for advertisers) and most relevant ads and information (for users).
--Shreejay