Polynomial Time Solution of Travelling Salesman Problem

Denotes an edge count' of the vertex 'a'. An 'edge count' is the number of edges attached to a vertex. For eg:in [a,b,c] , ec[a]=1, ec[b]=2 and ec[c]=1. Here the edge count of [b] is 2 since there are 2 edges attached to vertex 'b'. ec[a]=1 , because there is only one edge attached to vertex 'a'. In a partial circuit, the edge count of each vertex should be less than or equal to 2, to satisfy the criterion of a Hamilton circuit, when the partial circuit is used to form the Hamilton circuit in the end of the process.

The square brackets denote a partial circuit. A partial circuit is a graph in which any vertex of the graph is joined to another vertex by only a single edge. The partial circuit may be empty or it may consists of vertices or both vertices and edges.
[a] ::-Denotes a partial circuit containing a single vertex or it denotes a single vertex. Here it denotes a partial circuit containing a vertex named 'a'.
[a,b] ::-Denotes that vertex 'a' is joined to vertex 'b' or that there is an edge which joins vertex 'a' with vertex 'b'. Here each vertex is separated by a comma.
[a,b,c] ::-Denotes that vertex 'a' is joined to vertex 'b' and vertex 'b' is joined to vertex 'c'.
So in the '[]' notation, any number of vertices (each vertex separtated by comma) can be written.
[a,b,c,a] ::-Denotes a partial circuit in which it is also a hamilton circuit, because here vertex 'a' is joined to vertex 'b' and vertex 'b' is joined to vertex 'c' and vertex 'c' is joined to vertex 'a'. This partial circuit can also be written as  [c]=1. Here the edge count of [b] is 2 since there are 2 edges attached to vertex 'b'. ec[a]=1 , because there is only one edge attached to vertex 'a'. In a partial circuit, the edge count of each vertex should be less than or equal to 2, to satisfy the criterion of a Hamilton circuit, when the partial circuit is used to form the Hamilton circuit in the end of the process. This means a 'combination' of 'n' number of edges taken 'r' at a time. Here 'n' and 'r' are numbers. This 'combination' is the same combination that is there in mathematics. Here C(n,r)=n!/(r!*(n-r)!)

Examples
Below are given some examples for describing properties of joining of partial circuits. a) Two partial circuits are [a,b,c] and [b,d,c]. When these two partial circuits are joined, [b,c] of [a,b,c] can be replaced by [b,d,c]. Since one more vertex'd' is added, the edge count of each vertex is not violated (ie:-the edge count of each vertex is less than or equal to 2 ). So the joined partial circuit becomes [a,b,d,c]  . These two partial circuits cannot be joined at the common vertex 'b', since if the two partial circuits are joined, it would violate the edge count of vertex 'b' ie:-the edge count of vertex 'b' would be 3 after joining the partial circuits. e) Two partial circuits are [a,b,c] and [c,b,d]. These two partial circuits cannot be joined at the common edge [b,c], because if the two partial circuits are joined, it would violate the edge count of vertex 'b' ie:-the edge count of vertex 'b' would be 3 after joining the partial circuits.

Example 1
This example is taken from the Book "Elements of Discrete Mathematics" by C.L.Liu. The solution for the example is got in the process described from Section #1.1 to Section #1.9. In this section, the weights of the different edges connected to the different vertices of a 5 vertex graph are shown. The 5 vertex graph is the example taken from the book "Elements of discrete mathematics".
In this section a combination of the edges ( the edges are taken from Section #1.1 ) connected to a particular vertex is taken. For eg:-there are four edges connected to vertex a. So the number of combinations of the four edges connected to 'vertex a' by taking two edges at a time is C(4,2)=4!/((4-2)!*2!)=6. In this section, in order to choose a partial circuit (or the order of which vertex to choose from) is given by the order in Section #1.6. So the order is as follows ie:-vertex a, vertex b , vertex c, vertex d, vertex e.  Now from Section #1.7, take a partial circuit from each vertex (the order of the vertex to be taken, should be the same order in which the vertices are written in Section #1.7) and join them together in order to form a hamilton circuit. The process is as follows:- The Hamilton circuit was obtained, and to know if it is the minimum circuit, checking is needed if any lower partial circuits which have been bypassed will form lesser weight Hamilton circuits. To know which all are the lesser weight partial circuits, the next section ( ie:-Section #1.9 ) onwards shows the lesser weight partial circuits.
Group the partial circuits of the different vertices present in Section #1.7 into one group and then sort it. So first grouping the partial circuits, we obtain as below:-   [c,d,a] has to be taken as a necessary partial circuit and then the same process that occurred in Section #1.8 has to be done. 'Necessary partial circuit' means that [c,d,a] should be used as the first partial circuit for finding the hamilton circuit. . Also the lowest weight of the Hamilton circuit obtained in Section #1.8 is also 37. So the Hamilton circuit obtained in Section #1.8 or in Section #1.10 with lowest weight of "37" is taken as the minimum weight Hamilton circuit. Section #1.10 (END)

Example 2
This example is taken from "Section 3.4" of the Book "A First Look at Graph Theory" by John Clark and Derek Allan Holton. The solution for the example is got in the process described from Section #2.1 to Section #2.8. "Example 2" is solved in the same way as "Example 1" was solved. In this section a combination of the edges connected to a particular vertex is taken. For eg:-there are five edges connected to vertex b. So the number of combinations of the five edges connected to 'vertex b' by taking two edges at a time is C(5,2)=5!/((5-2)!*2!)=10.
Also the weights of the partial circuits of a particular vertex are also written to the right of the partial circuits.
[ In this section, the partial circuits under each vertex are sorted in 'Ascending order' according to their weights.
Vertex v (sorted)  Vertex v (sorted) Now from Section #2.6, take a partial circuit from each vertex (the order of the vertex to be taken, should be the same order in which the vertices are written in Section #2.6) and join them together in order to form a hamilton circuit. The process is as follows:- The hamilton circuit was obtained, and to know if it is the minimum weight hamilton circuit, checking is needed to see if any lower partial circuits which have been bypassed will form lesser weight hamilton circuits. To know which all are the lesser weight partial circuits, the next section ( ie:-Section #2.8 ) onwards shows the lesser weight partial circuits.
Section #2.7 (END) Section #2.8 (BEGIN) Group the partial circuits of the different vertices present in Section #2.6 into one group and then sort it. So first grouping the partial circuits, we obtain as below:- [ Now sort the group obtained in Section #2.8 according to their weights. The sorted list of the different partial circuits is as follows.