Abstract
Keywords
Introduction
Wireless sensor nodes are programmable sensors that are usually battery-powered and capable of simple data processing and communicating with each other through wireless links to form a wireless sensor network (WSN). A WSN eliminates the need for expensive and troublesome network cabling and makes placement cheap and flexible. There are usually requirements that need to be met when deploying a WSN. One such requirement is the placement of nodes. For example, sensing nodes must be placed at certain locations to allow them to gather data from the data sources, and a base station node might need to be placed in a special control room. Due to the placement requirements and limited node transmission range, a network might be partitioned initially. To form an interconnected network, additional nodes called relay nodes are necessary. While wireless sensor nodes are generally regarded as inexpensive devices, deploying a network with a huge number of nodes or a network to cover a large geographic area still incurs considerable cost; therefore, proper planning needs to be done prior to network deployment to minimize cost while satisfying the other requirements.
The minimum relay nodes placement (MRP) problem can be categorized according to the dimension of the space nodes to be placed. In the two-dimensional (2D) problem, nodes are to be placed in the 2D Euclidean space
Our contributions are as follows:
First, a variable-dimension meta-heuristic based on PSO called the multi-space particle swarm optimization (MSPSO) is proposed for use in problems where candidate solutions (for an instance of the problem to be solved) could be of different lengths (having different numbers of dimensions).
Second, the MRP problem in 2D WSNs is modeled as a Steiner tree problem with minimum Steiner points and bounded edge length (STP-MSPBEL) problem and addressed by first transforming it into a different problem that we refer to as the dual problem. To the best of our knowledge, this is the first article to discuss the variable length property for candidate solutions of an instance of the STP-MSPBEL problem, transform the problem into the dual problem, and solve it (the primal problem) using a PSO-inspired optimization method.
This article is organized as follows. First, related works are discussed in section “Related works.” In section “MSPSO to address the STP-MSPBEL problem,” we describe the problem that we attempt to solve and our proposed optimization method. In section “Results and discussion,” our proposed optimization method is used to solve several randomly generated instances of the STP-MSPBEL problem to demonstrate its effectiveness. Finally, we offer conclusions in section “Conclusion.”
Related works
In this article, the MRP problem in 2D WSNs is approached. We formulate the problem as a STP-MSPBEL problem. Research studies in the literature that have approached the STP-MSPBEL problem and other similar problems can be categorized into two main categories. In the first category, works are very similar to one another as they are all based on the minimum spanning tree (MST) heuristic. In the second category, meta-heuristics are used to address the problem. In Lin and Xue,
3
the MST heuristic was proposed for the STP-MSPBEL problem, and it was shown that it has a lower bound or worst-case performance of 5. However, the authors of Chen et al.
4
showed that the algorithm in Lin and Xue
3
is actually a four-approximation algorithm. In Lin,
5
the terminal Steiner tree with bounded edge length (TSTBEL) problem, which is similar to the STP-MSPBEL problem, was introduced. In Cheng et al.,
6
the authors proposed two heuristics for the STP-MSPBEL problem. One has a performance ratio of 3, while the other has a performance ratio of 2.5. The three-approximate algorithm is similar to the MST heuristic with the exception that degree-3 Steiner points are added to the tree for every subset of three terminals
In an instance of the STP-MSPBEL problem, candidate solutions may have different lengths. In the classical PSO, all candidate solutions for an instance of the problem to be solved have the same length. There are few works in the literature on solving problems where candidate solutions can be of different lengths with PSO. However, the idea of applying PSO to solve these problems has been proposed before in other problems. In Pappala and Erlich, 17 a variable-dimension optimization approach based on PSO was proposed to tackle the unit commitment problem (UCP). In Yan and Osadciw, 18 dimension-adaptive particle swarm optimization (DA-PSO) was proposed and demonstrated to solve the Weibull mixture model density estimation problem.
MSPSO to address the STP-MSPBEL problem
Problem formulation
In the MRP problem in 2D WSNs, a set of nodes (their locations in 2D Euclidean space) consisting of both base station and sensing nodes is given. This constitutes the requirement of the placement of nodes during a WSN deployment. Sensing nodes are to collect data from sites and send them to base station nodes. However, due to placement requirements, a sensing node could be placed far from its base station node. As a result, relay nodes might be needed to help relay packets. The following assumptions are made for our study:
There is only one base station node in the entire network.
Base station and sensing nodes can relay data packets.
All nodes have the same maximum transmission range.
Two nodes can communicate if they are within transmission range of each other.
Using assumption (2), because sensing and base station nodes can relay data packets, whether a node is a base station node or a sensing node is not important; hence, we simply treat them as a single type of node. For convenience, we refer to both base station and sensing nodes simply as demand points for the remainder of this article. Based on these assumptions, the MRP problem can then be formulated as a STP-MSPBEL
3
problem. In the STP-MSPBEL problem, given a set
Multi-space particle swarm optimization
The STP-MSPBEL is a variable-dimension problem. To solve such a problem, we propose the use of a variable-dimension meta-heuristic based on PSO. We name the proposed method as MSPSO.
MSPSO is extended from PSO. The difference between MSPSO and the classical PSO is that in the classical PSO, the search space is of a fixed number of dimensions, while in MSPSO, the search space is the “universe” and consists of different search spaces of different numbers of dimensions. In this article, MSPSO is applied to solve the STP-MSPBEL problem; hence, the entire process is called MSPSO-STP-MSPBEL. To aid in understanding, an overview of the entire MSPSO-STP-MSPBEL process is shown in Figure 1.

