Content uploaded by Ashkan Safari

Author content

All content in this area was uploaded by Ashkan Safari on Nov 09, 2020

Content may be subject to copyright.

CCCG 2020, Saskatoon, Canada, August 5–7, 2020

Path Planning in a Weighted Planar Subdivision

Under the Manhattan Metric

Mansoor Davoodi Hosein Enamzadeh Ashkan Safari

Abstract

In this paper, we consider the problem of path planning

in a weighted polygonal planar subdivision. Each poly-

gon has an associated positive weight which shows the

cost of path per unit distance of movement in that poly-

gon. The goal is ﬁnding a minimum cost path under the

Manhattan metric for two given start and destination

points. We propose an O(n2) time and space algorithm

to solve this problem, where nis the total number of

vertices in the subdivision. We also study the case of

rectilinear regions in three dimensions, and generalize

the proposed algorithm to ﬁnd a minimum cost path

under the Manhattan metric in O(n3log n) time and

O(n3) space.

1 Introduction

Path planning (PP) problem is one of the fundamen-

tal problems in motion planning whose objective is to

ﬁnd an optimal path with minimum length between two

start and destination points sand tin a work space.

In the classical version of PP, the work space contains

some obstacles, and the path must avoid these obstacles

[7, 14]. However, in a general formulation of PP – called

Weighted Region Problem (WRP) – which was ﬁrst in-

troduced by Mitchell and Papadimitriou [17], each ob-

stacle has an associated weight and a path is allowed to

enter them at extra costs. In fact, these weights rep-

resent the cost per unit distance of movement in the

obstacles (or say weighted regions). This generalization

of PP has a lot of applications, e.g., it can be used in

self-driving cars navigation, robot motion planning [6],

military purposes [16], crowd simulation [13], and gam-

ing applications [13]. An important theoretical result

on WRP [9] has shown that this problem cannot be

solved in the algebraic computation model over the ra-

tional numbers under the Euclidean metric. Motivated

by this result, we investigate WRP under the Manhat-

tan metric and show that it can be solved eﬃciently in

polynomial time.

Department of Computer Science and Information Technol-

ogy, Institute for Advanced Studies in Basic Sciences (IASBS),

Zanjan, Iran

mdmonfared@iasbs.ac.ir

hosein.enamzadeh@iasbs.ac.ir

ashkan.safari@iasbs.ac.ir

Mitchell and Papadimitriou [17] introduced an -

optimal algorithm with running time of O(n8L), where

nis the total number of vertices of polygonal regions

and Lis the precision of problem’s instance. Precisely,

L=O(log(nNW/w)), where Nis the maximum inte-

ger coordinate of any vertex of the subdivision, Wand

ware the maximum non-inﬁnite and minimum non-zero

integer weights assigned to the faces of the subdivision,

and > 0 is a user-speciﬁed error tolerance. The output

is the shortest path from the starting point sto all ver-

tices of the polygons with an error tolerance under the

Euclidean metric. Mata and Mitchell [16] have proposed

an algorithm based on constructing a relatively sparse

graph – called pathnet – that can search for paths that

are close to optimal. They have proved that a path-

net of size O(nk) can be constructed in O(kn3) time.

As a matter of fact, the pathnet limits the paths that

can extend from vertices with kcones at each vertex.

Searching for a path on the constructed pathnet yields

a path whose weighted length is at most (1 + ) of op-

timal path. Precisely, =W/w

kΘmin , where W/w is the

ratio of the maximum non-inﬁnite weight to the mini-

mum non-zero weight, and θmin is the minimum internal

face angle of the subdivision. One of the common tech-

niques for obtaining approximate shortest paths is to

positioning Steiner points for discretizing the edges of

the triangular regions and then constructing a graph by

connecting them. Finally, by using graph search algo-

rithms such as Dijkstra, an approximate minimum cost

path can be computed [1, 2, 18].

There are several variants of WRP due to the metric

and the shape of weighted regions. Lee et al. [15] have

solved the problem in the presence of isothetic obsta-

cles (the boundary edges of obstacles are either vertical

or horizontal line segments). They have presented two

algorithms for ﬁnding the shortest path under the Man-

hattan metric. The ﬁrst algorithm runs in O(nlog2n)

