최단 경로 알고리즘: 다중 소스, 가장 가까운 목적지 (Shortest-path algorithm: multiple source, closest destination)


문제 설명

최단 경로 알고리즘: 다중 소스, 가장 가까운 목적지 (Shortest‑path algorithm: multiple source, closest destination)

Bellman‑Ford 알고리즘 및 Dijkstra 알고리즘과 같은 알고리즘은 그래프의 단일 시작 정점에서 다른 모든 정점까지의 최단 경로를 찾기 위해 존재합니다. 그들의 다중 소스 버전은 모든 에지를 역전시키고 목적지를 시작 노드로 처리하여 달성할 수 있습니다.

그래프에서 소스의 "중심점", 즉 소스 세트에 "가장 가까운" 정점을 찾기 위해 확장하고 싶습니다. "합의된" 정점에 대한 공정한" 경로.

이를 제공하는 알고리즘이 이미 있습니까? 그들은 무엇입니까?


참조 솔루션

방법 1:

Floyd–Warshall algorithm

I think you want to calculate the "Graph Eccentricity" of the sources (S1,S2,...Sn‑1,Sn).

  1. Use Floyd‑Warshall algorithm to calculate All Pair of Shortest Path in graph.
  2. Find the result node V in graph, which is the min sum of (d[v,S1]+d[v,S2]+d[v,S3]....d[v,Sn‑1]+d[v,Sn])

More Information:

Graph Eccentricity

UPDATE

Maybe finding an existed node v In Graph G(V,E) which the distance to S are all equal is not realistic. You can calculate the Stand Deviation of (d[v,S1],d[v,S2],d[v,S3]....d[v,Sn‑1],d[v,Sn]) between a range that grater or equal than 0 and less than a certain value you choose.

(by Alban Dericbourgshawn)

참조 문서

  1. Shortest‑path algorithm: multiple source, closest destination (CC BY‑SA 2.5/3.0/4.0)

#path-finding #graph #graph-algorithm #algorithm






관련 질문

그리드 셀을 다시 방문하지 않고 그리드에서 가장 긴 경로 (Longest path on a grid, without revisiting grid cells)

Java 경로 지정 foreach 루프 (Java pathing foreach loop)

A* Admissible Heuristic for die rolling on grid (A* Admissible Heuristic for die rolling on grid)

2차원 배열의 타일 연결 알고리즘 (Algorithm for tile connection in a two-dimensional array)

무방향 그래프에서 노드에 대한 최단 경로 찾기 (Finding the shortest path to a node in an undirected graph)

논리적으로 최단 경로 결정 (Logically determine shortest path)

NavMesh로 더 가까운 플레이어 찾기 (Finding the closer player with NavMesh)

최단 경로 알고리즘: 다중 소스, 가장 가까운 목적지 (Shortest-path algorithm: multiple source, closest destination)

절차적으로 생성된 던전에서 AI의 길 찾기를 수정하는 방법은 무엇입니까? (How to fix pathfinding for AI in a procedural generated dungeon?)

NavMeshAgent는 Unity의 대상 지점과 같은 방향을 향합니다. (NavMeshAgent face same direction as destination point in Unity)

여러 차량에 대한 Unity 경로 찾기 (Unity Path Finding for Multiple Vehicles)

걸을 수 있는 타일 위에 있는 장애물 사이의 길 찾기 (Pathfinding between obstacles that sit on top of walkable tiles)







코멘트