Learning Theory and Algorithms for Auctioning and Adaptation Problems