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)
; , . . , . X.
, , (.. ).
- , .
:
?
№1:
, , ( ) , . 6 , 6 (.. ). , , .
, , . , , ( ). . ?
: , . , , 3 . , , Dijkstra .: , 3 , , X , , . (: , . , , ).
, .
.
, Dijkstra , .
, "" . , , . , , , , - .
, . , , , , .
, , d (, ) + d (, ) .
, , , , . , , , .
, O ((n + m) log m) . all-pairs shortest path , , , (, ).
, , , persistent BST sweepline.
, , . , () , . , , graph. , Dijkstra , A *, BFS .., .
, A * , , , , () .. , A * - , .
x y . , , , .. , . @Niklas B , ( ) . , , (- , ).
x
y
, y ( y, ), , x , , . , , .
Source: https://habr.com/ru/post/1537806/More articles:How to avoid value errors when using numpy.random.multinomial? - pythonMule + ZenDesk: error message: "null (java.lang.UnsupportedOperationException). The message payload is of the type: ZendeskConnector $ 1" - muleHow can I create an executable, immutable array in JavaScript? - javascriptSource Code for Mule ZenDesk Connector? - javaChains of dependent types and their instances when they have different parameter lists in Scala - scalaWhat is the Java translation process? - javaКак найти лицо, содержащее предопределенную точку, когда у меня есть плоский граф, встроенный в плоскость - c++Windows screen recording detection using .NET. - c #Screen Tracking in a Windows Application - c #Expand aliases in non-interactive shells - zshAll Articles