@@ -0,0 +1,793 @@
+class OptimalTSP %7B%0A%0A%09public static void main(String%5B%5D args) %7B%0A    try %7B%0A      checkErrorConditions(args);%0A    %7D catch (IllegalArgumentException e) %7B%0A      System.out.println(e.getMessage());%0A    %7D%0A%09%7D%0A%0A  private static void checkErrorConditions(String%5B%5D args) throws IllegalArgumentException %7B%0A    if (args.length != 2) %7B%0A      throw new IllegalArgumentException(%22Usage: java OptimalTSP n seed%22);%0A    %7D%0A%0A    for (int i = 0; i %3C 2; i++) %7B%0A      try %7B%0A        Integer.parseInt(args%5Bi%5D);%0A      %7D catch (NumberFormatException e) %7B%0A        throw new IllegalArgumentException(%22Command line args must be integers%22);%0A      %7D%0A    %7D%0A%0A    Integer n = Integer.parseInt(args%5B0%5D);%0A    if (n %3C 1 %7C%7C n %3E 13) %7B%0A      throw new IllegalArgumentException(%22Number of vertices must be between 1 and 13%22);%0A    %7D%0A  %7D%0A%7D

check for error conditions