Minimum Path Star Topology Algorithms for Weighted Regions and Obstacles

09/14/2021 ∙ by Tyler King, et al. ∙ California State University Channel Islands cornell university 0

Shortest path algorithms have played a key role in the past century, paving the way for modern day GPS systems to find optimal routes along static systems in fractions of a second. One application of these algorithms includes optimizing the total distance of power lines (specifically in star topological configurations). Due to the relevancy of discovering well-connected electrical systems in certain areas, finding a minimum path that is able to account for geological features would have far-reaching consequences in lowering the cost of electric power transmission. We initialize our research by proving the convex hull as an effective bounding mechanism for star topological minimum path algorithms. Building off this bounding, we propose novel algorithms to manage certain cases that lack existing methods (weighted regions and obstacles) by discretizing Euclidean space into squares and combining pre-existing algorithms that calculate local minimums that we believe have a possibility of being the absolute minimum. We further designate ways to evaluate iterations necessary to reach some level of accuracy. Both of these novel algorithms fulfill certain niches that past literature does not cover.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 11

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Abstract

Shortest path algorithms have played a key role in the past century, paving the way for modern day GPS systems to find optimal routes along static systems in fractions of a second. One application of these algorithms includes optimizing the total distance of power lines (specifically in star topological configurations). Due to the relevancy of discovering well-connected electrical systems in certain areas, finding a minimum path that is able to account for geological features would have far-reaching consequences in lowering the cost of electric power transmission. We initialize our research by proving the convex hull as an effective bounding mechanism for star topological minimum path algorithms. Building off this bounding, we propose novel algorithms to manage certain cases that lack existing methods (weighted regions and obstacles) by discretizing Euclidean space into squares and combining pre-existing algorithms that calculate local minimums that we believe have a possibility of being the absolute minimum. We further designate ways to evaluate iterations necessary to reach some level of accuracy. Both of these novel algorithms fulfill certain niches that past literature does not cover.

2 Introduction

Throughout this paper we deal with the drawbacks of Weiszfeld’s algorithm, proposing alternative algorithms that deal with specific Euclidean spaces, including weighted regions and obstacles. It is known that algorithms such as the continuous Dijkstra paradigm [cdp2, latexcompanion] and A* pathfinding [monotone, Mousoulides2014] are effective at managing point-point shortest path problems, but are unable to be expanded to dealing with multiple nodes. By creating novel algorithms that can approximate minimums for star topology, we hope to have effects outside of the theoretical plane. In particular, we looked to connect several cities (viewed as nodes) to a central power grid (central node, obviated in following diagrams for simplicity). Ordinarily, Weiszfeld’s algorithm could be successful in optimizing this task, however, it lacks the ability to deal with geological difficulties such as national parks (obstacles) or mountainous versus flat terrains (weighted regions where more weight could be given to more challenging terrain) [WeiszfeldInfo].

We begin by proving the bounding of Weiszfeld’s algorithm as an introductory proof, establishing the tone for following proofs. We complete a proof by contradiction that shows any point outside of the convex hull can be reflected over the line formed by the edge of the convex hull to a new point (reference figure 1). From here, , and continuously reiterating through this pattern leads to a point inside the convex hull. Each reflection moves towards the set of points , ,…, , thus proving that all points outside the convex hull have some reflected point inside the convex hull that is closer to the set of points.

Figure 1: Point mirrored to point over line which extends out from line segment

For the next two proofs, We again use contradiction. We begin by parsing the area observed outside the convex hull into 4 distinct cases based on their location outside the convex hull (as seen in figure 2), and from each one of these cases, we prove that there exists some point inside or along the convex hull that is entrapping either all weighted regions+points or obstacles+points that is closer to the set of points , ,…, than any point outside the convex hull.

Figure 2: Parsing of area outside convex hull into 4 cases

We propose an algorithm that deals with weighted regions. By finding a minimum cost algorithm along this surface, it becomes possible to approximate the lower bound on the pricing for a star topological configuration of power lines from a central node to a set of nodes , ,, by bounding the convex hull inside a rectangular object and placing a grid pattern over it. Continue onward by splitting this graph into squares with side length (where initially and increases each iteration increases accuracy), and place a node at the center of each square that takes a weighted average of the regions within the square (represented as where this counts up to the number of squares in the grid). If any of , ,, falls inside the square, evaluate it at the node in the center of the square. This approach is demonstrated in figure 3.

