We introduce two new combinatorial optimization problems, which are gener-alizations of the Traveling Salesman Problem (TSP) and the Assignment Problem (AP) and which we call Traveling Salesman Problem of Second Order (TSP2) and Assignment Problem of Second Order (AP2). TSP2 is motivated by an important ap-plication in bioinformatics, especially the Permuted Variable Length Markov model. While TSP2 is trivially N P-hard, we show the N P-hardness of AP2 by a reduc-tion from SAT. We propose seven elementary heuristics for the TSP2, some of which are generalizations of similar algorithms for the Traveling Salesman Problem, some of which are new ideas. Furthermore we give four exact algorithms for the TSP2, namely a Branch-and-Bound (BnB) algorithm, an Integer Programming (IP) algorithm, a Branch-and-Cut (BnC) algorithm and an algorithm based on a polynomial reduc-tion to the original TSP (TSP-R). Finally we experimentally compare the algorithms for many different random instances and real instances from the already mentioned application in bioinformatics. Our experiments show that for real instances most heuristics lead to optimal or almost-optimal solutions. For both, random and real classes, our most sophisticated exact approach BnC is the leading algorithm. In par-ticular, the BnC algorithm is able to solve real instances up to size 80 in reasonable time, proving the applicability of this approach.