Coder Social home page Coder Social logo

episode7's Introduction

Episode 7 - Salesman Traveler

An o(n!) algorithm to travel the globe as fast as possible

Panda Level

  1. Implement your own route for errands around town. Is the algorithm making the same choices you would?
  2. Instead of assuming the first point is your starting point, tell the SalesPerson what their starting point is

Tiger Level

  1. Implement benchmarking code to see how long it will take to calculate for 2, 10, 50, and 200
  2. Sample benchmarking code: http://rubyfiddle.com/riddles/68404

Eagle Level

  1. Implement the "salesperson should log the total miles"
  2. Output the total traveling time (assume 55 mph)

Extra Extra: (This is really out there): Implement the Djikstra algorithm (http://blog.linkedin.com/2008/09/19/implementing-di/) to effmore effective route the network

Show Links

http://www.quora.com/Computational-Complexity-Theory/Is-the-traveling-salesman-problem-solvable http://www.rubygeocoder.com/

Sample Nokogiri Code

require 'nokogiri'
require 'open-uri'
doc = Nokogiri::HTML(open('http://www.texas.gov/en/discover/Pages/topic.aspx?topicid=/government/localgov'))
doc.css(".TGOV_SCRD_Header a").map do |node|
  node.content
end

Copyright: Jesse Wolgamott, MIT License (See LICENSE)

episode7's People

Contributors

jwo avatar blulight avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.