Figure 3: Arbitrary region with nodes , , , surrounded by a convex hull (in purple). Graph has two distinct weighted regions (red highlight and green highlight) and is split into 6 squares, each with its center labeled . Within each square the average of the weighted regions must be calculated and any of the initial nodes , , , are evaluated at the nearest .

From the node that results in

where implements a minimum monotone A* pathfinding algorithm between nodes , (formalized in section 4), create a square that intersects the 8 successor nodes. From this new square, continuously reiterate through the pattern outlined earlier (splitting into new squares with side length ), leading towards an approximation of . Additionally, it is possible to incorporate Weiszfeld’s algorithm once some square that intersects the 8 successor nodes contains a consistent weighting.

With the second algorithm (which deals with obstacles), we start in a similar fashion, placing a grid over the convex hull and splitting it into squares. Certain squares were kept or removed as necessary based on whether they intersected the convex hull, and from the remaining squares, a node was placed at the center of each and labeled similarly to the first algorithm (shown in figure 4). However, from each node, the continuous Dijkstra paradigm could be applied, which dealt with Euclidean plane cases [continuousMitchell]. From here, create a new square around the 8 successor nodes. Place a grid over this square and place new nodes at the center of each new square, repeating the process using the continuous Dijkstra paradigm from every new node. This algorithm runs in time.

Figure 4: Arbitrary region with nodes , , , surrounded by a convex hull (in purple). Graph has one obstacle (highlighted in black) and is split into 6 squares, each with its center labeled . Squares that fall within the obstacle are not evaluated.

For both examples, we compute an upper bound on the number of iterations needed to calculate to within some value of and produce basic psuedocode outlining both algorithms.

Structure of the paper. The rest of the paper is organized as follows. Section 3 details opening and background information utilized throughout the paper. Section 4 introduces boundings for areas that must be checked to find the minimum sum of distances to several sample points. Sections 5 and 6 introduce the weighted region and obstacle problems respectively and both describe algorithms that can approximate a solution. Section 7 gives a brief overview of each algorithm. Section 8 contains conclusions. All proofs are located in the appendix, appearing in chronological order.

3 Literature Review

Most content covered revolves around Wieszfeld’s algorithm [einstein, Eckhardt_1980, Love2000, geometricmedian], A* pathfinding [monotone, Mousoulides2014], continuous Dijkstra paradigm (figure 5) [cdp2, latexcompanion], and other select minimum distance pathfinding algorithms. However, there is a discontinuity in applying Weiszfeld’s algorithm to weighted regions or obstacles. Although Weiszfeld’s algorithm can operate in near-linear time [geometricmedian] (and thus is more optimal than either of my proposed algorithms), it still cannot deal with cases that are not a consistent Euclidean plane. To begin addressing this challenge, we utilize the discretization of the Euclidean plane [cdp2], breaking it into multiple shortest path problems [latexcompanion], and then approximating the minimum by summing the independent paths. We refer to a generalized version of Weiszfeld’s algorithm as star topology (or star network), where one central node connects to several other, distinct nodes. Although algorithms such as A* pathfinding and the continuous Dijkstra paradigm looked promising initially, they lacked the scalability of Weiszfeld’s algorithm and thus we looked for ways to expand these algorithms to approximate a node that minimizes distance to all other nodes. An application of Weiszfeld’s algorithm is demonstrated in figure 6.

Figure 5: Continuous Dijkstra paradigm finding a minimum path from node to node (each W represents another stage of the propagation of the wavelet) around obstacle [latexcompanion]

Figure 6: Manifold produced by summing the distance to 7 randomly selected points. Weiszfeld’s algorithm can then be applied to approximate the minimum sum along this manifold

4 Bounding via Convex Hull

Definition 4.1.

represents some arbitrary path between points , .

Definition 4.2.

represents the numerical minimum distance between two points , where . For example,

Definition 4.3.

define as the path of the distance outlined by some function between points , . For example, represents the path that is traveled along .

Definition 4.4.

A convex hull with finite volume and points , ,, can be defined as [convexhull]

Definition 4.5.

Assume represents the intersection of two distinct geometric constructs.