time and O(nlog n) space, and the second one runs in

O(nlog3/2n) time and space. Gewali et al. [10] have

considered a special case of this problem in which there

are only three types of regions: regions with weight of

∞, regions with weight of 0, and regions with weight of

1. They have presented an algorithm in O(m+nlog n)

time, where m∈O(n2) is the number of visibility edges.

Furthermore, they have presented an algorithm for the

case that linear feathers are added. Precisely, edges of

32nd Canadian Conference on Computational Geometry, 2020

the subdivision are allowed to have arbitrary weights.

Their algorithm for this case takes O(n2) time for con-

structing a graph of size O(n2) for searching the short-

est path. In fact, it takes O(n2log n) time for ﬁnding

the shortest path. Gheibi et al. [11] have discussed the

problem in an arrangement of lines. Due to the fact that

this special case of the problem has unbounded regions,

they have presented a minimal region – called SP-Hull

– to bound the regions. This minimal region contains

the minimum cost path from sto t. They construct

SP-Hull in O(nlog n) time, where nis the number of

lines in the arrangement. After constructing SP-Hull,

an approximate minimum cost path can be obtained by

applying the existing approximation algorithms within

bounded regions. Jaklin et al. [13] have analyzed the

problem when the weighted regions are cells of a grid.

They have also presented a new hybrid method – called

vertex-based pruning – which is able to compute paths

that are -optimal inside a pruned subset of the scene.

In this paper, we consider a planar subdivision with

arbitrary positive weights. We present an algorithm

which constructs a planar graph in O(n2) time with

O(n2) vertices and edges, where nis the total number of

vertices of the subdivision. The constructed graph con-

tains the minimum cost path between two points sand

tin the plane, where the distances are measured under

the weighted Manhattan metric – the length of a path is

the weighted sum of Manhattan lengths of the sub-paths

within each region. It has been shown that this prob-

lem is unsolvable over the rational numbers when the

distances are measured under the weighted Euclidean

metric [9]. To the best of our knowledge, this is the

ﬁrst result that presents an exact algorithm for solv-

ing WRP under the Manhattan metric in a case where

the regions are arbitrary simple polygons with positive

weights. We propose an exact algorithm for ﬁnding the

minimum cost path under the weighted Manhattan met-

ric in O(n2) time which is also a √2−approximation for

the Euclidean metric. Also, we show that the proposed

algorithm can be used for WRP with rectilinear subdivi-

sion in three dimensions in O(n3log n) time and O(n3)

space.

This paper is organized in ﬁve sections. In section 2,

we give some preliminaries and deﬁnitions. In section 3,

we present our algorithm for constructing a graph which

contains the minimum cost path in a two dimensional

work space, and prove that the shortest path is within

the constructed graph. In section 4, we generalize the

algorithm for the case of rectilinear regions in three di-

mensions, and in section 5, we draw a conclusion.

2 Preliminaries and Deﬁnitions

The problem of weighted region path planning, WRP,

considered in this paper is deﬁned as follows: let Sbe

s

t

b1

b2

b3

b4

b5

Figure 1: A path from sto twith seven breakpoints.

a subdivision of the plane into polygonal regions with

nvertices, and s, t ∈ S be two start and destination

points in the plane. Each region of Shas an associated

positive weight. The weight of an edge e∈ S (boundary

of regions) is assumed to be min{wr, wr0}, where wrand

wr0are the weights of regions incident to e. The goal is

to ﬁnd a minimum cost path between sand t, where the

distances are measured under the weighted Manhattan

metric – the length of a path is the weighted sum of

Manhattan lengths of the sub-paths within each region.

Let πst denote a path between sand twhich consists

of some sub-paths between consecutive breakpoints. A

breakpoint is a point on the path in which the path

turns. We also consider sand tas breakpoints (see

Fig. 1). Let ρ1, ρ2, ..., ρkbe sub-paths between consec-

utive breakpoints of a path πst in which each ρi, for

i= 1,2,...,klies completely within one region. If a

part of a path πst does not lie totally in one of the re-

gions, we decompose it to some sub-paths. We denote

d(ρi) as the Manhattan distance between two endpoints

of ρi. The weighted length of a path πst under the Man-