Overview of the MSPSO-STP-MSPBEL process.
The degree of a node is the number of edges incident with that node. In the classical STP problem, Steiner points are of degree 3. According to Lin and Xue, 3 in the STP-MSPBEL problem, Steiner points can be of degree 2 or 3. However, in Theorem 1, we state that for the STP-MSPBEL problem, Steiner points can have a degree of at most 5.
Theorem 1
In the STP-MSPBEL problem, Steiner points can have a degree of at most 5.
Proof
Before we prove that Steiner points can have a degree of at most 5 in the STP-MSPBEL problem, we first analyze a similar problem in Chen et al.
19
Figure 2 was used in Chen et al.
19
as an example to prove that the Steinerized MST has a worst-case performance of 4. In Figure 2, the black-colored circles are the demand points. In Figure 2(a), the empty circle is the Steiner point of the optimal solution, and ε is a small positive real number such that the distance from the center to each vertex is within

An input instance to the STP-MSPBEL to prove that the MST heuristic has a worst-case performance of 4 in Chen et al. 19

A Steiner point in STP-MSPBEL has a degree of at most 5.
The MSPSO-STP-MSPBEL proceeds as follows. Given an instance of the STP-MSPBEL problem, we first try to locate the degree-3 or higher Steiner points. For the sake of convenience, we refer to degree-3 or higher Steiner points simply as degree-3+ Steiner points. To locate the degree-3+ Steiner points, the notion of anchor Steiner points is used. Anchor Steiner points are Steiner points, and together with demand points, they are used as input to the MST construction process to construct a candidate solution to the STP-MSPBEL input problem instance. In other words, anchor Steiner points are candidates for degree-3+ anchor Steiner points. When the anchor Steiner points are located, the remaining non-anchor/regular Steiner points can easily be determined by Steinerizing the edges in the MST formed by the demand points and anchor Steiner points. We name them as anchor Steiner points because they serve as anchors to allow other regular Steiner points of degree-2 to be determined.
The following reasons dictate the use of anchor Steiner points in our article. (1) Because the number of degree-3+ anchor Steiner points is much less than the total number of anchor Steiner points in the optimal solution, it is wiser to search only for the degree-3+ anchor Steiner points rather than to search for all anchor Steiner points because assuming that all anchor Steiner points in a candidate solution have equal probability of matching an anchor Steiner point in the optimal solution, the probability that a candidate solution (a set of anchor Steiner points) is an exact match to the optimal solution decreases with increasing number of anchor Steiner points in the optimal solution. In other words, it is easier for a candidate solution to match only the degree-3+ anchor Steiner points rather than to match all anchor Steiner points. (2) By determining a candidate solution using the MST construction process, a candidate solution is guaranteed to (a) have the minimum number of Steiner points needed among all spanning trees of demand points and anchor Steiner points, and (b) the candidate solution is valid, that is, the tree is spanning (interconnected). The working principle behind MSPSO is simple: MSPSO merely needs to address a subset of points, the anchor Steiner points, that is, how many of them there are and where they should be placed. MSPSO needs no complex algorithm for how to form a Steiner tree and ensure that all points are connected.
The minimum number of anchor Steiner points needed to Steinerize an edge of length
By determininig the solution to an instance of the STP-MSPBEL problem by first locating the degree-3+ anchor Steiner points, we in fact have converted this problem to another problem, which is referred to as the dual problem.
Definition 1: the primal problem (the STP-MSPBEL problem)
Given a set
Definition 2: the dual problem
Given a set
where
Now that the notion of anchor Steiner points is introduced, we state in Theorem 2 that the fitness of a candidate solution is varied only by anchor Steiner points.
Theorem 2
A candidate solution’s fitness is varied only by anchor Steiner points.
Proof
Regular Steiner points are determined by Steinerizing edges in the MST formed by demand points and anchor Steiner points. Because demand points are fixed (their quantity and their position are given), only the anchor Steiner points (their quantity and their position) can affect the MST formed and thus affect the fitness of a candidate solution.
In PSO, a particle’s position in the search space represents a particular solution to the instance of the problem to be solved. In MSPSO-STP-MSPBEL, a particle is encoded as a set of points in 2D Euclidean space, and a point is represented with a pair of numbers that corresponds to their coordinates in the 2D Euclidean space. For example, a candidate solution {(3, 4), (6, 8)} represents that there are two anchor Steiner points and that they are located at coordinates (3, 4) and (6, 8), respectively. Another candidate solution {(2, 5), (6, 7), (4, 6)} specifies that there are three anchor Steiner points and that they are located at coordinates (2, 5), (6, 7), and (4, 6), respectively.
As mentioned earlier, a candidate solution to an instance of the STP-MSPBEL problem could have between zero and infinite anchor Steiner points. To avoid an infinite search, the range limit of the number of dimensions of the spaces is first determined. The maximum value of this range is set according to the following observations: the MST heuristic can be used to get an approximate to the optimal solution to a given instance of the STP-MSPBEL problem. As explained earlier, we try to solve the dual problem to solve the primal problem. In the dual problem, we are to locate degree-3+ anchor Steiner points in the primal problem using anchor Steiner points. Because
where
Initialization of particles
After the range of the number of dimensions of spaces is determined, we generate particles that randomly vary in the number of dimensions. Then, for each particle in the swarm, a number
Theorem 3
All Steiner points (anchor and non-anchor) should be located within the convex hull formed by the demand points.
Proof
There are three points in a triangle; if a fourth point is outside the triangle formed by the three points, a shorter MST could be formed by placing the fourth point along the edge of the triangle or inside the triangle. One method is to place the fourth point along one of the edges of the triangle. Meanwhile, this can be easily extended to other given numbers of points.
Fitness evaluation
In PSO, after each iteration, the fitness values of the particles (recall that the position of a particle represents a particular solution) are evaluated. Because we address the primal problem using the dual problem, evaluation of a particle’s fitness becomes complex. To help understand how this process works, we first review the course of action of a particle as shown in Figure 4. In the dual problem, a particle consists of a set of anchor Steiner points. Initially, a particle consists of an empty set. During the initialization phase, each particle generates a random number