Lemma 4.6.

For point that falls on some side of line and points that fall on the same side of line as or on line ,

where is the reflection of across .

Theorem 4.7.

For some set of points , , ,, ,

occurs when falls in or along , where is the convex hull formed by points , ,, .

Remark 4.8.

Although this technique was effective for the scenario without obstacles or weighted regions, it did not generalize well. As a result, a new, more intensive technique was necessary to approach these challenges. However, we decided to keep these proofs both for completeness and to give insight to a technique that may have future possibilities.

Definition 4.9.
Lemma 4.10.

For some set of points , ,, and set of polygons whose interior can be modeled by that all fall on or on one side of some line in the Euclidean plane, the minimum sum of distances from a new point to the set of points , ,, such that for must occur where is either on line or on the same side as the aforementioned set of points.

Theorem 4.11.

For a set of polygons whose interiors can be modeled by and points , , ,, where and for ,

must occur when falls in or along , where is the convex hull entrapping all points , ,, , and the set of polygons .

Definition 4.12.

Assume traverses some distance across polygons, where can be represented by the set of paths and points where traverses across only one polygon and falls between points , (which fall on the boundaries of polygons) for . For , falls between points , , and for , falls between , . Furthermore, assume represents the weighting for traversing across . Then,

The minimum distance along a weighted regions surface can then be expressed by , where

Lemma 4.13.

For some finite region parsed into distinct polygons each with an independent weighting and points , , ,, , such that , ,, and fall on the same side or on some line in the Euclidean plane,

occurs when falls in or on where C is the space of the convex hull entrapping all points , ,, , and the polygons .

Theorem 4.14.

For some finite region parsed into polygons each with an independent weighting and points , , ,, ,

occurs when falls in or along , where C is the space of the convex hull entrapping all points , ,, , and the set of polygons

5 Star Topology Weighted Regions Algorithm

In this section, we detail our first algorithm meant to deal with weighted regions for star topology algorithms.

Definition 5.1.

For some arbitrary path between nodes , that traverses nodes where from each node it must travel to one of the 8 surrounding successor nodes ,

where each new has 8 new that can be selected, is the weighting of the successor node that was chosen, and for .

With the knowledge that the exact solution to the aforementioned weighted regions algorithm cannot be calculated in polynomial time (except for select special cases) [einstein], an approximation algorithm is created by procuring a grid pattern on the Euclidean plane that is equally spaced by some arbitrary distance across the convex hull. the convex hull can be inscribed in a rectangle with side lengths , . The number of nodes created by this technique can be calculated as , where on the sides of the rectangle the grid extends over by

for sides , respectively. For each square formed by the intersections of the grid, position a node at the center that takes the weighted average of the regions inside the square. If any , ,,

fall within a weighted square, evaluate its position as the center node of the square. In the off chance that a point falls along an edge (or corner), randomly select the center node for one of the nearest squares. Using a monotone heuristic A* pathfinding algorithm

[monotone] from a central node (at each ) to each independent node , ,, , a two-dimensional manifold can be constructed. Assume that the successor nodes to some node are the 8 surrounding nodes. Create a square called with side length with the 8 surrounding nodes such that the lowest node is entrapped by this square. If an edge or corner square is selected, add squares around the square chosen such that there exists 8 surrounding squares/nodes. Each of the 8 surrounding nodes are then given a weighting based on the number of paths that run through each node. From here, parse (in this case ) into

(where represents the nearest integer value) new squares, each with side length

Similar to earlier, create a node at the center of each of these squares that takes a weighted average of the regions inside the square. By again using a monotone heuristic A* pathfinding algorithm from each node, the minimum cost of traversing some paths from each node can be found. Proceed to create a new square with side length that entraps the lowest node. From here assign and increment to , and continuously reiterate through this pattern. This results in

where is an approximation of

Although higher values of lead to faster convergence and greater accuracy, it likewise rapidly increases complexity. Low values of lead to extreme granularity, resulting in a likelihood of completely missing a reasonable local minimum.

5.1 Star Topology Weighted Regions Algorithm Logic

The use of a monotone heuristic algorithm results in significantly more nodes being covered while looking for a minimum distance path. This allows for the reuse of covered nodes when attempting to expand to other nodes. A* pathfinding operates under the equation

