Algorithms For Learning And Incentive Design In Societal-Scale Systems