Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shortest path #487

Closed
Shreya2704 opened this issue Oct 28, 2019 · 11 comments
Closed

Shortest path #487

Shreya2704 opened this issue Oct 28, 2019 · 11 comments
Labels
enhancement New feature or request Stale

Comments

@Shreya2704
Copy link

To find the shortest path between 2 cities

@ghost
Copy link

ghost commented Feb 2, 2020

Hi can i take up this issue ?
Plus any specific algortihm you have in mind ?

@ghost
Copy link

ghost commented Feb 3, 2020

hi @Shreya2704 can you verify if the issue is resolved ? I have done a pull request for this ...if you find this solves your problem kindly merge it or if further additions need to be made ,please list them here.

@deadshotsb
Copy link
Member

@Sagnik-Chatterjee Well the Djikstra's algorithm can be used to find a single source shortest path, but as "To find the shortest path between 2 cities", I find it more like applying an all pair Shortest path (floyd warshall algorithm) You may consider adding a dynamic programming approach for that, you may refer to: https://www.geeksforgeeks.org/floyd-warshall-algorithm-dp-16/

@Manavpreeet
Copy link

Can i take this issue ? Let me know if you have any particular choice !

@plongueira
Copy link

plongueira commented May 20, 2020

Maybe use discrete mathematics theory for example directed graphs and weighted graphs could solve the problem (i.e) the distance between 2 cities without a direct connection is unknown so in order to get a close reflect of the reality you could check different paths between those two cities,then adding the weights between each pair of cities from city source to destiny and that'd be all

@deadshotsb
Copy link
Member

@manavpreetsingh Yes sure

@ashwinshaji6679
Copy link

Can I take up this issue

@Panquesito7
Copy link
Member

Can I take up this issue

Thank you for your interest in contributing. 👍
Before submitting a PR, please ensure the following:

  • The algorithm isn't a duplicate in this repository.
  • Make your code as per the repository standards.
  • Ensure that all the automated-tests pass.

I'll look forward to reviewing your pull request as soon as I can. Thanks. 🙂

@HybridDog
Copy link

In practice, e.g. in a car navigation system, the graph is preprocessed so that the distance between two cities can later be queried in e.g. O(sqrt(n) log(n)), which is a lot faster than Dijkstra's algorithm (excluding the preprocessing time).
https://en.wikipedia.org/wiki/Contraction_hierarchies

@Panquesito7 Panquesito7 added the enhancement New feature or request label Oct 7, 2021
@github-actions
Copy link
Contributor

This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Dec 11, 2021
@github-actions
Copy link
Contributor

Please ping one of the maintainers once you add more information and updates here. If this is not the case and you need some help, feel free to ask for help in our Gitter channel or our Discord server. Thank you for your contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Stale
Projects
None yet
Development

No branches or pull requests

7 participants