where is the next node on some path, represents the cost from the start node to node , and

is a heuristic that estimates the cost of the minimum path from

to the goal. The bounding for the evaluation of this heuristic can be modeled by

where is a successor to , is the cost of traversing from node to , and is a goal node. This heuristic is defined as monotone (or consistent), and by induction, will always be admissible and therefore will never overestimate the cost of reaching the goal [Mousoulides2014].

The creation of the two-dimensional manifold plays an integral role in finding the absolute minimum of the test points. We assume that the relatively consistent topological tendencies for the areas of interest (i.e. areas with low access to electricity) [topology] necessitate that the absolute minimum on the Euclidean plane of

has a likelihood of occurring between the minimum node and its 8 surrounding nodes instead of between two other, non-minimal nodes. This topological consistency is the same logic as to why we use the convex hull of the points , ,, as a bounding for the weighted regions graph even though there is a possibility that the node that leads to

existing outside of the convex hull.

The weightings for each of the 8 successor nodes that fall on surrounding the lowest node can be determined by parsing

into 8 distinct values where each for is correlated to one of the successor nodes and the first one of these nodes that (which is equivalent to ) hits after leaving increments the value of by 1. Each weighting has a related successor node whose coordinated are stored in . Once the new grid with squares of side length

is placed down, the new lowest node can be calculated by

This pattern can be repeated over and over, converging towards a local minimum.

Eventually, the convergent pattern will form some square where the entire region inside the square has a constant weighting. At this point, the weighting of the region can be disregarded and the discretization of the graph can be stopped. We propose a simple modification to Weiszfeld’s algorithm that takes into account the different weightings of each individual node. In this regard, the goal point from here is known as the geometric median [geometricmedian], which is defined as

where represents the weighting of some node , represents the coordinate position of the related successor node to () and is the convex hull of points for .

Lemma 5.2.

Call some initial point inside square . Continuously iterating through

will approach the geometric median :

Figure 7: Manifold produced by calculating the distance to each for . From and going clockwise, the weightings are as follows: . Weiszfeld’s algorithm would approximate the minimum along this manifold
Remark 5.3.

Note that since the Weighted Regions algorithm converges towards a single point over an infinite number of iterations and Euclidean space is defined as continuous, any randomly selected singular point that the algorithm converges towards in this space cannot fall on top of a line. Therefore, there will always be a case where Wesizfeld’s algorithm can be applied.

Lemma 5.4.

The number of iterations needed to calculate the target accuracy (represented by some variable ) can be modeled by

where , is the target accuracy, and represents the number of squares after iteration in (this technique does not take into account the possible utilization of Weiszfeld’s algorithm).

6 Star Topology Obstacles Algorithm

This section details an algorithm that can compute a minimum for some set of nodes , ,, . The technique used is necessary to allow for the calculation of a minimum while running in reasonable time (i.e. not just sampling every possible point across the convex hull). By continuously ”zooming” in on a certain sub-section of the convex hull, it becomes possible to focus towards a minimum.

Although the continuous Dijkstra paradigm (CDP) is known to run in polynomial time (where represents the number of distinct vertices along and the convex hull) when finding the minimum distance between two points, little is known about the circumstances surrounding minimum distance from a central node to several other nodes with interiors of polygonal obstacles modeled by where [cdp2, latexcompanion].

Begin by assuming that the paths from some central node to additional nodes , ,, cannot intersect with the interiors of these polygons (and each node is on the Euclidean plane). Begin by creating a convex hull entrapping all polygons and nodes , ,, and placing a grid over the convex hull with each horizontal and vertical line separated by distance . Extremely high values of result in inaccuracies that could lead towards a shallow local minimum, while extremely low values of are more likely to zone in on deeper local minimums but with the trade-off of high runtimes. Reform all squares that are only partially in the convex hull into complete squares with side length , and any squares formed completely outside of the convex hull are discarded. From the remaining squares , position an independent node at the center of each one. If any of these nodes fall inside , disregard the square (however still count it as a square ). From each one of these nodes , simulate the paradigm by propagating an initially circular wavefront that changes on interactions with obstacles. The wavefront from at time is the set of points where represents the points that are considered the wavefront at time . Interactions with obstacles result in the wavefront being formed of multiple wavelets, each of which have a center from or from a vertex along . While the waves propagate, the distinct wavelets may be generated, disappeared, or broken into two wavelets [latexcompanion]. When the two neighboring wavelets to some arbitrary wavelet merge together, the middle wavelet can be said to be eliminated. Any existing wavelet upon contact with for the first time splits into two new wavelets.

