Efficient Algorithms for Global Inference in Internet Marketplaces