powered by
These functions enumerate all candidate solutions for a certain combinatorial optimization problem, e.g., all permutations for a TSP or all Pruefer-codes for a MST problem. Note that the output grows exponentially with the instance size n.
n
enumerateTSP(n)enumerateMST(n)
enumerateMST(n)
[matrix] Each row contains a candidate solution.
matrix
[integer(1)] Instance size.
integer(1)
sols = enumerateTSP(4L) sols = enumerateMST(4L)
Run the code above in your browser using DataLab