The first intersection between and for each has a related . For each ,

For the minimum of all these values, create a square around it connecting the 8 surrounding squares. If an edge or corner square is selected for the center of , create ”empty” squares around the square chosen such that there exists 8 surrounding nodes. Although the grid is placed over these ”empty” squares, any squares created after the grid is placed that are fully in the ”empty” squares are disregarded (i.e. their points are not tested). Parse into new squares. Create new nodes at the center of each new square called . From each one of these nodes, repeat through the pattern outlined earlier (however, if

, don’t test the point instead of removing it). With every new, smaller square (

) being formed, it has nodes for . Continue until some level of accuracy where and .

Lemma 6.1.

The number of iterations needed to calculate the accuracy of can be determined by

where , is the target accuracy and represents the number of squares after iteration in .

Figure 8: Rate of convergence for distinct values of . If , iterations of the algorithm will not converge
Remark 6.2.

To shorten the notation for runtime complexity in this algorithm, we set . This was based on figure 8, where was determined to be a fair rate of convergence that would maintain a high level of accuracy. We believe it is fair to make these substitutions for the obstacles algorithm and not the weighted regions algorithm because there is greater variation with respects to accuracy in weighted regions, while this variation is more negligible with the obstacles case.

Lemma 6.3.

The Star Topology Obstacles algorithm given some target accuracy in runs in time

7 Overview of both Algorithms

Input: points , , ,,
      Input: set of polygonal regions
      Input: desired accuracy

1:Create convex hull such that
2:Place a rectangle with dimensions , such that is inscribed
3:Position a two-dimensional grid equally spaced some distance apart (and is able to extend over edges , ) where all squares have a node at its center
4:
5:while  do
6:     for  do
7:         calculate
8:     end for
9:     , find
10:     create square around with the 8 surrounding nodes
11:     cut into new squares
12:     place at the center of each new square
13:     
14:     
15:end while
16:Output
Algorithm 1 Star Topology Weigheted Regions Algorithm
Remark 7.1.

Note that on line 6 (in algorithm 1) for the first iteration,

Remark 7.2.

For the sake of brevity we choose not to include the possible Weiszfeld’s algorithm addition, which can serve as an alternative to the while loop once the region inside some square contains the same weighting.

Input: points , , ,,
      Input: set of polygonal obstacles
      Input: desired accuracy

1:Create such that
2:Position a two-dimensional grid equally spaced some distance apart where all squares who have some part and some part have a node at its center
3:
4:while  do
5:     for  do
6:         calculate
7:     end for
8:     , find
9:     create square around with the 8 surrounding nodes
10:     cut into new squares
11:     place at the center of each new square
12:     
13:     
14:end while
15:Output
Algorithm 2 Star Topology Obstacles Algorithm

8 Conclusion

We initialize this paper by proposing boundings on the possible positions of the central node for minimum distance star topology graphs across three distinct cases. We additionally develop two novel algorithms, dealing with specific cases of star topology when there is the inclusion of obstacles and weighted regions, both of which are achieved by discretizing the Euclidean plane. Overall we believe these algorithms will provide new opportunities in civil engineering, finding cheaper routes to connect central power stations to multiple external cities. Although these algorithms are still in their early stages, we are interested in finding ways to incorporate them into programming languages to develop manifolds similar to the ones obtained for Weiszfeld’s algorithm, while also looking into possible runtimes for certain cases of the first algorithm (although this may not necessarily be calculable as A* pathfinding runs on a heuristic).

References

Appendix A Properties of Convex Hulls (Proofs)

This section compiles all proofs for lemmas stated in section 4 on convex hulls surrounding Euclidean spaces, spaces with obstacles, and spaces parsed into weighted regions.

a.1 Bounding for Algorithms in Euclidean Space

Lemma A.1.

For point that falls on some side of line and points that fall on the same side of line as or on line ,

where is the reflection of across .

Proof.

