generation algorithm for Traveling Saleman Problem