Exact and approximate algorithms for permutation problems