Research Article
Linear Time Approximation Algorithms for the Relay Node Placement Problem in Wireless Sensor Networks with Hexagon Tessellation
Algorithm 2
A simple linear time approximation algorithm for the MGDC problem.
| Algorithm Hexagon-II | | Input: A set of points, and a two-dimensional region . | | Output: A set of disks with radius that covers . | | Step 1: | | Virtually tessellate the region with hexagons of length . Calculate and store the coordinate of the center and | | the corresponding index of each hexagon in the tessellation. (Each index contains two ranks (_rank, _rank) | | to -axis and -axis, respectively, as shown in Figure 5.) | | Step 2: | | For each point with Cartesian coordinate (, ) in do | | (1) ; // find the indices of the basic rectangle that contains | | If _rank is even | | | | else | | | | (2) Find the hexagon containing by comparing the distances from to the centers of hexagons with indices | | (_rank, _rank), (_rank + 1, _rank), and (_rank + 1, _rank + 1) if _rank is even or (_rank + 1, _rank − 1) | | if _rank is odd. Ties are broken in favor of the marked hexagon, otherwise broken arbitrary. | | (3) Mark the hexagon chosen in (2). | | Step 3: | | Output the circumscribed circles of the chosen hexagons. |
|