- Learning Neo4j 3.x(Second Edition)
- Jér?me Baton Rik Van Bruggen
- 297字
- 2021-07-08 09:37:32
Route problems
The original problem that Euler set out to solve in 18th century K?nigsberg was in fact a route planning/pathfinding problem. Today, many graph applications leverage the extraordinary capability of graphs and graph algorithms to calculate--as opposed to finding with trial and error--the optimal route between two nodes on a network. In the following diagram, you will find a simple route planning example as a graph:

A very simple example will be from the domain of logistics. When trying to plan for the best way to move a package from one city to another, one will need the following:
- A list of all routes available between the cities
- The most optimal of the available routes, which depends on various parameters in the network, such as capacity, distance, cost, CO2 exhaust, speed, and so on
This type of operation is a very nice use case for graph algorithms. There are a couple of very well-known algorithms that we can briefly highlight:
- The Dijkstra algorithm: This is one of the best-known algorithms to calculate the shortest weighted path between two points in a graph, using the properties of the edges as weights or costs of that link.
- The A* (A-star) algorithm: This is a variation of Dijkstra's original ideas, but it uses heuristics to more efficiently predict the shortest path explorations. As A* explores potential graph paths, it holds a sorted priority queue of alternate path segments along the way, as it calculates the past path cost and the future path cost of the different options that are possible during the route exploration.
Depending on the required result, the specific dataset, and the speed requirements, different algorithms will yield different returns.
- Spring Cloud Alibaba核心技術(shù)與實戰(zhàn)案例
- Rust實戰(zhàn)
- Responsive Web Design with HTML5 and CSS3
- FFmpeg入門詳解:音視頻原理及應(yīng)用
- Hands-On Natural Language Processing with Python
- PHP 7+MySQL 8動態(tài)網(wǎng)站開發(fā)從入門到精通(視頻教學(xué)版)
- 執(zhí)劍而舞:用代碼創(chuàng)作藝術(shù)
- Instant PHP Web Scraping
- Microsoft 365 Certified Fundamentals MS-900 Exam Guide
- 動手打造深度學(xué)習(xí)框架
- Emotional Intelligence for IT Professionals
- Go語言入門經(jīng)典
- Solr權(quán)威指南(下卷)
- Apache Kafka 1.0 Cookbook
- PHP高性能開發(fā):基礎(chǔ)、框架與項目實戰(zhàn)