Oxbridges of Konigsberg
Feb. 11th, 2009 04:28 pmA challenge for the cartographically minded among my readers:
What's the most efficient route for visiting all Oxford's colleges?
Method of transport: bicycle. No other restrictions except that you must pass the lodge of each college. Doubling back on yourself is allowed (despite the title of the post!).
A reminder of the location of all the Colleges can be seen on this hopefully accurate map from the University website.
ETA:
I do realise this is a hard problem (Owen says it may even be an NP-hard problem) but thought it might've been the sort of thing that you clever people had already done... like the "visit all the underground stations in a day" challenge, kind of thing...
What's the most efficient route for visiting all Oxford's colleges?
Method of transport: bicycle. No other restrictions except that you must pass the lodge of each college. Doubling back on yourself is allowed (despite the title of the post!).
A reminder of the location of all the Colleges can be seen on this hopefully accurate map from the University website.
ETA:
I do realise this is a hard problem (Owen says it may even be an NP-hard problem) but thought it might've been the sort of thing that you clever people had already done... like the "visit all the underground stations in a day" challenge, kind of thing...
no subject
Date: 2009-02-11 04:47 pm (UTC)no subject
Date: 2009-02-11 05:01 pm (UTC)no subject
Date: 2009-02-11 05:07 pm (UTC)no subject
Date: 2009-02-11 05:09 pm (UTC)It's O(1) in space, O(e^N) in salesmen and, I guess O(N)-ish in time (actually, I could probably argue for O(e^N) in space, as each salesman will require dedicated storage).
no subject
Date: 2009-02-11 05:17 pm (UTC)no subject
Date: 2009-02-11 05:37 pm (UTC)no subject
Date: 2009-02-11 05:38 pm (UTC)no subject
Date: 2009-02-11 06:15 pm (UTC)no subject
Date: 2009-02-11 06:26 pm (UTC)Do the halls count?
no subject
Date: 2009-02-11 07:02 pm (UTC)no subject
Date: 2009-02-11 07:08 pm (UTC)Also, I wouldn't trust someone who was being paid by time/distance to take me on the shortest/quickest route!
no subject
Date: 2009-02-11 07:10 pm (UTC)So, er, quickest, probably, but I'm open to other interpretations. :-}
no subject
Date: 2009-02-11 07:10 pm (UTC)no subject
Date: 2009-02-11 07:11 pm (UTC)no subject
Date: 2009-02-11 07:12 pm (UTC)NB imagine you're explaining it to somebody who didn't do any maths beyond GCSE, because that's precisely what you'll be doing. :-}
no subject
Date: 2009-02-11 07:21 pm (UTC)no subject
Date: 2009-02-11 07:25 pm (UTC)no subject
Date: 2009-02-11 07:29 pm (UTC)http://en.wikipedia.org/wiki/File:6n-graf.svg
So there's a road (edge) from college 6 to college 4, and a road from college 4 to college 5. There's no direct road between 3 and 5, but you can get there going indirectly. A weighted graph is that, with the distance between each college provided as a weight.
So what you're being asked for is basically: "Can you draw me a map with all the allowable cycle routes on, and the distance of each bit?"
no subject
Date: 2009-02-11 07:30 pm (UTC)It wasn't every college I had to go to but it does take Too Long. I think that after Catz I took a rough anticlockwise circuit of the city walls, before heading towards St Hilda's.
no subject
Date: 2009-02-11 07:36 pm (UTC)no subject
Date: 2009-02-11 08:09 pm (UTC)First, make all of the colleges into dots (or nodes).
Second, draw lines between all the dots (or edges) - these represent the possible paths you'd go on your bike between the colleges so if there is more than one way to get between two colleges, you can draw two lines.
Third, put a number (the weight) onto each edge - this number represents the time in minutes (or seconds, whatever) it takes to travel each edge. Obv if you have two edges between the same two nodes, the one with the lowest figure is going to be the one you want if you're trying to do a shortest route thing, and you can get rid of the lengthy ones.
Once you've converted Oxford into this sort of abstract map, you can do lots of horrendous calculations on it! Or better yet, get your computer to do them for you!
no subject
Date: 2009-02-11 08:15 pm (UTC)no subject
Date: 2009-02-11 08:17 pm (UTC)no subject
Date: 2009-02-11 10:18 pm (UTC)no subject
Date: 2009-02-11 10:34 pm (UTC)What you do now is give the participants a GPS each and get them to walk their chosen route, collecting stamps from the porters of each college they visit. Once they have all the stamps, they use the GPS to find out how far they've walked. At the end, take the route of the person who claims the shortest distance, walk it again and check they haven't cheated. It's not proven to be correct, but it's a good first estimate.
This acceptance of rough and ready answers may make me a physicist.
no subject
Date: 2009-02-11 10:50 pm (UTC)To get from the Oxford Colleges problem to the TSP, one merely needs to draw a map of Oxford annotated with cycling times for each section of road/path and apply the all-pairs shortest path algorithm (http://en.wikipedia.org/wiki/Floyd-Warshall_algorithm) (which is comparatively trivial).
no subject
Date: 2009-02-11 10:55 pm (UTC)I was thinking that it might be worth asking someone from the university messenger service, as presumably they have to do something along these lines. Or do they split the job between several people, too?
no subject
Date: 2009-02-11 10:58 pm (UTC)no subject
Date: 2009-02-11 11:01 pm (UTC)So how long did it take -- or rather how long do you reckon it would take an average cyclist -- to get round all/most of them?
no subject
Date: 2009-02-11 11:04 pm (UTC)quite excitingcycling.no subject
Date: 2009-02-12 06:04 am (UTC)Probably the easiest way to do it would be to propose it as a challenge in a letter to the OxStu and the Cherwell offering a very small prize and let the geekocracy puzzle it out; it could rattle on for weeks in the lettercol and percolate through to the newsgroups...
no subject
Date: 2009-02-12 07:06 am (UTC)no subject
Date: 2009-02-12 09:47 am (UTC)no subject
Date: 2009-02-12 10:40 am (UTC)no subject
Date: 2009-02-12 10:57 am (UTC)