Minimum Average Distance Triangulations
László Kozma
Saarland University, Saarbrücken, Germany
European Symposium on Algorithms
10th September 2012
Introduction
Weighted, undirected graph G = (V, E, w).
dG (u, v): length of the shortest u − v path.
Average distance:
A(G) =
1
|V |
2
X
{x,y}⊆V
dG (u, v).
Introduction
Weighted, undirected graph G = (V, E, w).
dG (u, v): length of the shortest u − v path.
Average distance:
A(G) =
1
|V |
2
X
dG (u, v).
{x,y}⊆V
Total distance (H. Wiener, 1947):
W(G) =
X
{x,y}⊆V
dG (u, v).
Introduction
Network design (D.S. Johnson et al., 1978):
• Given G = (V, E, w), find a spanning subgraph T ,
such as to minimize
W(T ) =
X
{x,y}⊆V
dT (x, y).
Introduction
Network design (D.S. Johnson et al., 1978):
• Given G = (V, E, w), find a spanning subgraph T ,
such as to minimize
W(T ) =
X
{x,y}⊆V
• Budget constraint:
X
e∈T
w(e) ≤ B.
dT (x, y).
Introduction
Network design (D.S. Johnson et al., 1978):
• Given G = (V, E, w), find a spanning subgraph T ,
such as to minimize
W(T ) =
X
dT (x, y).
{x,y}⊆V
• Budget constraint:
X
w(e) ≤ B.
e∈T
• NP-hard, even with w = 1, and B = |V | − 1 (spanning tree).
Introduction
A similar-looking geometric problem:
• Given G = (V, E, w) embedded in the plane,
Introduction
A similar-looking geometric problem:
• Given G = (V, E, w) embedded in the plane,
find a spanning subgraph T ,
such as to minimize
W(T ) =
X
{x,y}⊆V
dT (x, y).
Introduction
A similar-looking geometric problem:
• Given G = (V, E, w) embedded in the plane,
find a spanning subgraph T ,
such as to minimize
W(T ) =
X
{x,y}⊆V
• Constraint: T is non-crossing.
dT (x, y).
Introduction
A similar-looking geometric problem:
• Given G = (V, E, w) embedded in the plane,
find a spanning subgraph T ,
such as to minimize
W(T ) =
X
dT (x, y).
{x,y}⊆V
• Constraint: T is non-crossing.
• No budget on total weight =⇒ T is maximal non-crossing.
Minimum Average Distance Triangulation
Two variants:
Minimum Average Distance Triangulation
Two variants:
1
S = {p1 , p2 , . . . , pn } points in R2 ,
G is complete graph on S,
w : S2 → R pairwise distances (weights).
=⇒ T is a triangulation of S.
Minimum Average Distance Triangulation
Two variants:
1
S = {p1 , p2 , . . . , pn } points in R2 ,
G is complete graph on S,
w : S2 → R pairwise distances (weights).
=⇒ T is a triangulation of S.
Minimum Average Distance Triangulation
Two variants:
1
S = {p1 , p2 , . . . , pn } points in R2 ,
G is complete graph on S,
w : S2 → R pairwise distances (weights).
=⇒ T is a triangulation of S.
2
P = (p1 , . . . , pn ) a simple polygon,
G consists of boundary and diagonal edges of P ,
w : P2 → R pairwise distances (weights).
=⇒ T is a triangulation of the interior of P .
Minimum Average Distance Triangulation
Two variants:
1
S = {p1 , p2 , . . . , pn } points in R2 ,
G is complete graph on S,
w : S2 → R pairwise distances (weights).
=⇒ T is a triangulation of S.
2
P = (p1 , . . . , pn ) a simple polygon,
G consists of boundary and diagonal edges of P ,
w : P2 → R pairwise distances (weights).
=⇒ T is a triangulation of the interior of P .
Example:
Regular hexagon, Euclidean weights.
Example:
Regular hexagon, Euclidean weights.
Example:
Regular hexagon, Euclidean weights.
Minimum Average
Distance Triangulation:
P
W ≈ 24.93,
w(e) ≈ 11.46
Example:
Regular hexagon, Euclidean weights.
Minimum Average
Distance Triangulation:
P
W ≈ 24.93,
w(e) ≈ 11.46
Minimum Weight
P Triangulation:
w(e) ≈ 11.20
W ≈ 25.39,
Example:
Regular hexagon, Euclidean weights.
Minimum Average
Distance Triangulation:
P
W ≈ 24.93,
w(e) ≈ 11.46
Minimum Weight
P Triangulation:
w(e) ≈ 11.20
W ≈ 25.39,
Summary of results
point sets
polygons
unit weights
Euclidean weights
arbitrary weights
min
T
X
x,y
dT (x, y).
Summary of results
point sets
polygons
1
unit weights
Euclidean weights
arbitrary weights
min
T
X
dT (x, y).
x,y
Point sets, arbitrary (semimetric) weights: NP-complete
Summary of results
point sets
polygons
unit weights
Euclidean weights
arbitrary weights
min
T
X
dT (x, y).
x,y
1
Point sets, arbitrary (semimetric) weights: NP-complete
2
Point sets, convex polygons, unit weights: trivial
Summary of results
point sets
polygons
unit weights
Euclidean weights
arbitrary weights
min
T
X
dT (x, y).
x,y
1
Point sets, arbitrary (semimetric) weights: NP-complete
2
Point sets, convex polygons, unit weights: trivial
3
Arbitrary simple polygons, unit weights: O(n11 )
Summary of results
point sets
polygons
unit weights
Euclidean weights
arbitrary weights
min
T
X
dT (x, y).
x,y
1
Point sets, arbitrary (semimetric) weights: NP-complete
2
Point sets, convex polygons, unit weights: trivial
3
Arbitrary simple polygons, unit weights: O(n11 )
Metric (e.g. Euclidean) weights: Open
1. Hardness result
MADT: point set S ⊆ R2 , weights w : S 2 → R.
w(x, y) ≥ 0
w(x, y) = 0 iff x = y
w semimetric : ∀x, y ∈ S :
w(x, y) = w(y, x)
1. Hardness result
MADT: point set S ⊆ R2 , weights w : S 2 → R.
w(x, y) ≥ 0
w(x, y) = 0 iff x = y
w semimetric : ∀x, y ∈ S :
w(x, y) = w(y, x)
Decision problem: given a threshold W ⋆ ∈ R, is there a
triangulation T of S, such that:
W(T ) =
X
x,y∈S
dT (x, y) ≤ W ⋆
1. Hardness result
MADT ∈ NP: use an all-pairs-shortest-path algorithm.
1. Hardness result
MADT ∈ NP: use an all-pairs-shortest-path algorithm.
NP-hardness: gadget-based reduction from Planar3SAT
[Lichtenstein, 1982]
1. Hardness result
MADT ∈ NP: use an all-pairs-shortest-path algorithm.
NP-hardness: gadget-based reduction from Planar3SAT
[Lichtenstein, 1982]
2. Unit weights: the easy case
point sets
polygons
one-vertex-visible
W is minimized by the fan triangulation:
2. Unit weights: the easy case
point sets
polygons
one-vertex-visible
W is minimized by the fan triangulation:
3. Unit weights: arbitrary polygons
Polygon P = (p1 , . . . , pn ) that does not admit a fan triangulation:
3. Unit weights: arbitrary polygons
Polygon P = (p1 , . . . , pn ) that does not admit a fan triangulation:
3. Unit weights: arbitrary polygons
Polygon P = (p1 , . . . , pn ) that does not admit a fan triangulation:
General approach: guess a triangle that is part of the solution,
decompose and recursively solve the problem (→ dynamic
programming).
3. Unit weights: arbitrary polygons
Polygon P = (p1 , . . . , pn ) that does not admit a fan triangulation:
General approach: guess a triangle that is part of the solution,
decompose and recursively solve the problem (→ dynamic
programming).
Problem: cost is not easy to decompose. How to deal with
cross-distances?
Question: How to deal with cross-distances?
Let x ∈ Plef t and y ∈ Pright .
How does the path x ↔ y cross the triangle (p1 pd pn )?
It depends on where x and y are.
Question: How to deal with cross-distances?
We assume the polygon is triangulated.
Observation: Vertices can be grouped into contiguous blocks.
x ∈ PL (left part), y ∈ PR (right part)
Depending on where x and y fall, we can tell how x ↔ y crosses
the triangle, so we can decompose dT (x, y):
x ∈ PL (left part), y ∈ PR (right part)
Depending on where x and y fall, we can tell how x ↔ y crosses
the triangle, so we can decompose dT (x, y):
x ∈ PL (left part), y ∈ PR (right part)
Depending on where x and y fall, we can tell how x ↔ y crosses
the triangle, so we can decompose dT (x, y):
Let φ = dT (x, pd ) + dT (y, pn ). Then:
φ − 1 if y ∈ [pd , pe ]
φ + 1 if y ∈ [pg , pn ] and x ∈ (pa , pd ]
dT (x, y) =
φ
otherwise .
We need an extra term to accumulate distances from endpoints.
Solve a more general problem:
We need an extra term to accumulate distances from endpoints.
Solve a more general problem:
X
WEXT (T, α) =
dT (x, y)
x,y∈S
We need an extra term to accumulate distances from endpoints.
Solve a more general problem:
X
X
dT (x, pn ).
WEXT (T, α) =
dT (x, y) + α
x,y∈S
x∈S
We need an extra term to accumulate distances from endpoints.
Solve a more general problem:
We need an extra term to accumulate distances from endpoints.
Solve a more general problem:
j
X
X
dT (x, y) + α
WEXT (T, α) =
dT (x, pj ).
i
x,y∈[pi ,pj ]
x∈[pi ,pj ]
We need an extra term to accumulate distances from endpoints.
Solve a more general problem:
j
X
X
dT (x, y) + α
WEXT (T, α) =
dT (x, pj ).
i
x,y∈[pi ,pj ]
x∈[pi ,pj ]
n
Minimizing WEXT (T, 0) solves the initial problem.
1
We need an extra term to accumulate distances from endpoints.
Solve a more general problem:
j
X
X
dT (x, y) + α
WEXT (T, α) =
dT (x, pj ).
i
x∈[pi ,pj ]
x,y∈[pi ,pj ]
n
Minimizing WEXT (T, 0) solves the initial problem.
1
Using the formula for dT (x, y) we can express WEXT recursively:
j
d
j
WEXT (T, α) = WEXT (T, ... ) + WEXT (T, ... )
i
i
+ ...
d
We need an extra term to accumulate distances from endpoints.
Solve a more general problem:
j
X
X
dT (x, pj ).
WEXT (T, α) =
dT (x, y) + α
i
x∈[pi ,pj ]
x,y∈[pi ,pj ]
x<y
n
Minimizing WEXT (T, 0) solves the initial problem.
1
Using the formula for dT (x, y) we can express WEXT recursively:
j
d
j
WEXT (T, α) = WEXT (T, α + j − d) + WEXT (T, α + d − i)
i
i
d
+ (α + j − g + 1)(d − a − 1) + (e − d + 1)(i − d).
We need to ensure that the constraints on the indices are respected:
Observation: Assume T contains the triangles pi pd pj and pi pb pd .
(a) a is the largest index s.t. dT (pa , pi ) < dT (pa , pd ) iff a + 1 is
the smallest index s.t. dT (pa+1 , pb ) < dT (pa+1 , pi ).
We need to ensure that the constraints on the indices are respected:
Observation: Assume T contains the triangles pi pd pj and pi pb pd .
(a) a is the largest index s.t. dT (pa , pi ) < dT (pa , pd ) iff a + 1 is
the smallest index s.t. dT (pa+1 , pb ) < dT (pa+1 , pi ).
(b) c is the smallest index s.t. dT (pc , pd ) < dT (pc , pi ) iff c − 1 is
the largest index s.t. dT (pc−1 , pb ) < dT (pc−1 , pd ).
We need to ensure that the constraints on the indices are respected:
Observation: Assume T contains the triangles pi pd pj and pi pb pd .
(a) a is the largest index s.t. dT (pa , pi ) < dT (pa , pd ) iff a + 1 is
the smallest index s.t. dT (pa+1 , pb ) < dT (pa+1 , pi ).
(b) c is the smallest index s.t. dT (pc , pd ) < dT (pc , pi ) iff c − 1 is
the largest index s.t. dT (pc−1 , pb ) < dT (pc−1 , pd ).
(c) analogous relations on the right side
Putting it all together:
procedure EXT (pi , . . . , pj ), pa , pc , pe , pg , α :
if (a = i) and (c = e = i + 1) and (g = j = i + 2):
return (3 + 2α);
/* the polygon has only three vertices */
else:
return
min
′′
pd ,p′a ,p′g ,p′′
a ,pg :
i≤a′ ≤a+1≤c−1≤g ′ ≤d
′′
d≤a ≤e+1≤g−1≤g ′′ ≤j
pi ↔pd ↔pj
n
EXT (pi , . . . , pd ), p′a , pa+1 , pc−1 , p′g , α + j − d
′′
′′
+ EXT (pd , . . . , pj ), pa , pe+1 , pg−1 , pg , α + d − i
o
+ (α + j − g + 1)(d − a − 1) + (e − d + 1)(i − d) ;
Summary of results
point sets
polygons
unit weights
Euclidean weights
arbitrary weights
min
T
X
dT (x, y).
x,y
1
Point sets, arbitrary (semimetric) weights: NP-complete
2
Point sets, convex polygons, unit weights: trivial
3
Arbitrary simple polygons, unit weights: O(n11 )
Metric (e.g. Euclidean) weights: Open
Thank you for your attention.
...
...
...
...
© Copyright 2026 Paperzz