Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 35.2-5.md #328

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions C35-Approximation-Algorithms/35.2-5.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# Exercise 35.2-5

***
Suppose that the vertices for an instance of the traveling-salesman problem are points in the plane and that the cost *c(u,v)* is the euclidean distance between points *u* and *v*. Show that an optimaol tour never crosses itself.
Suppose that the vertices for an instance of the traveling-salesman problem are points in the plane and that the cost *c(u,v)* is the euclidean distance between points *u* and *v*. Show that an optimal tour never crosses itself.

## Solution

Cost function based on euclidean distance satisfies the triangle-inequality, s.t.:

``` c(u,v) <= c(u,w) + c(w,v) ```

Assume: The tour corsses itself.
Assume: The tour crosses itself.

Let *(u,v)* and *(w,x)* be corssing edges, *u -> v -> w -> x* the assumed optimal tour and P the crossing point of *(u,v)* and *(w,x)*.
Let *(u,v)* and *(w,x)* be crossing edges, *u -> v -> w -> x* the assumed optimal tour and P the crossing point of *(u,v)* and *(w,x)*.

Based on the triangle-inequality its:
Based on the triangle-inequality it's:
```c(x,v) <= c(x,P) + c(P,v) ```

Thus we can derive:

```c(u,P) + c(P,w) + c(x,P) + c(P,v) + c(u,w) + c(w,v) >= c(u,w) + c(x,v) * c(u,x) + c(w,v)```

Based on our definition its ```c(u,P) + c(P,v) = c(u,v)``` and ```c(x,P) + c(P,w) = c(x,w)```
Based on our definition it's ```c(u,P) + c(P,v) = c(u,v)``` and ```c(x,P) + c(P,w) = c(x,w)```

Therefore its ``` c(u,v) + c(v,w) >= c(u,w) + c(x,v)``` which denotes in combination with (u,x) and (v,w) a shorter tour then the original one. Contradiction. q.e.d
Therefore it's ``` c(u,v) + c(v,w) >= c(u,w) + c(x,v)``` which denotes in combination with (u,x) and (v,w) a shorter tour then the original one. Contradiction. q.e.d