hattan metric, denoted by dw(πst), is deﬁned as:

dw(πst) = Pk

i=1 d(ρi)×wi,

where wiis the weight of the region in which ρilies.

A path πst is called a horizontal (resp., vertical) path

if it consists of a horizontal (resp., vertical) sub-path

between only two consecutive breakpoints. Also, we say

two horizontal (resp., vertical) paths are consecutive if

and only if they have the same starting and termination

points. This deﬁnition is used in Lemma 1.

The basic idea behind the proposed algorithm is

reducing the problem to a graph searching problem.

Therefore, we provide an algorithm for constructing a

graph that contains the minimum cost path under the

weighted Manhattan metric. The constructed graph is

a planar graph with O(n2) vertices and edges, where n

is the total number of vertices of the subdivision. For

planar graphs with positive edge weights, Henzinger et

al. [12] have given a linear-time algorithm to compute

CCCG 2020, Saskatoon, Canada, August 5–7, 2020

single-source shortest paths. By running this algorithm

on the constructed graph, we obtain the minimum cost

path between sand tunder the Manhattan metric in

O(n2) time. Since a simple polygon with nvertices can

be triangulated in O(nlog n) time and O(n) space [8],

w.l.o.g. we assume all the regions to be triangular re-

gions in all parts of the paper.

3 The Graph Construction Algorithm

3.1 The Algorithm

Let G= (V, E ) be a graph. First, we initialize V

= Ø and E= Ø. Let HL(αi) and V L(αi) be hori-

zontal and vertical lines passing through point αi, for

i= 1,2,...,n. Precisely, αi, for i= 1,2,...,nare the

vertices of the subdivision which contain s,t, and the

vertices of the triangles. We add s,t, vertices of the tri-

angles, and the intersection points among HL(αi) and

V L(αj), for i, j = 1,2,...,nto V. We also add the

intersection points among HL(αi) (resp., V L(αi)), for

i= 1,2,...,nand the edges of the triangles to V. Next,

we add the line segments between two consecutive ver-

tices in Vthat lie on the considered horizontal lines,

vertical lines or the edges of the triangles as edges of G

to E. For an edge (u, v)∈Ewhere lies in a region with

wight wi, let d(u, v) denote the Manhattan distance be-

tween two endpoints of the edge. The weight of the edge

is equal to the product of d(u, v) and wi. Note that each

edge lies completely within one region.

The basic idea of our algorithm is to extend four rays

to the up, down, right and left directions (horizontal

and vertical lines) at every vertex of the subdivision.

This idea has similarity to vertical cell decomposition

(VCD) method [14]. In this method, the free space is

partitioned into a ﬁnite collection of one-dimensional

and two-dimensional cells by extending rays upward and

downward through free space. In this method, the rays

are not allowed to enter obstacles, however, in our al-

gorithm the rays are extended to all parts of the sub-

division since the paths are allowed to enter weighted

regions at extra costs. Also, we extend rays to the four

directions at every vertex, however, in the VCD method

the rays are extended only upward and downward. In

both methods, the motion planning problem is reduced

to a graph search problem. In VCD method, a roadmap

is constructed by selecting sample points from the cell

centroids, however, in our algorithm the graph is con-

structed by intersecting the rays with each other and

also by the edges of the triangles.

Some of the edges of Gwhich lie on an edge of a

triangle are oblique. These edges are useful when two

triangular regions are close to each other and the region

among them has a lower weight than these triangles. A

path which passes between these two triangles cannot

be completely horizontal or vertical since it will enter

s

t

Figure 2: The constructed graph of Fig. 1.

the triangles. So it will be oblique and lie on one of the

edges of the triangles (see the sub-path between b4and

b5on Fig. 1).

According to the construction of the graph, some ver-

tices and edges are added to the graph by vertical and

horizontal lines passing through vertices of the subdivi-

sion. We call the part of the work space which lies be-

tween two consecutive horizontal (resp., vertical) lines,

ahorizontal lane (resp., vertical lane) denoted by LH

(resp., LV ). So each LH (resp., LV ) is surrounded by

two consecutive horizontal (resp., vertical) lines. There-

fore, when we say the lines of an LH (resp., an LV ), we

