Optimization in Crowdsourcing