Skip to main content
More descriptive title
Source Link
John L.
  • 39.1k
  • 4
  • 34
  • 91

Run Christofides algorithm (byby hand) with wrong result

I am following this algorithm example: https://en.wikipedia.org/wiki/Christofides_algorithm#example

The graph:

The graph:
enter image description here

Calculate minimum spanning tree T:

Calculate minimum spanning tree T:
enter image description here

Calculate the set of vertices O with odd degree in T

SameCalculate the set of vertices O with odd degree in T. They are the same as "the minimum spanning tree T" as the degree of all vertices are odd.

Form the subgraph of G using only the vertices of O

Form the subgraph of G using only the vertices of O (as all wereare odd, this should give us the original graph): enter image description here

Construct a minimum-weight perfect matching M in this subgraph

Construct a minimum-weight perfect matching M in this subgraph (I am not sure if I did this right) 
enter image description here

Unite matching and spanning tree T ∪ M to form an Eulerian multigraph

Unite matching and spanning tree T ∪ M to form an Eulerian multigraph
enter image description here

This is definitely not right. What went wrong?

What went wrong?

Christofides algorithm (by hand)

I am following this algorithm example: https://en.wikipedia.org/wiki/Christofides_algorithm#example

The graph:

enter image description here

Calculate minimum spanning tree T:

enter image description here

Calculate the set of vertices O with odd degree in T

Same as "the minimum spanning tree T" as the degree of all vertices are odd.

Form the subgraph of G using only the vertices of O

(as all were odd, this should give us the original graph) enter image description here

Construct a minimum-weight perfect matching M in this subgraph

(I am not sure if I did this right) enter image description here

Unite matching and spanning tree T ∪ M to form an Eulerian multigraph

enter image description here

This is definitely not right.

What went wrong?

Run Christofides algorithm by hand with wrong result

I am following this algorithm example: https://en.wikipedia.org/wiki/Christofides_algorithm#example

The graph:
enter image description here

Calculate minimum spanning tree T:
enter image description here

Calculate the set of vertices O with odd degree in T. They are the same as "the minimum spanning tree T" as the degree of all vertices are odd.

Form the subgraph of G using only the vertices of O (as all are odd, this should give us the original graph): enter image description here

Construct a minimum-weight perfect matching M in this subgraph (I am not sure if I did this right) 
enter image description here

Unite matching and spanning tree T ∪ M to form an Eulerian multigraph
enter image description here

This is definitely not right. What went wrong?

Rollback to Revision 1
Source Link
John L.
  • 39.1k
  • 4
  • 34
  • 91

I am following this algorithm example: https://en.wikipedia.org/wiki/Christofides_algorithm#example

The graph:

[![enter image description here][1]][1]enter image description here

Calculate minimum spanning tree T:

[![enter image description here][2]][2]enter image description here

Calculate the set of vertices O with odd degree in T

Same as "the minimum spanning tree T" as the degree of all vertices are odd.

Form the subgraph of G using only the vertices of O

(as all were odd, this should give us the original graph) [![enter image description here][1]][1]enter image description here

Construct a minimum-weight perfect matching M in this subgraph

(I am not sure if I did this right) [![enter image description here][3]][3]enter image description here

Unite matching and spanning tree T ∪ M to form an Eulerian multigraph

[![enter image description here][4]][4]enter image description here

This is definitely not right.

What went wrong?

I am following this algorithm example: https://en.wikipedia.org/wiki/Christofides_algorithm#example

The graph:

[![enter image description here][1]][1]

Calculate minimum spanning tree T:

[![enter image description here][2]][2]

Calculate the set of vertices O with odd degree in T

Same as "the minimum spanning tree T" as the degree of all vertices are odd.

Form the subgraph of G using only the vertices of O

(as all were odd, this should give us the original graph) [![enter image description here][1]][1]

Construct a minimum-weight perfect matching M in this subgraph

(I am not sure if I did this right) [![enter image description here][3]][3]

Unite matching and spanning tree T ∪ M to form an Eulerian multigraph

[![enter image description here][4]][4]

This is definitely not right.

What went wrong?

I am following this algorithm example: https://en.wikipedia.org/wiki/Christofides_algorithm#example

The graph:

enter image description here

Calculate minimum spanning tree T:

enter image description here

Calculate the set of vertices O with odd degree in T

Same as "the minimum spanning tree T" as the degree of all vertices are odd.

Form the subgraph of G using only the vertices of O

(as all were odd, this should give us the original graph) enter image description here

Construct a minimum-weight perfect matching M in this subgraph

(I am not sure if I did this right) enter image description here

Unite matching and spanning tree T ∪ M to form an Eulerian multigraph

enter image description here

This is definitely not right.

What went wrong?

deleted 176 characters in body
Source Link

I am following this algorithm example: https://en.wikipedia.org/wiki/Christofides_algorithm#example

The graph:

enter image description here [![enter image description here][1]][1]

Calculate minimum spanning tree T:

enter image description here [![enter image description here][2]][2]

Calculate the set of vertices O with odd degree in T

Same as "the minimum spanning tree T" as the degree of all vertices are odd.

Form the subgraph of G using only the vertices of O

(as all were odd, this should give us the original graph) enter image description here[![enter image description here][1]][1]

Construct a minimum-weight perfect matching M in this subgraph

(I am not sure if I did this right) enter image description here[![enter image description here][3]][3]

Unite matching and spanning tree T ∪ M to form an Eulerian multigraph

enter image description here [![enter image description here][4]][4]

This is definitely not right.

What went wrong?

I am following this algorithm example: https://en.wikipedia.org/wiki/Christofides_algorithm#example

The graph:

enter image description here

Calculate minimum spanning tree T:

enter image description here

Calculate the set of vertices O with odd degree in T

Same as "the minimum spanning tree T" as the degree of all vertices are odd.

Form the subgraph of G using only the vertices of O

(as all were odd, this should give us the original graph) enter image description here

Construct a minimum-weight perfect matching M in this subgraph

(I am not sure if I did this right) enter image description here

Unite matching and spanning tree T ∪ M to form an Eulerian multigraph

enter image description here

This is definitely not right.

What went wrong?

I am following this algorithm example: https://en.wikipedia.org/wiki/Christofides_algorithm#example

The graph:

[![enter image description here][1]][1]

Calculate minimum spanning tree T:

[![enter image description here][2]][2]

Calculate the set of vertices O with odd degree in T

Same as "the minimum spanning tree T" as the degree of all vertices are odd.

Form the subgraph of G using only the vertices of O

(as all were odd, this should give us the original graph) [![enter image description here][1]][1]

Construct a minimum-weight perfect matching M in this subgraph

(I am not sure if I did this right) [![enter image description here][3]][3]

Unite matching and spanning tree T ∪ M to form an Eulerian multigraph

[![enter image description here][4]][4]

This is definitely not right.

What went wrong?

Tweeted twitter.com/StackCompSci/status/1062631337566318592
Source Link
Loading