Learn R Programming

mcMST (version 1.0.1)

enumerateTSP: Enumerate all solution candidates.

Description

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.

Usage

enumerateTSP(n)

enumerateMST(n)

Value

[matrix] Each row contains a candidate solution.

Arguments

n

[integer(1)]
Instance size.

Examples

Run this code
sols = enumerateTSP(4L)
sols = enumerateMST(4L)

Run the code above in your browser using DataLab