幫我解離散數學程式

3.1: 寫一個程式, 利用產生所有的排列來解決TSP問題
Input: the first line is an integer n, n<=10. In the next n lines, there is an n*n matrix
Output: the minimum cost of the Hamiltonian cycle
3.2: 寫一個程式, 輸入n and r, generate all combinations of choosing r out of n.
1 個解答 1