Similar Items: Exact and Approximate Algorithms for Polytree Learning