mean these consecutive lines.

For constructing the graph, we can use one of the line

segments intersections algorithms [3, 5] which computes

all kintersections among nline segments in the plane

in O(nlog n+k) time. These intersection points are

vertices of G. After specifying the set of vertices of G,

the set of edges of Gcan be speciﬁed. It takes O(n2)

time to construct Gsince the graph has O(n2) vertices

and edges. The constructed graph of the work space

on Fig. 1 is shown on Fig. 2. For simplicity, we do

not triangulate the white regions with weight 1 in these

ﬁgures. Precisely, we can apply the proposed algorithm

in a polygonal subdivision in which the regions are not

triangular. The triangulation of the regions just helps

us for showing that Gcontains the minimum cost path

between sand t.

For computing the minimum cost path under the

Manhattan metric between sand t, we can apply Di-

jkstra’s algorithm to G. In this case, the minimum cost

path is obtained in O(n2log n) time. However, since

Gis a planar graph with positive edge weights, we can

apply the algorithm presented by Henzinger et al. [12],

which is a linear-time algorithm, to G. Therefore, the

minimum cost path is obtained in O(n2) time.

3.2 Correctness Proof

Now, we show that the constructed graph contains the

minimum cost path between sand tunder the Manhat-

32nd Canadian Conference on Computational Geometry, 2020

tan metric. Since our metric for measuring the distance

is Manhattan, we can convert any path between sand t

to a path which consists of vertical and horizontal line

segments. In other words, when a sub-path between

two consecutive breakpoints is oblique, we can replace

it by two horizontal and vertical line segments where

the cost of movement on these horizontal and vertical

line segments is equal to the cost of movement along

the oblique line segment. In a case where a sub-path

lies between two close triangular regions and the region

between these two triangular regions has lower weight

than these triangles, by applying this conversion, some

parts of the horizontal and vertical line segments may

lie in the triangular region with higher weight. In this

case, we can replace the part which lies in a triangular

region with higher cost with a line segment which lies

on an edge of the triangles (see the sub-path between

b4and b5on Fig. 1). Since the weight of each of the

edges of the work space is equal to the minimum weight

of the regions that are incident to that edge, the cost

of movement between two breakpoints on the replaced

line segments is equal to the cost of movement along the

oblique line segment. Therefore, a path between sand

tcan only consist of horizontal, vertical, and oblique

line segments, the latter of which are located on the

edges of the triangles. As a result, all the paths that we

consider in the following lemmas consist of the above

mentioned line segments. Our ﬁrst objective is to prove

the following lemma.

Lemma 1 Let π1,π2, and π3be three consecutive hor-

izontal (or vertical) sub-paths from s0to t0which lie

inside an LH (resp., an LV) and pass through k > 0

triangular regions. If dw(π2)< dw(π1), then dw(π3)<

dw(π2).

Proof. We consider the case k= 2, the proof is similar

for any k > 0. For simple comparison among the sub-

paths, let the points s0and t0lie on the same horizontal

line segment. Assume w.l.o.g. that both triangles have

vertical edges (see Fig. 3). The weighted lengths of π1,

π2and π3are deﬁned as follows (refer to Fig. 3 for the

notations):

dw(π1)=(w1×a1)+(w2×a2) + z2+x2+L,

dw(π2) = (2 ×h) + x1+ (w1×b1) + (w2×b2) + x2+L,

dw(π3) = (2 ×h) + x1+ (2 ×h0) + z1+ (w1×c1)

+ (w2×c2) + L.

According to Fig. 3, a1=b1+x1and a2=b2−z2. Due

to the assumption that dw(π2)< dw(π1), we have the

following inequality:

(2 ×h)< x1×(w1−1) + z2×(1 −w2),

and due to the triangle similarity theorems we have the

following equations:

π3

π2

π1

h

h′

x1

z1c1

b1

a1

L

t′′

t′

z2

x2

s′

s′′

w1

c2

b2

a2

w2

HL(αi)

HL(αj)

Figure 3: Three consecutive horizontal sub-paths from

s0to t0through two triangular regions.

x1

h=z1

h0,z2

h=x2

h0.

By applying the triangle similarity equations in the

mentioned inequality and adding (w1×c1) + (w2×b2)

