Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7001925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:51:52+00:00 2026-05-27T20:51:52+00:00

What is a good algorithm, or class of algorithms that can be used to

  • 0

What is a good algorithm, or class of algorithms that can be used to create a bus route?

I was thinking something along the lines of algorithms that are used to solve the Traveling Salesman, or Hamiltonian path problems, but in truth, neither really addresses the issue of how to move between two stops.

I would like the algorithm to have at least the following characteristics:

  • produces a relatively optimized path (I understand that the problem is probably NP complete, so a good heuristic is fine)
  • Can deal with parts of the path having different weights (eg time to travel over that part of the path)
  • Can be forced to use a given starting and ending point (I don’t think this one will be such a problem)

Code that can do this, or something like this would be appreciated (especially in C#), but a good algorithm by itself would be fine.

Note: While there are many algorithms that can find the shortest path between two points, I do not know the order in which I wish to stop. As such, unless I should be using a combination of two algorithms (which I doubt is the case), those algorithms do not do what I want (if you think that they do, please explain).

Edit: Assume I know all of the stops that need to be made.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:51:52+00:00Added an answer on May 27, 2026 at 8:51 pm

    It seems that a way to do this involves using the Floyd-Warshall algorithm, and then using an algorithm that is used to solve the traveling salesman problem.

    This solves the problem of all the “optional” vertices (the intersections) and the uses the traveling salesman algorithm to determine the order in which the stops should be hit.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for a good algorithm that can give me the unique edges from
What's a good algorithm to solve this problem? I have three groups of people
What's a good algorithm for determining the remaining time for something to complete? I
for a datastructures & algorithms class in college we have to implement an algorithm
For my algorithms class we are required to write a bottoms-up minimal-change algorithm. As
Does anyone have a good algorithm for taking an ordered list of integers, i.e.:
What's a good algorithm for drawing anti-aliased circles? (Filled and not filled.)
Is there a good algorithm to calculate the cartesian product of three seq s
Does anyone have a good algorithm to calculate what date Good Friday falls on
Given a string like this: a,string, with,various,values, and some,quoted What is a good algorithm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.