Download Shortest path problem

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Instanton wikipedia , lookup

Algebraic geometry wikipedia , lookup

Geodesics on an ellipsoid wikipedia , lookup

Steinitz's theorem wikipedia , lookup

Planar separator theorem wikipedia , lookup

Signed graph wikipedia , lookup

Geometrization conjecture wikipedia , lookup

Line (geometry) wikipedia , lookup

Euclidean geometry wikipedia , lookup

History of geometry wikipedia , lookup

Transcript
1
Numerical geometry of non-rigid shapes Shortest path problems
Shortest path problems
Lecture 2
© Alexander & Michael Bronstein
tosca.cs.technion.ac.il/book
Numerical geometry of non-rigid shapes
Stanford University, Winter 2009
2
Numerical geometry of non-rigid shapes Shortest path problems
How to compute the intrinsic metric?
 So far, we represented
itself.
 Our model of non-rigid shapes as metric spaces
involves
the intrinsic metric
 Sampling procedure requires
as well.
 We need a tool to compute geodesic distances on
.
3
Numerical geometry of non-rigid shapes Shortest path problems
Shortest path problem
Brussels
183
Paris
346
943
566
Prague
504
1542
407
902
285
Bern
194
271 Munich
1146
Vienna
4
Numerical geometry of non-rigid shapes Shortest path problems
Shapes as graphs
 Sample the shape at
vertices
 Represent shape as an undirected graph

set of edges
representing adjacent vertices.
 Define length function
measuring local distances as
Euclidean ones,
.
Numerical geometry of non-rigid shapes Shortest path problems
Shapes as graphs
 Path between
where
is an ordered set of connected edges
and
.
 Path length = sum of edge lengths
5
6
Numerical geometry of non-rigid shapes Shortest path problems
Geodesic distance
 Shortest path between
 Length metric in graph
 Approximates the geodesic distance
 Shortest path problem: compute
between any
and
.
 Alternatively: given a source point
distance map
on the shape.
, compute the
.
7
Numerical geometry of non-rigid shapes Shortest path problems
Bellman’s principle of optimality
 Let
be shortest path between
and
 Then,
a point on the path.
and
are
shortest sub-paths between
, and
.
Richard Bellman
(1920-1984)
 Suppose there exists a shorter path
 Contradiction to
.
being shortest path.
8
Numerical geometry of non-rigid shapes Shortest path problems
Dynamic programming
 How to compute the shortest path between source
 Bellman principle: there exists

has to minimize path length
 Recursive dynamic programming equation.
such that
and
on
?
Numerical geometry of non-rigid shapes Shortest path problems
Edsger Wybe Dijkstra (1930–2002)
[‘ɛtsxər ‘wibə ‘dɛɪkstra]
9
10
Numerical geometry of non-rigid shapes Shortest path problems
Dijkstra’s algorithm
 Initialize
and
for the rest of the graph;
Initialize queue of unprocessed vertices
.
 While
 Find vertex with smallest value of
,
 For each unprocessed adjacent vertex
 Remove
from
 Return distance map
,
.
.
11
Numerical geometry of non-rigid shapes Shortest path problems
Dijkstra’s algorithm
Brussels
183

566
183
Paris
Prague

749
0
407
504
346
194
271
346

Bern
617
679

Munich
285

904
Vienna
12
Numerical geometry of non-rigid shapes Shortest path problems
Dijkstra’s algorithm – complexity
 While there are still unprocessed vertices
 Find and remove minimum
 For each unprocessed adjacent vertex
 Perform update
 Every vertex is processed exactly once:
outer iterations.
 Minimum extraction straightforward complexity:
 Can be reduced to
using binary or Fibonacci heap.
 Updating adjacent vertices is in general
.
 In our case, graph is sparsely connected, update in
.
 Total complexity:
.
Numerical geometry of non-rigid shapes Shortest path problems
Troubles with the metric
 Grid with 4-neighbor connectivity.
 True Euclidean distance
 Shortest path in graph (not unique)
 Increasing sampling density does
not help.
13
14
Numerical geometry of non-rigid shapes Shortest path problems
Metrication error
4-neighbor topology
8-neighbor topology
Manhattan distance
Continuous
Euclidean distance
 Graph representation induces an inconsistent metric.
 Increasing sampling size does not make it consistent.
 Neither does increasing connectivity.
Numerical geometry of non-rigid shapes Shortest path problems
Metrication error
 How to approximate the metric consistently?
Solution 1
 Stick to graph representation.
 Change connectivity and sampling.
 Under certain conditions consistency is guaranteed.
Solution 2
 Stick to given sampling (and connectivity).
 Compute distance map on a surface in some
representation (e.g., mesh).
 Requires a new algorithm.
15