to both sides of the inequality we get:

(2 ×h0) + z1+ (w1×c1)+(w2×c2)<

(w1×b1)+(w2×b2) + x2=⇒dw(π3)< dw(π2).

Thus, the weighted length of π3is less than π2. In fact,

the proof is based on the following equation:

h

h0=x1

z1

=z2

x2

,

and since h

h0is constant, we can generalize the proof for

any k > 0 triangular regions between s0and t0. There-

fore, the lemma holds.

Note that inside an LH (resp., an LV ), we can con-

sider all the triangles to have vertical (resp., horizontal)

edges since vertical (resp., horizontal) lines are consid-

ered passing through vertices of the subdivision. The

result of this lemma helps us to show that there exists

a shortest path between sand tunder the Manhattan

metric such that all the horizontal (resp., vertical) sub-

paths between consecutive breakpoints in LHs (resp.,

LVs) lie on the lines of the LHs (resp., LVs). We call

such a path, a perfect shortest path between sand t,

denoted by πp

st. Note that according to the principle

of optimality, since πp

st is optimal in length, all of its

sub-paths in LHs and LVs are also optimal in length.

Lemma 2 There exists a shortest path between sand

tunder the Manhattan metric such that, for any sub-

path of the shortest path in an LH (resp., an LV), all

the horizontal (resp., vertical) sub-paths between consec-

utive breakpoints lie on the lines of the LH (resp., LV).

CCCG 2020, Saskatoon, Canada, August 5–7, 2020

According to Lemma 2, a path between the entrance

(s0) and exit point (t0) of an LH (resp., an LV ) is not

optimal in length, unless there exists an optimal path

in length such that all the horizontal (resp., vertical)

sub-paths between consecutive breakpoints lie on the

lines of the LH (resp., LV ). Precisely, there is always

a path πp

s0t0in an LH (resp., an LV ). According to the

construction of the graph, lines of an LH (resp., an LV )

are edges of Gand a horizontal (resp., vertical) sub-path

of a path πp

s0t0between two consecutive breakpoints in

an LH (resp., an LV ) lies on the edges of G.

Corollary 3 For any path πp

s0t0in an LH (resp., an

LV), the sub-paths between consecutive breakpoints can-

not be simultaneously horizontal (resp., vertical) and lie

between two lines of the LH (resp., LV).

Lemma 4 A breakpoint of a path πp

s0t0in an LH (resp.,

an LV) is located on a line of an LH or an LV or possibly

both.

Proof. We assume that bis a breakpoint in an LH

which is not located on a line of the LH or a LV. Ac-

cording to Corollary 3, the line segment that is incident

to bcannot be horizontal. Therefore, one of the line

segments is vertical and the other one is located on an

edge of a triangle. Since bis also located in an LV and

is not located on one of the lines of the LV, the vertical

line segment incident to b lies between the left and right

lines of the LV, which contradicts Corollary 3. Thus, the

lemma holds.

Lemma 4 shows that the breakpoints of the perfect

shortest paths in LHs (resp., LVs ) must lie on the lines

of the LHs and LVs, meaning that they lie on the edges

of G(since the lines of LHs and LVs are edges of G). The

next step is to show that these breakpoints are located

on the vertices of G.

Lemma 5 For a path πp

s0t0in an LH (resp., an LV),

the breakpoints of the path are located on the vertices of

G.

Proof. According to Lemma 4, a breakpoint of a path

πp

s0t0in an LH (resp., an LV ) is located on a line of

an LH or an LV or possibly both. If a breakpoint is

located on both a line of an LV and a line of an LH, it

is on the intersection point of these two lines. Thus, it

is on a vertex of G. If it is only located on a line of an

LH or an LV, and one of the incident line segments lies

on a triangle edge, then the breakpoint is located on a

vertex of G(since the intersection of an LH or LV line

with a triangle edge is a vertex of G). Therefore, the

breakpoints of a path πp

s0t0are on the vertices of G.

Lemma 5 shows that the breakpoints of a path πp

s0t0

in an LH (resp., an LV ) are located on the vertices of

G. The next step is to show that a path πp

s0t0under the

Manhattan metric in an LH (resp., an LV ) is on G. To

