Tag Archives: tsp

TSP in 1-planar graphs

I recently came back from a Dagstuhl I organized with Phil, Claire and Daniel on optimization algorithms for planar graphs.  I think I finally caught up for the week away and sat down this afternoon to think about research.  A problem suggested at the workshop was TSP in 1-planar graphs.  1-planar graphs are those graphs that can be drawn in the plane such that any edge has at most one other edge crossing it.

We have PTASes for TSP in bounded-genus graphs and in particular, these PTASes solve the subset TSP problem wherein you want to find the shortest tour that visits an input subset of vertices.  In general graphs, we would just take the metric completion (create the complete graph on that input subset of vertices where the weight of each edge is the length of the shortest path in the original graph) and solve the problem in that completion.  In planar graphs you could do this, but you would lose planarity.  The subset version is inherently interesting: if you are designing a delivery route, you definitely don’t want to visit every intersection in your region.

One would suppose that for 1-planar graphs, one would also want to give a PTAS for the subset version of the problem.  However, we can argue that isn’t the case.  Take a general graph G and consider any drawing of that graph in the plane.  An edge in this drawing will have any number of other edges crossing it, creating a sequence of crossing points along the edge.  Subdivide this edge by introducing a vertex between every consecutive crossing point and distribute the weight of the original edge among these new edges.  Now you have a 1-planar graph H.  If you could find a (1+eps)-approximate tour that visits the subset of vertices that correspond to the vertices of G, this ordering of vertices would correspond to a (1+eps)-approximate tour in G.  However, metric TSP is APX-hard.  So, there can’t be a PTAS for subset TSP in 1-planar graphs.

There might still be a PTAS for TSP (visiting all the vertices) in 1-planar graphs.  This doesn’t seem as interesting a problem though.

Classroom competition, TSP style

I changed up a few things in my undergraduate algorithms course this year.  I probably wouldn’t have if I wasn’t charged with designing an online version of the same course, one that would be static for at least three years, so far as I understand it.

One major thing that I changed was the assignment component.  This course has always (officially, by way of ABET-geared course learning objectives) included programming assignments.  Something that I abhored.  There was a post by Michael Mitzenmacher that changed my opinion (a bit) on this front. But mostly the thought that non-students would be looking closely at the various components of my course convinced me to take things a bit more seriously.

In previous iterations, I would completely separate “programming” assignments from “non-programming” assignments which is really terrible I know.  So this year I took a 180 and had 4 projects, each geared toward a major topic of the course with design, analysis and implementation/experimental analysis components.  Much better.  (Except for group unfairness woes as mentioned in my previous post.)

For the final project, I left things very open ended.  Design an algorithm to solve (2D Euclidean instances of) TSP.  In class, this allowed me to talk about verifiers (how else would I trust their solutions?), NP, give them a taste of a difficult problem, etc.  The assignment would culminate with a two-step competition. One to solve instances over a period of 24 hours and one to solve instances — live in class — in 4 minutes.  Before the assignment was even released I realized how competitive the students would get, requiring me (a.k.a. our amazing IT guy, Todd Shechter) to set up virtual machines for the competition to ensure fairness.  It was definitely convenient that DIMACS has a large set of instances available with optimal tour lengths listed.  Thank you, experimental algorithms community!

I have to say, I was impressed.  In a stroke of genius, I enforced a 2-page report limit so that I was actually able to easily discern their main techniques.  There were several equivalence classes of algorithms.  Two groups implemented Christofides’ algorithm, and, true to form, it got within 50% of optimal.  I tried hard to keep my impartiality in reading the reports on algorithms by biological metaphor and was pleased to see that my abhorrence played out in algorithms that didn’t do so well.  Several groups that did very well started with some sort of greedily generated tour and then made local changes that improved the tour.  I’d like to highlight the algorithm by Francis Vo and Soo Hyun Yoo, who were the only team to take advantage of the 2D Euclidean-ess of the problem and had an algorithm that outperformed all the others (almost all of the time), solved one of the 4-minute instances to optimality and added fuel to my “take advantage of the domain” banner I love to wave.  They started with a(n almost) convex hull of the points, iteratively added the remaining points to this tour greedily, and cleaned up with local search.  They even animated their algorithm to aid in design:

I will definitely make improvements (the in class competition was a little chaotic and not super interesting for the students who didn’t make into later rounds) but I enjoyed it and I think many of the students did.