The assignment is to solve the Travelling Salesman Problem using brute force for an arbitrary number of points in 2D space. You must design the total solution using classes for Vertex, Edge, and Path, and you must have a main.cpp which prints out the path for your solution. Solution Answer: Note: vertex and edges are defined in the 2D space array. this is the simple task, usage of classes will make it complicated. C++ code : #include<stdio.h> #include<iostream> using namespace std; int c1 = 0,cost1 = 999; //2D space int graph1[4][4] = { {0, 10, 15, 20}, {10, 0, 35, 25}, {15, 35, 0, 30}, {20, 25, 30, 0} }; //method to swap the value void swapFunc (int *x1, int *y1) { int temp1; temp1 = *x1; *x1 = *y1; *y1 = temp1; } //method to copy the array value void copy_arrayVal(int *a1, int n1) { int i1, sum1 = 0; for(i1 = 0; i1 <= n1; i1++) { sum1 += graph1[a1[i1 % 4]][a1[(i1 + 1) % 4]]; } if (cost1 > sum1) { cost1 = sum1; } } //method to permute the value void permuteVal(int *a1, int i1, int n1) { int j1, k1; if (i1 == n1) { //method to call copy_arrayVal(a1, n1); } else { for (j1 = i1; j1 <= n1; j1++) { //call of functions swapFunc((a1+ i1), (a1 + j1)); permuteVal(a1, i1 + 1, n1); swapFunc((a1+ i1), (a1 + j1)); } } } //main method int main() { int i1, j1; int a1[] = {0, 1, 2, 3}; permuteVal(a1, 0, 3); cout<<\"minimum cost for Path:\"<<cost1<<endl; } .