Skip to content

Instantly share code, notes, and snippets.

@MrTrick
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MrTrick/aabdbb9ae8afb1f108b2 to your computer and use it in GitHub Desktop.
Save MrTrick/aabdbb9ae8afb1f108b2 to your computer and use it in GitHub Desktop.
Travelling MrTrick Problem

I'd like to embark on a walking tour of Sydney's light rail stations.
I want to visit 10 stations then return back to the place I started.
I won't actually be catching any services! I just want to admire each station's amenities.

However, there's a certain set of rules I must follow:

  1. I will be starting and ending at the corner of Thomas St & Jones St; https://goo.gl/maps/jgar0
  2. A station can be visited any number of times, or never!
  3. After visiting an odd station (the 1st, 3rd, 5th, 7th, 9th), I can visit any station next. (even)
  4. After visiting an even station (the 2nd, 4th, 6th, 8th), the next (odd) station must be at least THREE stops away.

For an example of rules 3 & 4:

  • I can travel: Wentworth Park Light Rail (1st), Fish Market Light Rail (2nd), Pyrmont Bay Light Rail (3rd), ...
  • I cannot travel: Wentworth Park Light Rail (1st), Fish Market Light Rail (2nd), The Star Light Rail (3rd), ... because The Star is only TWO stops away from Fish Market.

The BEST route will be the shortest according to Google's walking directions.
For instance, the first three trips might be; https://goo.gl/maps/X3USN

  • You can add a station to the list by clicking on '+' (Add Destination) under the list of stations, then clicking on a station.
  • You can remove a station from the list by hovering over its entry and clicking on 'x' (Remove this destination).

What is the best route?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment