Next Article in Journal
Secure and Optimal Secret Sharing Scheme for Color Images
Previous Article in Journal
Control Techniques for a Class of Fractional Order Systems
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Randomized Greedy Algorithm for Piecewise Linear Motion Planning

1
Departamento de Matemáticas, Escuela Superior de Física y Matemáticas del Instituto Politécnico Nacional, Mexico City 07738, Mexico
2
Departamento de Matemáticas, Centro de Investigación y de Estudios Avanzados del Istituto Politécnico Nacional, Av. IPN 2508, Zacatenco, Mexico City 07000, Mexico
3
Department of Mathematics, Faculty of Engineering and Natural Sciences, Bursa Technical University, Bursa 16330, Turkey
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Mathematics 2021, 9(19), 2358; https://doi.org/10.3390/math9192358
Submission received: 7 August 2021 / Revised: 17 September 2021 / Accepted: 17 September 2021 / Published: 23 September 2021
(This article belongs to the Section Algebra, Geometry and Topology)

Abstract

:
We describe and implement a randomized algorithm that inputs a polyhedron, thought of as the space of states of some automated guided vehicle R , and outputs an explicit system of piecewise linear motion planners for R . The algorithm is designed in such a way that the cardinality of the output is probabilistically close (with parameters chosen by the user) to the minimal possible cardinality.This yields the first automated solution for robust-to-noise robot motion planning in terms of simplicial complexity (SC) techniques, a discretization of Farber’s topological complexity TC . Besides its relevance toward technological applications, our work reveals that, unlike other discrete approaches to TC, the SC model can recast Farber’s invariant without having to introduce costly subdivisions. We develop and implement our algorithm by actually discretizing Macías-Virgós and Mosquera-Lois’ notion of homotopic distance, thus encompassing computer estimations of other sectional category invariants as well, such as the Lusternik-Schnirelmann category of polyhedra.

1. Introduction

In its more simplified form, a motion planning algorithm A for a given mechanical system S is a function which assigns, to any pair of initial-final states of S , a motion of S starting and ending at the given states. The ultimate goal for A is to allow S to function in an autonomous regime. Such a task is fundamental in modern technological problems. See [1,2,3] for a survey on algorithmic motion planning, the former one with an emphasis on the randomized viewpoint.
The notion of topological complexity (TC), introduced by Michael Farber in [4], is a mathematical model measuring the continuity instabilities in the motion planning problem of robots. The theoretical aspects of Farber’s idea have been extensively studied by algebraic topologists through nearly twenty years. As a result, the concept has found deep and fruitful connections in homotopy theory. Nonetheless, the more computational aspects of the TC-ideas have seen limited developments, while actual engineering-minded TC-applications seem to be nonexistent. The purpose of this paper is to help mend such a situation by focusing on the more applied features of Farber’s TC. We take advantage of computational topology techniques and, more importantly, by using randomized algorithms, we settle a computer-based solution to the motion planning problem for autonomous systems under Farber’s model. We implement our algorithms with successful and, as explained below, unexpected results.
We use the discretization of Farber’s TC developed in [5]. Here is the basic idea (details are reviewed and generalized in the next section). Assume that the space of states of a given autonomous system is given by (the topological realization of) an abstract simplicial complex K where, for practical reasons, we assume K to be finite. Taking a linear order on the vertices of K, we consider the ordered simplicial product K × K . In such a context, a piecewise linear motion planner defined on a subcomplex J of K × K is a chain of simplicial maps φ 0 , φ 1 , , φ c :   J K ( c 1 ) satisfying that (i) each φ i is contiguous to the subsequent map φ i + 1 ( 0 i < c ), and that (ii) φ 0 ( φ c ) is the restriction to J of the projection K × K K onto the first (second) factor. The rationale behind such a definition is that, for any given pair ( a , b ) of initial-final points in the topological realization J of J, the sequence of points
a , φ 0 ( a , b ) , φ 1 ( a , b ) , , φ c ( a , b ) , b
flags a piecewise linear path in K from a to b depending continuously on a and b. A motion planner defined on the full complex K × K exists only in the (topologically trivial) case that K is contractible. It is then natural to define SC strict ( K ) as one less than the minimal cardinality of systems of piecewise linear motion planners whose domains cover K × K . This yields a discretized approximation of Farber’s TC in the sense that TC ( K ) SC strict ( K ) .
A central result in [5] (coming from the Simplicial Approximation Theorem) is that, if we want to have a discretized invariant of K that actually recovers (rather than just approximates) Farber’s topological complexity of the realization K , then the above construction has to be done within a limiting process where K × K is allowed to be “sufficiently” subdivided, for instance, by taking b-iterated barycentric subdivisions Sd b ( K × K ) . This yields the simplicial complexity (SC) of K,
SC ( K ) = lim b SC strict b ( K ) ,
where SC strict b ( K ) is defined in terms of Sd b ( K × K ) in the same way as SC strict ( K ) is defined in terms of K × K (so SC strict 0 ( K ) = SC strict ( K ) ). Then, as shown in (Theorem 3.5 [5]),
SC strict 0 ( K × K ) SC strict 1 ( K × K ) SC strict 2 ( K × K ) SC ( K ) = TC ( K ) ,
recovering Farber’s topological complexity of K . Our main theoretical result, Theorem 2 below, is a generalization of (1). This is achieved by introducing the notion of contiguity distance between simplicial maps (Definition 4), a discretization of the concept of homotopic distance studied recently in [6].
Remark 1.
The point above is that, by taking iterated barycentric subdivisions, we can recast Farber’s invariant by means of a finite model. However, any person familiar with the computational aspects involving subdivisions will immediately realize that the proposal based on b-iterated barycentric subdivisions becomes computationally prohibitive as b grows. Thus, in principle, the use of SC to evaluate TC carries a compromise between how close we want to approximate TC versus how long we are willing to wait for a computer to perform a calculation involving a large number of subdivisions. The following considerations explain that, in some cases, such compromises can be minimized without diminishing the effectiveness of the approach.
An initial way to soften the compromise above is to allow for coarser/partial subdivisions. The option is however still not satisfactory, as there is no indication a priori of what portions of K × K (and how much) should be subdivided. With the aid of human geometric intuition, the coarser subdivision alternative was used Section 4 in [5] to recast, after a single subdivision, the fact that the topological complexity of the circle (the natural benchmark in [5]) is 1, namely,
SC strict b ( Δ 2 ) = 1 , for   b 1 .
With these preliminaries, we are ready to describe the main application-minded achievements of this paper. Firstly, we lay the grounds for a randomized algorithm that is able to perform, without human aid, evaluation tasks such as (2). Secondly, and more relevant for actual applications, we set a corresponding computer implementation which, besides of performing automated TC estimations, produces probabilistically close-to-optimal systems of piecewise linear motion planners. Optimality here means that, in each inputed case, the cardinality of the outputed system is close to being the minimal possible (i.e., close to the TC value of the complex under consideration), where closeness is controlled by means of user-given parameters in the probabilistic algorithm. In brief, our implementation outputs robust-to-noise system of piecewise linear motion planners, with a reliability that depends on the given parameters.
As a byproduct, we find somehow surprisingly that the subdivision ingredient implicit in (1) can be unnecessary in a SC-recasting of Farber’s TC, thus nullifying the critical compromise noted in Remark 1. This is a crucial feature for eventual technological TC-applications. For instance, running on a laptop computer, our algorithm finds in a bit less than a minute a system of piecewise linear motion planners giving
SC strict 0 ( Δ 2 ) = 1 .
This should be compared to the fact that, starting with the barycentric subdivision Sd 1 ( Δ 2 × Δ 2 ) , our computer implementation finds in about 10 h running time a system of piecewise linear motion planners recovering the weaker fact (2). The reported running times (obtained on the same laptop computer) are given for comparison purposes: the computation is about 600 times (unnecessarily) more complex by allowing a single subdivision. Naturally, the use of powerful computational clusters results in significant time reductions, thus allowing to replace the circle Δ 2 by complexes arising from actual applications. The moral is that, in general, an SC-approach to motion planning applications tends to perform satisfactorily well by ignoring the subdivision component. Actual applications of the SC-ideas to concrete problems by using powerful computer clusters will be addressed in a future publication.
Remark 2.
The ability to recast Farber’s TC in discrete terms without the need of subdivisions is definitively a convenient advantage of our SC-model over other discrete approaches. Specifically, the discrete topological complexity introduced in [7] of a simplicial complex whose geometric realization is a circle turns out to be one unit larger than TC ( S 1 ) (Theorem 5.6 [7]). Likewise, (if no subdivisions are allowed) the value of Tanaka’s combinatorial complexity on the minimal finite space model of a circle is two units higher than TC ( S 1 )  (Example 3.7 [8]).
The first part of the paper is devoted to reviewing the basic tools (Section 2) and developing the theoretical basis (Section 3) that shows that our model recasts homotopy notions such as Farber’s topological complexity and Lusternik-Schnirelmann’s category. This is done via Macías-Virgós and Mosquera-Lois’ homotopic distance, a concept whose discretization is achieved by means of Theorem 2. The second part of the paper has an applied focus: Section 4 describes the main processes in our algorithm, while Section 5 illustrates, via experimentation, the power that the technique has even when the subdivision ingredient is omitted.

2. Background

2.1. Topological Complexity via Homotopic Distance

Let P ( X ) stand for the free path space on a topological space X. Farber’s topological complexity of X, TC ( X ) , is the sectional category of the end-point evaluation map e :   P ( X ) X × X , i.e., the fibration taking a free path γ P ( X ) to the pair ( γ ( 0 ) , γ ( 1 ) ) . In other words, TC ( X ) + 1 is the smallest cardinality of open covers { U i } i of X × X so that e admits a continuous section σ i on each U i . Note that we use reduced terms, so that a contractible space has zero topological complexity. The open sets U i in such an open cover are called local domains, the corresponding sections σ i are called local motion planners, and the family of pairs { ( U i , σ i ) } is called a system of local motion planners for X. A system of local motion planners is said to be optimal if it has TC ( X ) + 1 local domains. In view of the continuity requirement on local rules, an optimal motion planner minimizes the possibility of accidents in the performance of a robot moving in a noisy environment.
When X is the realization of an abstract simplicial complex, the openness requirement on local domains can be replaced, without altering the numerical value of TC ( X ) , by requiring that local domains are subdivided subcomplexes (see [5], or the adaptation to the simplicial analogue of homotopic distance in the proof of Theorem 2 below). Furthermore, a local motion planner is really a (local) homotopy in disguise:
Lemma 1
([9] Lemma 4.21). The evaluation map e :   P ( X ) X × X admits a section on a subset A of X × X if and only if the restrictions to A of the two projections to the axes π i :   X × X X , i = 1 , 2 , are homotopic.
Consequently, TC ( X ) = D ( π 1 , π 2 ) , where:
Definition 1
([6]). The homotopic distance D ( f , g ) between two continuous maps f , g :   X Y is one less than the minimal cardinality of covers of X by open sets U on each of which the restricted maps f | U and g | U are homotopic.

2.2. Contiguity vs. Homotopy

For details on the facts reviewed in this subsection, the reader can consult standard references, such as (Chapter 3) [10].
Definition 2.
For a positive integer c, and a pair of simplicial maps φ , φ : J K ,
1. 
φ and φ are said to be 1-contiguous provided φ ( σ )     φ ( σ ) is a simplex of K for any facet (i.e., maximal simplex) σ of J.
2. 
φ and φ are said to be c-contiguous if there is a sequence of maps φ 0 , φ 1 , , φ c : J K , with φ 0 = φ and φ c = φ , such that φ i 1 and φ i are 1-contiguous for each i { 1 , 2 , , c } .
The sequence of maps φ j in Definition 2 Item 2 is called a contiguity chain of length c between φ and φ . We write φ c φ to mean that there is such a sequence, and write φ φ to mean φ c φ for some c. The latter is an equivalence relation in the set of simplicial maps J K . The corresponding equivalence classes are called contiguity classes. Note that contiguity classes are preserved under composition.
Remark 3.
Contiguity classes refine homotopy classes in the sense that the topological realizations of a pair of contiguous simplicial maps are homotopic through a piecewise affine homotopy. More importantly, as soon as highly subdivided complexes are allowed, this leads to a one-to-one correspondence between contiguity and homotopy classes. To make the latter statement precise (in Theorem 1 below), we need:
Definition 3. (a) For a simplex σ of K, the open realized simplex σ   K consists of the barycentric combinations v σ t v v with each t v positive. Note that the realization of σ, σ     K , is the closure of σ . (b) A simplicial approximation of a continuous map f :   J     K is a simplicial map φ :   J K such that φ ( x )   σ provided f ( x ) σ .
For instance, a simplicial map is the only approximation of its geometric realization. On the other hand, for a subdivision K of K, the standard homeomorphism K = K is approximated by any simplicial map φ :   K K with the property that, for every vertex v of K , the barycentric coordinate of v K at φ ( v ) is positive. Further, simplicial composition of approximations approximates the corresponding topological composition.
Theorem 1.
Uniqueness of approximations: Any two approximations of a continuous map are 1-contiguous. Further, for finite J:
(i) 
Existence of approximations: Any continuous map f :   J     K admits an approximation φ b :   Sd b ( J ) K for any b large enough. In particular, if ι :   Sd b + 1 ( J ) Sd b ( J ) is any approximation of the identity on J , then φ b ι and φ b + 1 are 1-contiguous.
(ii) 
Contiguity vs. homotopy: Recall that simplicial maps in the same contiguity class have homotopic topological realizations (Remark 3). Conversely, given homotopic maps f 0 , f 1 :   J K , there is a non-negative integer b 0 such that, for each b b 0 , any pair of approximations φ 0 ,   φ 1 :   Sd b ( J ) K of f 0 , f 1 , respectively, satisfy φ 0 φ 1 .
All complexes we deal with will be assumed to be finite. Additionally whenever we need to talk about products, they will be taken in the category of ordered complexes (fixing some linear order on the corresponding sets of vertices). The key point is that the topological realization of an ordered product of complexes is homeomorphic to the product of the topological realizations of the factors (see [11]). We do not require, though, that maps of ordered complexes preserve the given orderings.

3. Contiguity Distance

We now adapt the viewpoint in [5] in order to recast, in simplicial terms, the homotopic distance between continuous functions. Throughout this section φ , φ :   L K denote a fixed pair of simplicial maps. A subcomplex J of L is said to be a c-contiguity subcomplex for φ and φ if the restrictions φ | J and φ | J are c-contiguous. We say that J is a contiguity subcomplex for φ and φ if it is a c-contiguity subcomplex for some c. The strict c-contiguity distance of φ and  φ , denoted by SD c ( φ , φ ) , is defined as one less than the smallest cardinality of finite covers of L by c-contiguity subcomplexes for φ and φ . The strict contiguity distance of φ and  φ is SD ( φ , φ ) : = lim c SD c ( φ , φ ) , the eventual constant value of the monotonic sequence
SD 1 ( φ , φ ) SD 2 ( φ , φ ) SD 3 ( φ , φ ) .
The concept of strict contiguity distance was introduced in (Definition 8.1) [6] (see also [12]) under the name of contiguity distance. We use the shorter name for the actual notion recovering homotopic distance (see Definition 4 and Theorem 2 below).
Examples 1.
Note that the subcomplex generated by any simplex of L is a contiguity subcomplex for φ and φ provided (the topological realization of) K is connected. Connectedness of complexes is an assumption that will be in force from this point on. The relation φ c φ can be expressed through the equality SD c ( φ , φ ) = 0 , while the equality SC strict ( K ) = SD ( π 1 , π 2 ) holds by definition, where π 1 , π 2 :   K × K K are the two simplicial projections.
Remark 3 readily gives
D ( φ , φ ) SD ( φ , φ )
We next use the full power of Theorem 1 in order to adjust the definition of SD and replace the inequality in (4) by an equality. For each positive integer b, fix a simplicial approximation ι = ι b :   Sd b ( L ) Sd b 1 ( L ) of the identity on L . We abuse notation and write ι :   Sd b ( L ) Sd b ( L ) for the obvious iterated composition of ι maps ( b b ). Set SD c b ( φ , φ ) : = SD c ( φ b , φ b ) and SD b ( φ , φ ) : = SD ( φ b , φ b ) , the corresponding c-stabilized value, where the maps φ b , φ b :   Sd b ( L ) K stand for φ ι and φ ι , respectively. Note that the contiguity class of φ b (respectively  φ b ) depends only on that of φ (respectively  φ ). Although the numbers SD c b ( φ , φ ) depend in principle on the chosen set of approximations ι , the proof of (Lemma 3.3) [5] applies word for word to show that the c-stabilized value SD b ( φ , φ ) is independent of the chosen approximations. Furthermore, if J is a subcomplex of Sd b ( L ) and λ :   Sd ( J ) J is an approximation of the identity on J , then the two compositions in the diagram
Mathematics 09 02358 i006 are 1-contiguous, as they are approximations of the inclusion J     L . This shows SD c b ( φ , φ ) SD c + 2 b + 1 ( φ , φ ) , which yields the monotonic sequence
SD 0 ( φ , φ ) SD 1 ( φ , φ ) SD 2 ( φ , φ ) . 0 .
Definition 4.
The contiguity distance between φ and φ is
D ( φ , φ ) : = lim b SD b ( φ , φ ) ,
the b-stabilized value of the monotonic sequence (5).
Since D ( φ , φ ) = SD b ( φ , φ ) holds for any large enough index b, (4) becomes
D ( φ , φ ) D ( φ , φ ) .
We now adapt the argument in the proof of Theorem 3.5 [5] to prove:
Theorem 2.
Equality holds in (6).
Proof. 
Let D ( φ , φ ) = k and choose an open covering { U 0 , , U k } of L as in Definition 1. Since L is finite, there is an integer b 0 such that the realization of each simplex of Sd b ( L ) is contained in some U j ( 0 j k ). For each j { 0 , 1 , , k } , let L j be the subcomplex of Sd b ( L ) generated by those simplices whose realization is contained in U j . Then L 0 , L 1 , , L k cover L, and φ | L j and φ | L j are homotopic for 0 j k . By Theorem 1, we can pick large enough integers b and c such that, for each j { 0 , 1 , , k } , the two composites
Sd b + b ( L i ) Sd b + b ( L ) φ b + b φ b + b K
are c-contiguous. This yields D ( φ , φ ) = k SD c b + b ( φ , φ ) D ( φ , φ ) .    □
Since a continuous map f :   L K is homotopic to the geometric realization of any of its simplicial approximations, Theorem 2 and (Proposition 2.2 [6]) immediately yield:
Corollary 1.
For a pair of continuous maps f , f :   L K , we have
D ( f , f ) = D ( φ , φ ) ,
where φ , φ :   Sd b ( L ) K are any corresponding simplicial approximations (for some large enough b).
Actually, Theorem 2 allows us to import to the simplicial realm properties of homotopic distance proved in [6]. For instance:
Corollary 2.
D ( φ , φ ) is a contiguity invariant of the pair of maps ( φ , φ ) . Explicitly, if the simplicial maps in the diagram
Mathematics 09 02358 i007
satisfy β φ α ψ and β φ α ψ , with α and β contiguity equivalences (i.e., they have inverses up to contiguity), then D ( φ , φ ) = D ( ψ , ψ ) .
Corollary 3.
The inequality D ( φ , φ ) TC ( K ) holds, as well as the triangular inequality D ( φ , φ ) D ( φ , φ ) + D ( φ , φ ) and the “sublogarithmic” inequalities
D ( φ ψ , φ ψ ) D ( φ , φ ) + D ( ψ , ψ ) D ( φ × ϕ , φ × ϕ ) D ( φ , φ ) + D ( ϕ , ϕ )
for ψ , ψ :   M L , ϕ , ϕ :   L K and φ , φ , φ :   L K .
Corollary 4.
cat ( K ) = D ( , 1 K ) = D ( ι 1 , ι 2 ) and TC ( K ) = D ( π 1 , π 2 ) . Here 1 K is the identity map on K, π i are the simplicial projections in Examples 1, and ι i :   K K × K are the axial inclusions ι 1 ( v ) = ( v , v 0 ) and ι 2 ( v ) = ( v 0 , v ) .

4. Algorithms

We now describe a randomized algorithm whose implementation yields reasonable estimations of the contiguity distance between simplicial maps. As described in the introductory section, in the case of simplicial complexity, our implementation constructs reasonably close-to-optimal systems of piecewise linear local motion planners.
We represent an (abstract simplicial) complex K by a pair ( V K , F K ) , where V K is the list of the vertices of K, and F K is the list of the facets (i.e. maximal simplices) of K. This encoding is convenient because of Definition 2 Item 1 and, more importantly for our purposes, since a covering of a given complex is completely determined by a covering of its facets (see the discussion at the beginning of Section 4.3).
In what follows we assume given an algorithm, Contiguous, that checks whether two simplicial maps are contiguous. Note that if a simplicial map φ is contiguous (in the sense of Definition 2 Item 1) to a vertex map φ , then φ must be simplicial. In this paper we assume that Contiguous has been implemented solely on the basis of Definition 2 Item 1, so to admit any two vertex maps as input, necessarily reporting false whenever one of the input parameters is not simplicial. In fact, under these assumption, Contiguous ( φ , φ ) can be used to check if a vertex map φ is simplicial. Such a function is available in standard mathematical software systems such as SageMath (http://mirrors.mit.edu/sage/win/index.html, accessed on 15 January 2019). For testing, the implementation of our algorithms is on Python 3 with the tools of a complete SageMath installation (Approximately a 1 Gb download). It is worth noticing that the latter is a system with particular convenient features for our purposes—such as a function for spelling out (as a list of facets) the ordered simplicial product of ordered complexes. Also, some libraries for standard management of graphs and random numbers are already included. Therefore, it is not necessary to perform any additional imports or additional installations of frameworks.

4.1. Randomized Local Search of Contiguity Chains

Recall that, for finite abstract simplicial complexes J and K, Theorem 1 characterizes homotopy classes of continuous maps J     K in terms of contiguity classes of maps J K through a limiting process that takes finer and finer subdivisions of J. This classical fact is generalized in [13] by introducing a certain “contiguity complex” Contig ( J , K ) that approximates, as J becomes sufficiently subdivided, the homotopy type of the function space of continuous maps J     K . What is relevant for us is to remark that Blumberg and Mandell propose a certain randomized algorithm in order to study the rate of growth (under subdivision of the domain) of the components of Contig ( J , K ) . We adapt Blumberg-Mandell’s algorithm (without the subdivision component) for our computer implemented search of piecewise linear local motion planners.
The randomized algorithm LocalSearch (Algorithm 1) in this section inputs a pair of simplicial maps φ , φ :   J K , a positive integer M, and a probability parameter r ( r [ 0 , 1 ] ), and outputs a list Ψ that either contains a chain of maps
φ 0 , φ 1 , , φ c : J K , c M ,
satisfying the conditions in Definition 2 Item 2 or, else, is empty, in case the randomized search for (7) is not successful. Starting at φ , the search is done through a random walk with local steps in the space of simplicial maps J K . Actual steps in the walk are tried (and recorded in Ψ ), at most M times on a “greedy” basis, with the probability parameter r used to break a situation where no greedy step has been taken after a number of consecutive tries. A greedy step is actually taken whenever the distance from the goal map φ to the current position of the walk is larger than the distance from φ to the potentially new position of the walk. Here, the distance between simplicial maps f , g :   J K is defined as
d ( f , g ) = d K ( f ( v ) , g ( v ) ) ,
where the summation runs over the vertices v of J, and d K stands for the graph distance on the 1-skeleton of K.
Algorithm 1: LocalSearch. Current element in Ψ is recorded by ϕ.
Mathematics 09 02358 i001
We use the following variant of LocalSearch (Algorithm 1) in our actual implementation. Start by noticing that, at each step of the iterative process (line 5), the potential new position f in the walk—a random single-vertex variant of ϕ —may fail to be contiguous to the current position ϕ , thus preventing us from taking the greedy step (line 10). The construction of f (lines 6 and 7) can then be replaced by a process that, first constructs a list L ϕ , w of all the simplicial maps that differ from ϕ on a single randomly chosen vertex w V J , and then chooses f randomly from L ϕ , w (provided L ϕ , w ). Of course, with this modification, the first test condition in line 9 can safely be removed.

4.2. Reduction of Contiguity Chains

The random walk performed by LocalSearch (Algorithm 1) has a local-step basis: any two consecutive maps φ i and φ i + 1 in a sequence (7) produced by LocalSearch (Algorithm 1) differ only by their values at a single vertex of J. In particular, it is usual that LocalSearch (Algorithm 1) outputs a long sequence of (hundreds and even thousands of) consecutive contiguous maps in between φ and φ . This could be remedied by running a shortest path algorithm/heuristic on the contiguity graph generated by the maps φ i in the sequence. However, the construction of the graph is costly for large sequences. The simpler alternative described in this subsection works well given the random nature of LocalSearch (Algorithm 1).
The algorithm Reduce (Algorithm 2) attempts to reduce the size of a contiguity sequence ϕ = ( φ 0 , , φ c ) by reporting the sequence ϕ obtained from ϕ by discarding the terms φ + 1 , φ + 2 , , φ + m 1 in chunks φ , φ + 1 , , φ + m whenever m > 1 is maximal with φ and φ + m  contiguous.
Algorithm 2: Reduce.
Mathematics 09 02358 i002

4.3. Randomized Contiguity Subcomplexes

For simplicial maps ψ , ψ :   L K , the task of finding coverings of L by c-contiguity subcomplexes can be focused on facets of L. Indeed, by restricting to facets, a covering C of L by c-contiguity subcomplexes yields (in a non-unique way) a partition P of the facets of L. In such a situation, if J P stands for the subcomplex of L generated by the facets in a given P P , then C P : = { J P : P P } is a covering of L by c-contiguity subcomplexes with Card ( C P ) Card ( C ) . The definition of SD c ( ψ , ψ ) can therefore be reformulated by limiting attention to coverings C P coming from a partition  P of the facets of L as above. This is the viewpoint in the algorithms described next.
A random subset of the facets of L will most likely fail to generate a contiguity subcomplex. Likewise, a random partition P of the facets of L will most likely fail to produce a covering C P by contiguity complexes. A more careful randomized search is needed. As a first step, the randomized algorithm RCC (RandomContiguitysubComplex) in this subsection aims at constructing a maximal contiguity subcomplex for a given pair of simplicial maps. Then, in Section 4.4 we describe a randomized algorithm that searches for partitions P of the set of facets of L that yield a covering C P by contiguity subcomplexes. Lastly, the size of such a covering C P is optimized by the algorithm in Section 4.5. The latter algorithm is crucial for our purposes, as it gives us a real chance to get at systems of piecewise linear local motion planners that are (nearly) optimal in the sense of Section 2.2.
We start with the algorithm AddFacet (Algorithm 3), whose input is a pair of simplicial maps ψ , ψ :   L K , and a contiguity subcomplex J for ψ and ψ . It is implicitly assumed that J is generated by a set of facets of L. With this information, the algorithm looks randomly for the first facet σ of L not in J that, together with J, generates a contiguity subcomplex J . If such a facet σ is found, AddFacet (Algorithm 3) outputs  J , otherwise J is reported. Each testing is done by the algorithm LocalSearch (Algorithm 1) with the restricted simplicial maps ψ | J and ψ | J as parameters. Note that AddFacet (Algorithm 3) requires in addition the two parameters, M and r, needed by LocalSearch (Algorithm 1).
Algorithm 3: AddFacet. A random σ ensures variety of results from multiple runs.
Mathematics 09 02358 i003
The main algorithm in this subsection, RCC, is an iteration of AddFacet (Algorithm 3). Starting with two simplicial maps ψ , ψ :   L K as input, RCC applies AddFacet (Algorithm 3) recursively, using the output of the previous application as (part of) the input for the next application ( ψ and ψ are kept as the rest of the input for all iterations of Algorithm 3, AddFacet). The iteration starts by using the contiguity subcomplex generated by a randomly chosen facet of L, which is a contiguity subcomplex in view of Examples 1. The iteration is applied at most Card ( F L ) times, and is set to stop whenever the current application of AddFacet (Algorithm 3) is unable to add an additional facet (this will hold, for instance, if the total complex L has been identified as a contiguity complex for ψ and ψ ).
A slight generalization of RCC will also be needed in what follows. The algorithm AddFacets is an iteration of AddFacet (Algorithm 3) on the same grounds as RCC, except that the starting contiguity subcomplex is a prescribed parameter.
For latter use in the global algorithm, an actual implementation of both AddFacets and RCC should keep track of the (reduced version of the) last non-empty contiguity sequence  ϕ constructed by AddFacet (Algorithm 3), for this provides us with an explicit contiguity chain for the restrictions of ψ and ψ to the output of AddFacets (Algorithm 3) or RCC.

4.4. Randomized Coverings by Contiguity Subcomplexes

For simplicial maps ψ , ψ :   L K , the algorithm Covering (Algorithm 4) in this subsection constructs a partition P of F L as the one described in the initial paragraph of Section 4.3. The process is an iteration of RCC. Assume we have constructed a family  P of pairwise disjoint subsets of F L such that each P P generates a contiguity subcomplex J P for ψ and ψ ( P is empty at the start of the process). Then we execute RCC with the restricted maps ψ | I , ψ | I :   I K as parameters, where I is the subcomplex of L generated by the facets of L that do not lie in any P P . The set of relevant facets of the resulting contiguity complex is appended to P . The process is iterated until the resulting P partitions F L .

4.5. Optimization of Coverings

When applied to the two simplicial projections π 1 , π 2 :   K × K K , the algorithm Covering (Algorithm 4) in the previous subsection constructs systems of piecewise linear local motion planners in rather short time. In addition, in cases where we know the topological optimal TC ( K ) + 1 , some sporadic runs of Covering (Algorithm 4) report systems with cardinality reasonably close to optimal. In this subsection we describe the randomized algorithm OptimizedCovering (Algorithm 5) that addresses all other situations, i.e., those where the systems reported by Covering (Algorithm 4) appear to have too many domains. This is achieved by using a greedy strategy that attempts to reduce the number of piecewise linear local domains by increasing the size of large domains. OptimizedCovering (Algorithm 5) is the key process giving the convenient performance of our implementation without the need of expensive subdivisions, as advertised in the introductory section.
Algorithm 4: Covering.
Mathematics 09 02358 i004
Algorithm 5: OptimizedCovering.
Mathematics 09 02358 i005
OptimizedCovering (Algorithm 5) starts with a partition P of F L produced by Covering (Algorithm 4), and goes into an iterative process that aims at shortening the length of P . Explicitly, assume that, after the i-th stage of the iteration, the original partition has evolved to become the partition { P 0 , P 1 , , P p } . Then, using a control variable j (inductively assumed to lie in between 0 and p), the ( i + 1 ) -st recursive stage of OptimizedCovering (Algorithm 5) performs the following actions:
  • Order the partition so that Card ( P 0 ) Card ( P 1 ) Card ( P p ) .
  • Use the algorithm RCC to generate a random contiguity subcomplex J P of J P j P j + 1 P p . Keep in P the largest set of P and P j .
  • Use the algorithm AddFacets to add as many facets of
    P j 1 P j P p
    as possible to P, so to produce a contiguity subcomplex J Q containing J P . If j = 0 , part P j 1 is inexistent in (8). If j > 0 , keep in Q the largest set between Q and P j 1 .
The ( i + 1 ) -st iteration of the process then finishes by constructing the new (optimized) partition
{ P 0 , P 1 , , P j 2 , Q , P j 1 Q , P j Q , , P p Q } ,
where empty parts are eliminated. If j = 0 , parts P 0 , P 1 , , P j 2 , and P j 1 Q are nonexistent in (9). Lastly, in preparation for the next iteration, the control variable j is incremented by one, unless its value has to be reset to zero so to meet the inductive hypothesis on j. The rationale behind this process is to use the best possible contiguity subcomplex that can be built from the facets in i j P i (step (2)) to greedily improve on the cardinality of P j 1 (step (3)). The net effect of such a recursive process is that new longer portions start “bubbling up” in the most recently produced partitions, while shorter portions tend to disappear from previously constructed partitions, as their elements get added to the longer emerging parts. As a consequence, the new partitions tend to have fewer domains than the old partitions.
For better results, the main recursive loop in the process above is meant to be repeated a large number of times (indicated by a parameter N prescribed by the user). The pseudocode we describe uses in addition a parameter t (also determined by the user) that breaks the recursion as soon as a partition with t elements or less is achieved. The value of t is to be provided on the basis of getting a “short enough” partition, either because the user would be happy with the prescribed bound, or simply because it does not make sense to insist on getting a partition of length smaller that the optimal TC ( K ) + 1 (if the latter number is known in advance, say by theoretical but non-constructive means).

5. Computational Results

5.1. The Circle

Let K : = Δ 2 , i.e., the most efficient triangulation of the circle, with vertices labeled 0 , 1 , 2 . The (realization of the ordered) product structure on K × K is depicted in Figure 1, where opposite sides of the external square are identified as indicated. Using parameters M = 1000 and r = 0.1 for LocalSearch (Algorithm 1), OptimizedCovering (Algorithm 5) yields, in about 57 s, the contiguity covering { J 0 , J 1 } of K × K for the two projections, where J i is generated by the i-labeled triangles in Figure 1. We remark that the technical features of the equipment used for testing all the examples are as follows: Processor AMD ryzen 2400 G with a processor of 3.8 Ghz speed, 12 Gb RAM, and Windows 10 Pro OS. We anticipate that better performance could be obtained in practice when using a compiled programming language.
Relevant stages in the actual process performed by OptimizedCovering (Algorithm 5) that lead to the cover { J 0 , J 1 } are illustrated in Figure 2. At each of the stages shown, the largest (smallest) subcomplex is highlighted in light (dark) gray. OptimizedCover finishes when the dark gray subcomplex has been incorporated into two large subcomplexes. The corresponding contiguity chains (simplified by Algorithm 2, Reduce) for the restricted projections π 1 | J i , π 2 | J i :   J i K are described in Table 1 (for i = 0 ) and Table 2 (for i = 1 ). In particular, the optimal SC strict ( Δ 2 ) = 1 is attained though contiguity chains of length at most 9.
Remark 4.
Working instead with Sd ( K × K ) , OptimizedCovering (Algorithm 5) generates a system of piecewise linear motion planners using parameters M = 20,000 and r = 0.1 for LocalSearch (Algorithm 1). A detailed report of the resulting pair of piecewise linear domains and corresponding contiguity chains can be found in the Master’s thesis of the first author. Here we remark that, the use of the barycentric subdivision Sd ( K × K ) affects time performance dramatically, as the optimal covering is achieved in the subdivided case after 10 h of computer computations. Yet, despite the computer effort needed for such calculations, the output only gives that the optimal (2) can be attained though contiguity chains of length at most 26.

5.2. A Wedge of Two Circles

Consider the 1-dimensional complex K depicted in the following figure:
Mathematics 09 02358 i008
The geometric realization K is homotopic to a wedge of two circles. As in the case of a single circle, OptimizedCovering (Algorithm 5) recovers the well known equality TC ( K ) = 2 without requiring subdivisions. The 25-minutes calculation was accomplished using parameters r = 0.1 and M = 5000 for LocalSearch (Algorithm 1). The three resulting optimal piecewise linear local domains J 0 , J 1 , J 2 are generated by the following list of facets where, for simplicity, a vertex ( i , j ) of the ordered product K × K is labeled as 4 i + j :
J 0 :
{ 5 , 9 , 10 } , { 0 , 3 , 15 } , { 0 , 4 , 7 } , { 4 , 8 , 11 } , { 0 , 4 , 6 } , { 5 , 13 , 15 } , { 0 , 3 , 7 } ,
{ 0 , 2 , 10 } , { 0 , 2 , 6 } , { 0 , 4 , 5 } , { 0 , 12 , 14 } , { 1 , 13 , 15 } , { 0 , 12 , 15 } , { 4 , 5 , 9 } ,
{ 4 , 8 , 9 } , { 4 , 5 , 13 } , { 4 , 7 , 11 } , { 1 , 3 , 15 } , { 0 , 2 , 14 } , { 1 , 3 , 7 } .
J 1 :
{ 4 , 7 , 15 } , { 0 , 1 , 9 } , { 1 , 2 , 6 } , { 0 , 1 , 13 } , { 4 , 12 , 13 } , { 5 , 7 , 15 } , { 1 , 9 , 10 } ,
{ 1 , 13 , 14 } , { 0 , 1 , 5 } , { 1 , 5 , 7 } , { 4 , 12 , 15 } , { 0 , 8 , 9 } , { 1 , 5 , 6 } , { 0 , 3 , 11 } ,
{ 0 , 12 , 13 } , { 0 , 8 , 11 } , { 1 , 2 , 10 } , { 1 , 2 , 14 } .
J 2 :
{ 4 , 12 , 14 } , { 0 , 8 , 10 } , { 1 , 9 , 11 } , { 1 , 3 , 11 } , { 5 , 13 , 14 } , { 4 , 6 , 10 } , { 4 , 6 , 14 } ,
{ 5 , 6 , 10 } , { 5 , 6 , 14 } , { 4 , 8 , 10 } , { 5 , 7 , 11 } , { 5 , 9 , 11 } .
The corresponding contiguity chains are described in Table 3, Table 4 and Table 5.
Remark 5.
A detailed analysis of the computational complexity in our algorithms will be the basis of a future publication. For now, it should be remarked that, as reported above, while the case of a circle is solved in roughly a minute (obtaining an optimal system of piecewise linear motion planners), the case of a wedge of two circles took 25 min in order to produce the corresponding optimal result. Such an increment of time reflects the fact that we have not been able to get an optimal system of piecewise linear motion planners in the case of (a simplicial model of) the sphere of dimension 2, but only systems whose cardinality is above the known optimal TC ( S 2 ) = 2 .

6. Conclusions

We describe and implement a randomized algorithm based on Farber’s topological complexity model for robust-to-noise motion planning of an automated guided vehicle (AGV). The algorithm rests on a classical computational-topology foundation based on simplicial complexes, with iterated barycentric subdivisions playing a central role, thus allowing a full characterization of Farber’s invariant in discrete terms. This gives the first advantage of our model, as other discretization proposals in the literature lead only to approximations to the topological complexity of an AGV (See Remark 2). Additionally, the simplicial approach in this paper is more convenient than Tanaka’s finite-space approach in [8] as libraries and packages (relevant in eventual extensions of our implementation) are much better developed in the simplicial context. Also, our implementation in terms of ordered products of simplicial complexes has a natural advantage over the unordered product used in [7]. Indeed, on the one hand, the simplicial model for cartesian products resulting from using unordered products is larger in size than the one using ordered products. On the other hand, ordered products capture the homeomorphism type rather than just the homotopy type—as is the case for the unordered product. Furthermore, as reported in the paper, our implementation performs extremely well in the case of a circle and a wedge of circles, where the output reported recovers the theoretical answer without the need of iterated barycentric subdivisions. A future development of this research will include, on the one hand, discrete Morse theory techniques and, on the other, parallelization methods in powerful supercomputer clusters. This should make the TC approach fully usable in actual engineering applications.

Author Contributions

Conceptualization, A.L. and J.G.; Formal analysis, C.O. and A.B.; Funding acquisition, A.L.; Investigation, C.O.; Methodology, C.O. and A.B.; Resources, J.G.; Software, C.O.; Supervision, A.L. and J.G.; Validation, A.L. and A.B.; Writing—original draft, J.G.; Writing—review and editing, A.L. and J.G. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by Secretaría de Investigación y Posgrado, Instituto Politécnico Nacional, grant number SIP20211847.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Acknowledgments

Third author thankfully acknowledges the computer resources, technical expertise and support provided by the Laboratorio Nacional de Supercómputo del Sureste de México, a CONACYT member of the network of national laboratories, as well as the computing time granted by LANCAD and CONACYT in the Supercomputer Hybrid Cluster “Xiuhcoatl” at Coordinación General de Servicios de Tecnologías de la Información y las Comunicaciones (CGSTIC) of Cinvestav.

Conflicts of Interest

The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

References

  1. Carpin, S. Algorithmic motion planning: The randomized approach. In General Theory of Information Transfer and Combinatorics; Lecture Notes in Computer Science 4123; Springer: Berlin/Heidelberg, Germany, 2006; pp. 740–768. [Google Scholar]
  2. Latombe, J.-C. Robot Motion Planning; Kluwer Academic Publishers: Boston, MA, USA, 1991. [Google Scholar]
  3. Sharir, M. Algorithmic motion planning. In Handbook of Discrete and Computational Geometry; Series on Discrete Mathematics and Its Applications; CRC Press: Boca Raton, FL, USA, 1997. [Google Scholar]
  4. Farber, M. Topological complexity of motion planning. Discret. Comput. Geom. 2003, 29, 211–221. [Google Scholar] [CrossRef]
  5. González, J. Simplicial complexity: Piecewise linear motion planning in robotics. N. Y. J. Math. 2018, 24, 279–292. [Google Scholar]
  6. Macías-Virgós, E.; Mosquera-Lois, D. Homotopic distance between maps. Math. Proc. Camb. Philos. Soc. 2021. [Google Scholar] [CrossRef]
  7. Fernández-Ternero, D.; Macías-Virgós, E.; Minuz, E.; Vilches, J.A. Discrete topological complexity. Proc. Am. Math. Soc. 2018, 146, 4535–4548. [Google Scholar] [CrossRef]
  8. Tanaka, K. A combinatorial description of topological complexity for finite spaces. Algebr. Geom. Topol. 2018, 18, 779–796. [Google Scholar] [CrossRef] [Green Version]
  9. Farber, M. Invitation to Topological Robotics. In Zurich Lectures in Advanced Mathematics; European Mathematical Society (EMS): Zürich, Switzerland, 2008. [Google Scholar]
  10. Spanier, E.H. Algebraic Topology; McGraw-Hill Book Co.: New York, NY, USA, 1966. [Google Scholar]
  11. Eilenberg, S.; Steenrod, N. Foundations of Algebraic Topology; Princeton University Press: Princeton, NJ, USA, 1952. [Google Scholar]
  12. Borat, A.; Pamuk, M.; Vergili, T. Contiguity distance between simplicial maps. arXiv 2020, arXiv:2012.10627. [Google Scholar]
  13. Blumberg, A.J.; Mandell, M.A. Quantitative homotopy theory in topological data analysis. Found. Comput. Math. 2013, 13, 885–911. [Google Scholar] [CrossRef] [Green Version]
Figure 1. An optimized covering of the ordered product Δ 2 × Δ 2 .
Figure 1. An optimized covering of the ordered product Δ 2 × Δ 2 .
Mathematics 09 02358 g001
Figure 2. Main steps in Optimized Covering in the case of Δ 2 . (a) Output of Covering (Algorithm 4). (b) Third iteration. (c) Sixth iteration. (d) Seventh iteration.
Figure 2. Main steps in Optimized Covering in the case of Δ 2 . (a) Output of Covering (Algorithm 4). (b) Third iteration. (c) Sixth iteration. (d) Seventh iteration.
Mathematics 09 02358 g002
Table 1. Contiguity chain between π 1 | J 0 and π 2 | J 0 for J 0 in Figure 1. A row tabulates the values of the indicated simplicial map on the vertices ( i , j ) .
Table 1. Contiguity chain between π 1 | J 0 and π 2 | J 0 for J 0 in Figure 1. A row tabulates the values of the indicated simplicial map on the vertices ( i , j ) .
0 , 0 0 , 1 0 , 2 1 , 0 1 , 1 1 , 2 2 , 0 2 , 1 2 , 2
φ 0 = π 1 | J 0 000111222
φ 1 000211222
φ 2 000211002
φ 3 011211002
φ 4 012212002
φ 5 012012002
φ 6 = π 2 | J 0 012012012
Table 2. Contiguity chain between π 1 | J 1 and π 2 | J 1 for J 1 in Figure 1.
Table 2. Contiguity chain between π 1 | J 1 and π 2 | J 1 for J 1 in Figure 1.
0 , 0 0 , 1 0 , 2 1 , 0 1 , 1 1 , 2 2 , 1 2 , 2
φ 0 = π 1 | J 1 00011122
φ 1 02011122
φ 2 02011112
φ 3 02001112
φ 4 02001012
φ 5 02201012
φ 6 01201012
φ 7 02201012
φ 8 01201012
φ 9 = π 2 | J 1 01201212
Table 3. Contiguity chain on J 0 .
Table 3. Contiguity chain on J 0 .
0123456789101112131415
φ 0 = π 1 | J 0 0000111122223333
φ 1 0000111111220303
φ 2 0000110111210323
φ 3 0020110001210303
φ 4 0323110001200323
φ 5 0323110001200123
φ 6 0323010001200123
φ 7 0323010301200123
φ 8 = π 2 | J 0 0123012301230123
Table 4. Contiguity chain on J 1 .
Table 4. Contiguity chain on J 1 .
0123456789101112131415
φ 0 = π 1 | J 1 0000111122223333
φ 1 0000111102203333
φ 2 0001310102213333
φ 3 0000310102210003
φ 4 0020310100000023
φ 5 0003310100030003
φ 6 0103310101030003
φ 7 0103310301030003
φ 8 0103010301130003
φ 9 0113010301130113
φ 10 0113011301230123
φ 11 = π 2 | J 1 0123012301230123
Table 5. Contiguity chain on J 2 .
Table 5. Contiguity chain on J 2 .
0134567891011121314
φ 0 = π 1 | J 2 00011112222333
φ 1 00011112222311
φ 2 20011212222311
φ 3 12011212222111
φ 4 12211222122212
φ 5 12111211121212
φ 6 11111231121211
φ 7 23321232123112
φ 8 01321130123212
φ 9 01321230123012
φ 10 = π 2 | J 2 01301230123012
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Ortiz, C.; Lara, A.; González, J.; Borat, A. A Randomized Greedy Algorithm for Piecewise Linear Motion Planning. Mathematics 2021, 9, 2358. https://doi.org/10.3390/math9192358

AMA Style

Ortiz C, Lara A, González J, Borat A. A Randomized Greedy Algorithm for Piecewise Linear Motion Planning. Mathematics. 2021; 9(19):2358. https://doi.org/10.3390/math9192358

Chicago/Turabian Style

Ortiz, Carlos, Adriana Lara, Jesús González, and Ayse Borat. 2021. "A Randomized Greedy Algorithm for Piecewise Linear Motion Planning" Mathematics 9, no. 19: 2358. https://doi.org/10.3390/math9192358

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop