Finding the starting peak for Dijkstra's algorithm?

Imagine that I am implementing a Dijkstra algorithm in a park. There are points and connections between these points; they determine the acceptable paths that the user can walk (for example, sidewalks).

Now imagine that the user is on the grass (i.e. not on the way) and wants to move to another place. The problem is not Dijkstra's algorithm (which works great), the problem is determining the beginning of the vertex.

Here is a picture of the problem: (for now, ignore the dashed lines)

enter image description here

; , . . , . X.

, , (.. ).

- , .

:

  • , .
  • (, ).
  • , , , . ( ). , , .

?


№1:

, , ( ) , . 6 , 6 (.. ). , , .

, , . , , ( ). . ?

: , . , , 3 . , , Dijkstra .
: , 3 , , X , , . (: , . , , ).

, .

.

+4
2

, Dijkstra , .

, "" . , , . , , , , - .

, . , , , , .

, , d (, ) + d (, ) .

, , , , . , , , .

, O ((n + m) log m) . all-pairs shortest path , , , (, ).

, , , persistent BST sweepline.

+1

, , . , () , . , , graph. , Dijkstra , A *, BFS .., .

, A * , , , , () .. , A * - , .

:

x y . , , , .. , . @Niklas B , ( ) . , , (- , ).

, y ( y, ), , x , , . , , .

0

Source: https://habr.com/ru/post/1537806/


All Articles