Construct line segments , , . Since is a reflection over , it logically follows that . Place a new point on such that and thus, . Since falls either on the same side as or on ,

Since all line segments are strictly a positive value,

by Pythagorean theorem. On the Euclidean plane without any weighted regions, obstacles, or other obtrusions, the minimum distance between two points is a straight line, and therefore

must be true, concluding the proof. A visual example is provided by figures 1 and 9, where figure 1 represents the first reflection and figure 9 represents the second reflection. ∎

Figure 9: Point mirrored over line which extends out from line segment . New falls within the convex hull
Theorem A.2.

For some set of points , , ,, ,

occurs when falls in or along , where is the convex hull formed by points , ,, .

Proof.

First assume point falls outside of the convex hull . Select the two vertices on the exterior of the convex hull that are closest to . Extend the line segment formed by these two vertices into line . Call the reflection of across this line point . By lemma 4.6, it is known that . It follows that

However, since the points of a convex hull can never be strictly co-linear, the points , ,, will never all fall on , so there will always be some circumstance where , therefore

For each new point , assume . Then reiterate through this strategy to a new point . This pattern repeats acyclically, as once mirrors over some edge and ends up inside the convex hull,

is instead true as a result of being on the same side of as points , ,, . After performing , the new position of falls outside of the convex hull. This pattern repeats cyclically, and thus the point (or ) inside the convex hull serves as

for all or . Therefore, any points outside the convex hull has a point inside the convex hull that is closer to the set of points , ,, , and thus, a contradiction arises, concluding the proof. ∎

a.2 Bounding for Algorithms in Region with Obstacles

Lemma A.3.

For some set of points , ,, and set of polygons whose interior can be modeled by that all fall on or on one side of some line in the Euclidean plane, the minimum sum of distances from a new point to the set of points , ,, such that and for must occur where is either on line or on the same side as the aforementioned set of points.

Proof.

First assume a point falls on the opposite side of as points , ,, such that

is minimized. Call the intersection of and point for . Then, position a point on line such that . It follows that

as is a leg of a right triangle while is the hypotenuse. Since , the other leg of this right triangle must traverse some distance, therefore demonstrating that for . Since (as either falls along the path or serves as a detour), for . Therefore

and thus a contradiction arises, concluding the proof. ∎

Theorem A.4.

For a set of polygons whose interiors can be modeled by and points , , ,, where and for ,

must occur when falls in or along , where is the convex hull entrapping all points , ,, , and the set of polygons .

Proof.

Assume the convex hull has edges and vertices labeled clockwise cyclically from , ,, , where and edges between and . For each where , draw lines outward that are perpendicular to , at . Assume some point does not fall within or on an edge of . Then, must fall within one of four spaces (shown in figure 10):

Figure 10: Parsing of area outside convex hull into 4 cases

Case 1: falls within an area formed by an acute angle
Assume the point and edges nearest to are and , . Extend edges , outward. Without loss of generality position a point along the extension of where . Since all points fall inside or along the convex hull (and thus on the other side of ), lemma 4.10 can then be applied. This process can be iterated again to a point that falls along (since and all points fall on the other side of , lemma 4.10 can again be applied). It follows that

with being along the convex hull.
Case 2: falls within an area formed by a right angle
A similar strategy to Case 1 can be applied, with and , being the closest vertex and edges to , respectively. Without loss of generality, assume a point falls along such that . Then move along the extension of to a point that is located at . This holds true since is perpendicular to . In both scenarios, lemma 4.10 proves that both these movements are strictly decreasing


Case 3: falls within an area formed by an obtuse angle
Call the nearest vertex to and the nearest edges , . Extend line segments , outward to , respectively. If now falls between these two extensions, without loss of generality, call a point on such that . If does not fall between , , determine whether is closer to or . If falls closer to , place point on such that . Alternatively, if falls closer to , create a line through orthogonal to . Call the intersection of this line and point . Call a point on such that . Continuously reiterate through this process to a new point that follows the piece-wise function

These iterations and steps proposed earlier all follow lemma 4.10 as the set of points , ,, all fall on the opposite side or along the line that is being moved towards perpendicularly. Therefore,

Case 4: falls within an area enclosed by 2 right angles or along a boundary between two areas
Call the edge nearest to . Position along (and thus on the convex hull) such that . lemma 4.10 proves that