this end, we need to show that the edges of the path

πp

s0t0are on the edges of G.

Lemma 6 A path πp

s0t0in an LH (resp., an LV) is on

G.

Proof. According to Lemma 5, the breakpoints of a

path πp

s0t0in an LH (resp., an LV ) are on the vertices

of G. Let ebe an edge between two consecutive break-

points. If eis on an edge of a triangle, it is on G. Now

we assume that eis in an LH and is not on G. Accord-

ing to Corollary 3, ecannot be horizontal since it must

lie on one of the lines of the LH and the lines of LH s

are edges of G. Therefore, it is a vertical edge. Since it

is also located in an LV and is not on G, it is not on

a line of the LV. Therefore, it contradicts Corollary 3.

Thus, eis on G.

According to Lemma 6, perfect shortest paths in LHs

and LVs which are sub-paths of a path πp

st are on the

constructed graph. Note that in all the lemmas, a path

between sand tonly consists of horizontal, vertical, and

oblique line segments, the latter of which are located

on the edges of the triangles. In the continuous work

space, an arbitrary path between sand tconsists of line

segments which are not in the form of the mentioned line

segments. Finally, we prove that there exists a shortest

path between sand ton G.

Theorem 7 For a shortest path π1under the weighted

Manhattan metric in the continuous work space from s

to t, there exists a path π2from sto ton Gsuch that

dw(π2)≤dw(π1).

Proof. It is obvious that when the metric for measuring

the distance is Manhattan, any arbitrary path in the

continuous work space, can be converted to a path which

consists of the three mentioned line segments without

increment in the cost of the path. Thus, we convert π1

to π0

1such that the line segments in π0

1are in the form

of the mentioned line segments. Obviously, dw(π0

1) =

dw(π1). According to the principle of optimality, each

sub-path of an optimal path in length is also optimal.

Therefore, π0

1consists of optimal sub-paths in length in

LHs and LVs. According to Lemma 2, for any shortest

path in an LH (resp., an LV ), there exists a path πp

s0t0

and due to the Lemma 6, perfect shortest paths in LHs

and LVs are on G. Thus, π0

1can be converted to a

perfect shortest path (π2) without increment in the cost

of the path. Therefore, a path from sto ton Gexists

(π2) whose weighted length is not greater than π1.

According to Theorem 7, Gcontains a shortest path

from sto tunder the weighted Manhattan metric. Since

simple polygons can be triangulated in O(nlog n) time

32nd Canadian Conference on Computational Geometry, 2020

and O(n) space [8], work spaces with simple polygonal

regions can be discretized by using the mentioned graph

construction algorithm. Thus, the proposed algorithm

solves WRP under the Manhattan metric.

Theorem 8 The weighted region problem in a planar

polygonal subdivision with positive weights under the

Manhattan metric can be solved in O(n2)time and

space, where n is the total number of vertices of the

subdivision.

By using the triangular inequality, it is easy to see

that the length of a path under the Manhattan metric

is at most √2 times of the length of the path under the

Euclidean metric. Thus, the proposed algorithm is also

a√2-approximation algorithm for solving WRP under

the Euclidean metric.

4 The Three-Dimensional Case

In this section, we consider WRP in three dimensions.

It has been shown that the problem of ﬁnding a shortest

path under any LPmetric in a three-dimensional poly-

hedral environment is NP-hard [4]. Here, we consider a

speciﬁc variation where the regions are rectilinear.

Since the metric for measuring the distance is Man-

hattan, any oblique path between two consecutive

breakpoints in three-dimensional space can be converted

to three parallel line segments to x,yand zaxes with-

out increment in the cost of the path. Thus, we consider

all the paths to be rectilinear.

Let nbe the total number of vertices of the subdivi-

sion and let (xi,yi,zi), for i= 1,2,...,nbe the coor-

dinates of the vertices of the regions (and of sand t).

Let Pbe the set of planes x=xi,y=yi,z=zi, for

i= 1,2,...,n. The set of vertices of the graph consists

of the intersection points among at least three planes in

P, and the set of edges of the graph consists of the line

segments between two consecutive vertices of the graph

which lie on the intersection lines between at least two

planes in P. The constructed graph has O(n3) vertices

and edges, and by applying Dijkstra’s algorithm to it,

the minimum cost path under the Manhattan metric

can be obtained in O(n3log n) time.

Similar to the deﬁnitions of LH and LV in the pla-

nar case, we deﬁne similar notations for the three-

dimensional case. Let XY C denote a part of the

work space which is surrounded by two consecutive

planes orthogonal to the x-axis and two consecutive

planes orthogonal to the y-axis in Pwhich is called an

XY −container. Precisely, an XY C is not surrounded

along the z-axis. XZC and Y Z C notations are deﬁned

similarly. Since all the paths are considered to be recti-

linear, for any path in an XY C , there exists an equiva-

lent path in length such that all the sub-paths between

consecutive breakpoints along the z-axis are located on

the planes surrounding XY C. Precisely, according to

the graph construction algorithm, each XY C consists

of some cuboids where the cost of movement in every

part of a cuboid is equal. Therefore, the sub-paths along

the z-axis in a cuboid have the same cost when they are

located either on the planes surrounding XY C or in-

side the cuboid. Similar results hold for an XZC and

aY ZC . Thus, an equivalent path in length between s

and texists where all the sub-paths between consecu-

tive breakpoints are located on the considered planes in

P. Arguments similar to the ones used in Theorem 7

show that the constructed graph contains the minimum

cost path between sand tunder the Manhattan metric.

Theorem 9 The weighted region problem in a three-

dimensional work space among rectilinear regions with

positive weights under the Manhattan metric can be

solved in O(n3log n)time and O(n3)space, where n is

the total number of vertices of the subdivision.

5 Conclusion

In this paper, we have considered a generalization of

path planning problem – called weighted region prob-

lem (WRP). While unsolvability of WRP over the ra-

tional numbers under the Euclidean metric has been

proved [9], we proposed an algorithm for solving WRP

under the Manhattan metric which is also a √2-

approximation solution for the Euclidean case. We also

considered the case of rectilinear regions in three dimen-

sions, and generalized our algorithm for it. Improving

the time complexity of the algorithm and providing a

better approximation factor for the Euclidean metric

remain open.

References

[1] L. Aleksandrov, M. Lanthier, A. Maheshwari, and J.-

R. Sack. An ε—approximation algorithm for weighted

shortest paths on polyhedral surfaces. In Scandinavian

Workshop on Algorithm Theory, pages 11–22. Springer,

1998.

[2] L. Aleksandrov, A. Maheshwari, and J.-R. Sack. Deter-

mining approximate shortest paths on weighted polyhe-

dral surfaces. Journal of the ACM (JACM), 52(1):25–

53, 2005.

[3] I. J. Balaban. An optimal algorithm for ﬁnding seg-

ments intersections. In Proceedings of the eleventh

annual symposium on Computational geometry, pages

211–219, 1995.

[4] J. Canny and J. Reif. New lower bound techniques

for robot motion planning problems. In 28th Annual

Symposium on Foundations of Computer Science (sfcs

1987), pages 49–60. IEEE, 1987.

[5] B. Chazelle and H. Edelsbrunner. An optimal algorithm

for intersecting line segments in the plane. Journal of

the ACM (JACM), 39(1):1–54, 1992.

CCCG 2020, Saskatoon, Canada, August 5–7, 2020

[6] J. Chestnutt, K. Nishiwaki, J. Kuﬀner, and S. Kagami.

An adaptive action model for legged navigation plan-

ning. In 2007 7th IEEE-RAS International Conference

on Humanoid Robots, pages 196–202. IEEE, 2007.

[7] H. M. Choset, S. Hutchinson, K. M. Lynch, G. Kantor,

W. Burgard, L. E. Kavraki, and S. Thrun. Principles of

robot motion: theory, algorithms, and implementation.

MIT press, 2005.

[8] M. de Berg, M. van Kreveld, M. Overmars, and O. C.

Schwarzkopf. Polygon triangulation. In Computational

Geometry, pages 45–61. Springer, 2000.

[9] J.-L. De Carufel, C. Grimm, A. Maheshwari, M. Owen,

and M. Smid. A note on the unsolvability of the

weighted region shortest path problem. Computational

Geometry, 47(7):724–727, 2014.

[10] L. P. Gewali, A. C. Meng, J. S. Mitchell, and S. Ntafos.

Path planning in 0/1/∞weighted regions with appli-

cations. ORSA Journal on Computing, 2(3):253–272,

1990.

[11] A. Gheibi, A. Maheshwari, and J.-R. Sack. Weighted

region problem in arrangement of lines. In CCCG, 2013.

[12] M. R. Henzinger, P. Klein, S. Rao, and S. Subramanian.

Faster shortest-path algorithms for planar graphs. jour-

nal of computer and system sciences, 55(1):3–23, 1997.

[13] N. Jaklin, M. Tibboel, and R. Geraerts. Computing

high-quality paths in weighted regions. In Proceedings

of the Seventh International Conference on Motion in

Games, pages 77–86, 2014.

[14] S. M. LaValle. Planning algorithms. Cambridge univer-

sity press, 2006.

[15] D. Lee, C.-D. Yang, and T. Chen. Shortest rectilinear

paths among weighted obstacle. International Journal

of Computational Geometry & Applications, 1(02):109–

124, 1991.

[16] C. S. Mata and J. S. Mitchell. A new algorithm for com-

puting shortest paths in weighted planar subdivisions.

In Proceedings of the thirteenth annual symposium on

Computational geometry, pages 264–273, 1997.

[17] J. S. Mitchell and C. H. Papadimitriou. The weighted

region problem: ﬁnding shortest paths through a

weighted planar subdivision. Journal of the ACM

(JACM), 38(1):18–73, 1991.

[18] Z. Sun and J. H. Reif. On ﬁnding approximate opti-

mal paths in weighted regions. Journal of Algorithms,

58(1):1–32, 2006.

Appendix

Proof of Lemma 2

Lemma 2 There exists a shortest path between sand tun-

der the Manhattan metric such that, for any sub-path of the

shortest path in an LH (resp., an LV), all the horizontal

(resp., vertical) sub-paths between consecutive breakpoints lie

on the lines of the LH (resp., LV).

e

c

a

f1fk

π3

π2

π1b

d

f

HL(αi)

HL(αj)

Figure 4: Three horizontal paths passing through ktri-

angular regions.

Proof. Suppose the lemma for the case of a horizontal lane.

Similarly, the lemma holds for a vertical lane. We consider

s0as the entrance point to the LH and t0as the exit point.

W.l.o.g. we consider that s0is on the left side of t0. Due to

the assumption that the path between sand tis optimal in

length, any sub-path of this path is also optimal in length.

Thus, the path between s0and t0is optimal in length. We

consider a path between s0and t0where a horizontal sub-

path between two consecutive breakpoints does not lie on

the lines of the LH. We show that there exists an equivalent

path in length between s0and t0such that all the horizontal

sub-paths between consecutive breakpoints lie on the lines of

the LH. We assume cand das two consecutive breakpoints

such that the horizontal sub-path between them does not lie

on the lines of the LH (see Fig. 4). There are ktriangular

regions between cand dand the sub-path between these two

breakpoints must pass all ktriangular regions (w.l.o.g. as-

sume cand dare located on the edges of the triangles). We

also assume that the path between s0and t0contains other

two breakpoints – we call them aand b– which are on the

lower line of the LH (these two breakpoints are also located

on the edges of the triangles). For passing these triangles, a

path can directly go from ato b. Since the path between s0

and t0is optimal in length, the path which contains cand d

(π2) has less than or equal length to the case in which it goes

directly from ato b(π1). If dw(π1) = dw(π2), an equivalent

path in length which does not contain the horizontal path

between cand dexists. If dw(π1)< dw(π2), it contradicts

our assumption that the path between sand tis optimal

in length. For the other case where dw(π2)< dw(π1), we

consider another path which goes from ato e(a breakpoint

on the upper line of the LH and on the edge of the left

most triangle) and then from eto f(a breakpoint on the

upper line of the LH and on the edge of the right most tri-

angle) and then to b(π3). According to Lemma 1, since

dw(π2)< dw(π1), therefore, dw(π3)< dw(π2) and this con-

tradicts our assumption that the path between sand tis

optimal in length. Thus, the lemma holds.