Combinatorial Optimization for Barter Exchange and Tumor Phylogeny Inference