The course of action of a particular particle.
Updating of particle positions part I: updating of the space that particles belong to
After an iteration of the classical PSO meta-heuristic, the best position obtained by the entire swarm (
The number of anchor Steiner points in a particle is discrete/integer-valued. The classical PSO was designed to solve continuous problems; hence, a discrete method of updating the number of anchor Steiner points of particles is required. A concept similar to the one employed in the jumping frog optimization (JFO)
20
designed for discrete optimization problems is adopted. A random number is generated in the range
Updating of particle positions part II: updating of anchor Steiner point velocities and positions
In this subsection, we discuss how the velocities and positions of anchor Steiner points are updated. As candidate solutions are from different spaces, velocity and position update are non-trivial compared to the classical PSO. During the velocity update of particles, the current position

Component-wise updating of variables.
The velocity of a particle is updated in two steps. In the first step, we update it toward
Transform solution of the dual problem to solution of the primal problem
The MSPSO meta-heuristic is only used to determine the anchor Steiner points. Anchor Steiner points are approximates of degree-3+ Steiner points in the optimal solution for the input instance of the STP-MSPBEL problem. The remaining non-anchor/regular Steiner points still need to be determined. The detailed algorithm to determine the non-anchor Steiner points is described formally in Algorithm 2. First, initial demand points, anchor Steiner points, and the transmission range of nodes are given. Second, we find a source group, destination group, and the shortest edge between them. Third, every statement in the inner while loop in the algorithm are followed to Steinerize a straight line.
Results and discussion
We implemented MSPSO-STP-MSPBEL in C/C++ in Ubuntu 15.10. To demonstrate the feasibility of the proposed method, we generate random instances of the STP-MSPBEL problem, use our program to obtain approximate solutions to these instances, and compare our results with those obtained by the MST heuristic and approximation algorithm. Random instances of the problem of varying input size (number of demand points) were generated with two instances for each input size. In all instances, we assume node placement in a square region of 1000 units by 1000 units. In PSO, the number of particles (swarm size) determines how many different agents are used to solve a given input instance. If more particles are used, the probability of finding a better solution increases. Due to the inherent complexity of the STP-MSPBEL problem, 2000 particles were used in all instances. To allow sufficient iterations for particles to search for a good solution, the MSPSO-STP-MSPBEL was programmed to terminate after 500 iterations. As PSO is based on the concept of iterative search, if a low value of number of iterations is used, the particles might not converge by the time the search process is terminated. In all instances, we assume that the transmission range of all nodes
In general, we found that our program can address the generated instances with better results compared to those obtained using the MST heuristic. For practical input instance size, we found that our program has a fast runtime. For instance, referring to Table 4, for an input instance size of 200 demand points, our program was able to obtain a runtime of just over 3 h. Runtime is an important criterion in this article. If one algorithm takes an unacceptable amount of time to search for a good solution, it becomes useless. The lower runtime also indicates the lower computation complexity. From Tables 1 to 4, we observed that the runtime accelerates with increasing input instance size. This is because the fitness evaluation process of a particle requires that the MST construction process be emulated/mimicked, and this takes (
Summary of three instances with 25 demand points.
MST: minimum spanning tree.
Summary of three instances with 50 demand points.
MST: minimum spanning tree.
Summary of three instances with 100 demand points.
MST: minimum spanning tree.
Summary of three instances with 200 demand points.
MST: minimum spanning tree.
25 demand points
Instance #1
Figure 6(a) shows the result obtained using our program, Figure 6(b) shows the result obtained using the MST heuristic, and Figure 6(c) shows the result obtained using the approximation algorithm. In these figures, black dots are demand points, red dots are anchor Steiner points, blue dots are regular Steiner points, and brown dots are Steiner points obtained using the MST heuristic and approximation algorithm.

(a) Result obtained using our program, (b) result obtained using the MST heuristic, and (c) result obtained using the approximation algorithm.
Instance #2
Figure 7(a) shows the result obtained using our program, Figure 7(b) shows the result obtained using the MST heuristic, and Figure 7(c) shows the result obtained using the approximation algorithm. In these figures, black dots are demand points, red dots are anchor Steiner points, blue dots are regular Steiner points, and brown dots are Steiner points obtained using the MST heuristic and approximation algorithm.

(a) Result obtained using our program, (b) result obtained using the MST heuristic, and (c) result obtained using the approximation algorithm.
Summary
Table 1 shows the summary of the three input instances with 25 demand points.
50 demand points
Instance #1
Figure 8(a) shows the result obtained using our program, Figure 8(b) shows the result obtained using the MST heuristic, and Figure 8(c) shows the result obtained using the approximation algorithm. In these figures, black dots are demand points, red dots are anchor Steiner points, blue dots are regular Steiner points, and brown dots are Steiner points obtained using the MST heuristic and approximation algorithm.

(a) Result obtained using our program, (b) result obtained using the MST heuristic, and (c) result obtained using the approximation algorithm.
Instance #2
Figure 9(a) shows the result obtained using our program, Figure 9(b) shows the result obtained using the MST heuristic, and Figure 9(c) shows the result obtained using the approximation algorithm. In these figures, black dots are demand points, red dots are anchor Steiner points, blue dots are regular Steiner points, and brown dots are Steiner points obtained using the MST heuristic and approximation algorithm.

(a) Result obtained using our program, (b) result obtained using the MST heuristic, and (c) result obtained using the approximation algorithm.
Summary
Table 2 shows the summary of the three input instances with 50 demand points.
100 demand points
Instance #1
Figure 10(a) shows the result obtained using our program, Figure 10(b) shows the result obtained using the MST heuristic, and Figure 10(c) shows the result obtained using the approximation algorithm. In these figures, black dots are demand points, red dots are anchor Steiner points, blue dots are regular Steiner points, and brown dots are Steiner points obtained using the MST heuristic and approximation algorithm.

(a) Result obtained using our program, (b) result obtained using the MST heuristic, and (c) result obtained using the approximation algorithm.
Instance #2
Figure 11(a) shows the result obtained using our program, Figure 11(b) shows the result obtained using the MST heuristic, and Figure 11(c) shows the result obtained using the approximation algorithm. In these figures, black dots are demand points, red dots are anchor Steiner points, blue dots are regular Steiner points, and brown dots are Steiner points obtained using the MST heuristic and approximation algorithm.

(a) Result obtained using our program, (b) result obtained using the MST heuristic, and (c) result obtained using the approximation algorithm.
Summary
Table 3 shows the summary of the three input instances with 100 demand points.
200 demand points
Instance #1
Figure 12(a) shows the result obtained using our program, Figure 12(b) shows the result obtained using the MST heuristic, and Figure 12(c) shows the result obtained using the approximation algorithm. In these figures, black dots are demand points, red dots are anchor Steiner points, blue dots are regular Steiner points, and brown dots are Steiner points obtained using the MST heuristic and approximation algorithm.

(a) Result obtained using our program, (b) result obtained using the MST heuristic, and (c) result obtained using the approximation algorithm.
Instance #2
Figure 13(a) shows the result obtained using our program, Figure 13(b) shows the result obtained using the MST heuristic, and Figure 13(c) shows the result obtained using the approximation algorithm. In these figures, black dots are demand points, red dots are anchor Steiner points, blue dots are regular Steiner points, and brown dots are Steiner points obtained using the MST heuristic and approximation algorithm.

(a) Result obtained using our program, (b) result obtained using the MST heuristic, and (c) result obtained using the approximation algorithm.
Summary
Table 4 shows the summary of the three input instances with 200 demand points.
Conclusion
In this article, the single-tiered MRP problem in 2D Euclidean space is approached. The problem can be formulated as a STP-MSPBEL. In the literature, most algorithms proposed to solve the problem are based on the MST heuristic. In this article, a novel variable-dimension meta-heuristic based on PSO was proposed to address the problem. The optimization method was put to the test for several randomly generated instances of the problem. We found that the method is effective in obtaining good approximate solutions to those instances of the problem. For the majority of cases, a better approximate solution was obtained compared to that obtained from the MST heuristic.
