Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Travelling salesman problem
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
====Conversion to symmetric==== Solving an asymmetric TSP graph can be somewhat complex. The following is a 3Γ3 matrix containing all possible path weights between the nodes ''A'', ''B'' and ''C''. One option is to turn an asymmetric matrix of size ''N'' into a symmetric matrix of size 2''N''.<ref>{{cite journal | last1 = Jonker | first1 = Roy | last2 = Volgenant | first2 = Ton | title = Transforming asymmetric into symmetric traveling salesman problems | journal = [[Operations Research Letters]] | volume = 2 | issue = 161β163| page = 1983 | doi = 10.1016/0167-6377(83)90048-2 | year = 1983 }}</ref> :{| class="wikitable" |- style="text-align:center;" |+ Asymmetric path weights ! !! ''A'' !! ''B'' !! ''C'' |- style="text-align:center;" ! ''A'' | || 1 || 2 |- style="text-align:center;" ! ''B'' | 6 || || 3 |- style="text-align:center;" ! ''C'' | 5 || 4 || |} To double the size, each of the nodes in the graph is duplicated, creating a second ''ghost node'', linked to the original node with a "ghost" edge of very low (possibly negative) weight, here denoted β''w''. (Alternatively, the ghost edges have weight 0, and weight w is added to all other edges.) The original 3Γ3 matrix shown above is visible in the bottom left and the transpose of the original in the top-right. Both copies of the matrix have had their diagonals replaced by the low-cost hop paths, represented by β''w''. In the new graph, no edge directly links original nodes and no edge directly links ghost nodes. :{| class="wikitable" |- style="text-align:center;" class="wikitable" |+ Symmetric path weights ! !! ''A'' !! ''B'' !! ''C'' !! ''A′'' !! ''B′'' !! ''C′'' |- style="text-align:center;" ! ''A'' | || || || β''w'' || 6 || 5 |- style="text-align:center;" ! ''B'' | || || || 1 || β''w'' || 4 |- style="text-align:center;" ! ''C'' | || || || 2 || 3 || β''w'' |- style="text-align:center;" ! ''A′'' | β''w'' || 1 || 2 || || || |- style="text-align:center;" ! ''B′'' | 6 || β''w'' || 3 || || || |- style="text-align:center;" ! ''C′'' | 5 || 4 || β''w'' || || || |} The weight β''w'' of the "ghost" edges linking the ghost nodes to the corresponding original nodes must be low enough to ensure that all ghost edges must belong to any optimal symmetric TSP solution on the new graph (''w'' = 0 is not always low enough). As a consequence, in the optimal symmetric tour, each original node appears next to its ghost node (e.g. a possible path is <math>\scriptstyle{A \to A' \to C \to C' \to B \to B' \to A}</math>), and by merging the original and ghost nodes again we get an (optimal) solution of the original asymmetric problem (in our example, <math>\scriptstyle{A \to C \to B \to A}</math>).
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Travelling salesman problem
(section)
Add topic