Abstract
Given a set of disks in the plane, the goal of the problem studied in this paper is to choose a subset of these disks such that none of its members contains the centre of any other. Each disk not in this subset must be merged with one of its nearby disks that is, increasing the latter’s radius. This problem has applications in labelling rotating maps and in visualizing the distribution of entities in static maps. We prove that this problem is NP-hard. We also present an ILP formulation for this problem, and a polynomial-time algorithm for the special case in which the centres of all disks are on a line.
Introduction
A motivating example for the problem studied in this paper is the following about drawing text labels on a digital map that can be rotated: suppose there are a number of points on the map that represent map features. To each of these feature points a text label is assigned that describes the feature, like the name of a junction. When the map is rotated by the user, these labels must remain horizontal for the sake of readability, and therefore, they are rotated in the reverse direction around their feature point (see the first two parts of Figure 1). Labels are difficult to read if they overlap, and therefore, only a non-overlapping subset of the labels are drawn on the map. If a label cannot be drawn because it overlaps with other labels, the text of its label must be appended to a nearby label that is drawn. The goal is to draw the maximum number of labels on the map such that none of them overlap when rotating the map. This is demonstrated in Figure 1. Part (a) shows four feature points and their labels. Part (b) shows the map when it is rotated 45 degrees counterclockwise; instead of rotating the map, the labels are equivalently rotated 45 degrees clockwise. Obviously the two labels on the left side of the map overlap, making the map of Part (a) infeasible. Part (c) shows what happens when these labels are merged. The remaining three labels never overlap when the map is rotated.

An example rotating map with 4 labels. (a) The initial configuration in which two of the labels overlap during rotation (the circles show the area covered by the labels during rotation). (b) After rotating the map 45 degrees counterclockwise. (c) Two of the labels are merged so that none of the label overlap during rotation.
Placing as many labels as possible on a map (known as map labelling) is a classical optimization problem in cartography and graph drawing [1]. For static maps, i.e. maps whose contents does not change, the problem of placing labels on a map can be stated as an instance of geometric independent set problem (also known as packing for fixed geometric objects): given a set of geometric objects, the goal is to find its largest non-intersecting subset. In the weighted version, each object also has a weight and the goal is to find a non-intersecting subset of the maximum possible weight.
A geometric intersection graph, with a vertex for each object and an edge between intersecting objects, converts this geometric problem to the classical maximum independent set for graphs, which is NP-hard and difficult to approximate even within a factor of
Dynamic maps allow zooming, panning, or rotation, and labelling in such maps seems more challenging. Most work on labelling dynamic maps consider zooming and panning operations [9]. Gemsa et al. [10] were the first to formally study labelling rotating maps. With the goal of maximising the total duration in which labels are visible without intersecting other labels, they proved the problem to be NP-hard and presented a 1/4-approximation algorithm and a PTAS, with the presence of restrictions on the distribution of labels on the map. Heuristic algorithms and Integer Linear Programming (ILP) formulations have also been presented for this problem [11, 12]. Note that in these problems, invisible labels do not get merged with visible labels. Yokosuka and Imai [13] examined a variant of this problem, in which all of the labels are always present in the solution and the goal is to maximise their size.
A related problem is crushing disks [14], in which a set of prioritized disks are given as input, whose radii grow over time, as map labels do when zooming in. When two disks touch, the one with the lower priority disappears. The radii of the disks grow linearly, and when a disk disappears, the radius of the other disk does not change. The goal is to find the order in which disks disappear and the process finishes when only one disk remains.
In this paper, we investigate a problem similar to geometric independent set for a set of disks, except that i) the disks in the output must be centre-disjoint (none of them can contain the centre of another) but they may overlap, ii) each disk that does not appear in the output must be merged with a disk, containing its centre, that does. When a disk is merged with another, the radius of the latter is increased by the radius of the former. Also to preserve the locality of the merges, a disk A can be merged with another disk B, only if all disks closer to B than A (considering the distance between disk centres) are also merged with B, and after merging these closer disks, B must contain the centre of A. This problem is formally defined in Section 2. We prove this problem to be NP-hard via a reduction from Planar Monotone 3-SAT [15]. Note that even without this restriction on merge order, the problem remains NP-hard; we have presented a PTAS in an earlier paper [16] for the case in which this restriction on merge order is not assumed.
To observe how the introductory example at the beginning of this section reduces to this problem, consider the disks in Figure 1 (a). The disk centred at each feature point shows the region covered by its label during rotation. Only if a disk contains the centre of another, their corresponding labels intersect at some point during rotation. As another application of this problem, centre-disjoint disks can show the distribution of facilities in an area. For instance, Figure 2 shows the distribution of schools in Munich. It was obtained by placing a disk of radius 50 meters on each school (the coordinates of schools were obtained from OpenStreetMap data). Then, an ILP (Section 4.1) was used to obtain the maximum number of centre-disjoint disks in our problem

The distribution of schools in Munich; disks corresponding to neighbouring schools were merged using the ILP of Section 4.1 to obtain larger, centre-disjoint disks.
Note that the centre-disjointness property of disks, which we assume for the output of our problem, is also used in the definition of transmission graphs of a set of disks, in which a vertex is assigned to each disk and a directed edge from a disk to another shows that the former contains the centre of the latter [17]. These graphs have been studied, for instance, for computing their spanners (a subgraph to estimate the distance between pairs of vertices) [18], counting their number of triangles and computing their girth [17], and their recognition [19]. Transmission graphs show the static relation between input disks and do not directly help us in our problem, in which the goal is to find a set of radius-changing disk merges, which makes them centre-disjoint.
To obtain an efficient algorithm for the problem, we also examine a more restricted version, in which the centres of input disks are on a line (Section 4). For this version, we present a polynomialtime algorithm that incrementally obtains a set of centre-disjoint disks with the maximum size. Note that the assumption of collinear inputs have been applied to many other challenging problems, such as [20].
This paper is organised as follows. In Section 2 we introduce the notation used in this paper and formally state the problem. Then, in Section 3 we show that the problem studied in this paper is NP-hard. In Section 4, we present algorithms for solving this problem: we present an ILP formulation for solving the general case of the problem, and a polynomial-time dynamic programming algorithm for the case in which all disk centres are on a line. Finally, in Section 5 we conclude this paper.
Let D = {d1, d2, …, dn} be a set of n disks. The radius of di is denoted as ri, and its centre is denoted as pi.
Definition 2.1.
A function ϕ from D to itself is an assignment, if
The relation defined by assignments (Definition 2.1) describes disk merges in our problem. For any disk di, if we have
Definition 2.2.
The aggregate radius of a selected disk di with respect to an assignment ϕ, denoted with some misuse of notation as
We now define proper assignments (Definition 2.3). In the rest of this paper, the distance between two disks is defined as the Euclidean distance between their centres.
Definition 2.3.
An assignment ϕ is proper if it meets the following conditions.
The disk δi(j) can be merged with di, only if δi(k), for every k where 1 ≤ k < j, are also merged with di. In other words, all disks closer to di, than δi(j) are also merged with di. The disk δi(j) can be merged with di, only if the distance between the centre of di, and δi(j) is less than ri(j − 1). In other words, after merging δi(k) for 1 ≤ k < j, di must contain the centre of δi(j). Selected disks must be centre-disjoint with respect to their aggregate radii; i.e. none of them can contain the centre of any other selected disk. More precisely, for indices i and j such that
Note the first two items in Definition 2.3 ensure the locality of the merges, which is especially important in the labelling application mentioned in the Introduction.
Definition 2.4.
Given a set of disks, in the Maximum Centre-Disjoint Mergeable Disks Problem (MCMD), the goal is to find a proper assignment of the maximum possible cardinality.
Figure 3 shows a configuration of five disks with more than one proper assignment. Disk d3 can be merged with d1, after which, d1 would contain the centre of d4 and d5, both of which then have to be merged with d1. These merges result in d1 containing the centre of d2, which would also be merged. Therefore, in this assignment ϕ1, we have ϕ1(di) = d1, for 1 ≤ i ≤ 5, and its cardinality is one. Alternatively, in assignment ϕ2 we can merge d3 with d2, as the latter contains the centre of the former. The remaining disks are centre-disjoint. Therefore, we have ϕ2(d1) = d1, ϕ2(d2) = d2, ϕ2(d3) = d2, ϕ2(d4) = d4, ϕ2(d5) = d5, and its cardinality is four. Assignment ϕ2 maximises the number of selected disks, and is a solution to MCMD for the configuration of disks in Figure 3.

An example set of disks with two proper assignments: Either all disks are merged with d1, which gives a proper assignment of cardinality 1, or just d3 is merged with d2, which gives a proper assignment of cardinality 4. The latter is a solution to MCMD, because it has the maximum cardinality.
Not every set of disks has a proper assignment. Figure 4 shows an example. Disk d3 can be merged with either d1 or d2. If d3 is merged with d1, d5 cannot be merged with d2, because of the second condition of proper assignments: d5 can be merged with d2, only if all closer disks to d2 are merged with it (but d3 which is closer to d2 than d5 is not). Therefore, d5 can be neither merged, nor selected (because its centre is contained in d2). Similarly, if d3 is merged with d2, d4 can neither be merged nor selected. Thus, there exists no proper assignment for these set of disks. In Section 3.2 we introduce a variant of MCMD by relaxing the second condition of Definition 2.3, in which every instance has a solution.

An example set of disks with no proper assignment. Either d3 and d4 are merged with d1, after which d5 cannot be merged with d2 (but must be), or d3 and d5 are merged with d2, after which d4 cannot be merged with d1 (but must be).
Instead of proving that the decision version of MCMD (Definition 3.1) is NP-complete, we show that even deciding whether a set of disks has a proper assignment (Definition 3.2) is NP-complete (clearly the latter implies the former). To do so, we perform a reduction from the NP-complete P
Hardness of MCMD
Definition 3.1.
In the k-MCMD problem, we are given a set of disks and we have to decide if there exists a proper assignment of cardinality at least k or not.
Definition 3.2.
In the P
Definition 3.3.
M
Deciding if an instance of P

A monotone rectilinear representation of a P
Definition 3.4.
A monotone rectilinear representation of an instance of P
Figure 5 shows a monotone rectilinear representation of an instance of P
Lemma 3.5.
For an instance of P
To prove that P Disks, which by our construction, are always selected (their centres can never be inside any other disk). We call them s-disks for brevity. Disks of very small radius, which are contained in at least one s-disk, and thus, are surely merged in our construction. We call these disks m-disks. We assume that the radius of m-disks is so small compared to the radius of s-disks that after merging any number of m-disks with an s-disk, the centre of no new disk would enter the s-disk in our configuration. In the instance of P
We create a configuration of disks using gadgets, each of which consists of some m-disks and s-disks. The m-disks of a gadget are either internal (internal m-disks) or can be shared with other gadgets (shared m-disks). Parts (a) and (b) of Figure 6 show two gadgets (from each gadget, only an s-disk and an m-disk is shown). In Figure 6 (c) these two gadgets are joined at m-disk m. In a proper assignment, m is merged either with an s-disk of A or with an s-disk of B. With respect to gadget A, if m is merged with A in a proper assignment, we say that it is merged in, and otherwise, merged out with respect to A.

Two gadgets (Parts (a) and (b)), joined at one of their m-disks (Part (c)).
We use the following gadgets in our construction. The gadgets and the distance between shared m-disks of each of them are shown in Figure 7; s-disks (denoted as si) are large disks and m-disks (denoted as mi) are small disks. More details about these gadgets are provided now:
Input: This gadget has only one shared m-disk, which can be either merged in or merged out. Copy: We use two gadgets for copy in our construction: one with two m-disks and one with four (both of them are demonstrated in Figure 7), which we reference as 2-Copy and 4-Copy, respectively. The logic behind both of them is similar and is explained thus. If m1 is merged in, m2 (also m5 and m6 if present) is merged out, and if m1 is merged out, m2 (also m5 and m6) is merged in. To see why, note that m3 can be merged either with s1 or with s2. If m3 is merged with s1, both m1 and m4 must also be merged with s1, because m3 is farther than both to s1. Since m4 is merged with s1, m2 (also m5 and m6) cannot be merged with s2 and therefore they must be merged out. Similarly, if m3 is merged with s2, m2 (also m5 and m6) must be merged with s2 as well, and m1 must be merged out. Disjunction: One or more of its shared m-disks are merged in. Clearly, m4 must be merged with s1, s2, or s3. If it is merged with si (i ∊ {1, 2, 3}), mi must also be merged with si, and mj (j ≠ i) may or may not be merged in. Not: Either both m1 and m2 are merged in or both of them are merged out. This is because m4 can be merged either with s1 or s2. If it is merged with s1, m-disks m1, m2, and m3 must also be merged with s1, because m4 is farther than all of them. Otherwise, if m4 is merged with s2, m-disk m3 must also be merged with s2 and therefore, none of m1 and m2 can be merged with s1, because m3 (which is closer than both) is not merged with s1. Thus, m1 and m2 must merge out. Gadgets used in the proof of Theorem 3.6; si and mi for different values of index i denote s-disks and m-disks, respectively. Shared m-disks are indicated with overlines (like m1 in Input). The sizes of the gadgets are specified such that the gadgets fit together in the proof of Theorem 3.6.

In our construction of the proof of Theorem 3.6, some of the shared m-disks of 4-Copy gadget are unused and are not shared with any other gadget; for such instances of 4-Copy, their unused shared m-disks must be removed.
Theorem 3.6.
P
It is trivial to show that P
We create an instance of P We replace the segment corresponding to a variable in R with an Input gadget and a chain of 2-Copy gadgets. For each intersection of this segment with a vertical segment, a 4-Copy gadget is used. Let s be a horizontal segment corresponding to a clause in R. Three variables appear in the clause, for each of which there is a vertical segment that connects s to a variable segment. For the first and last intersections, 4-Copy gadgets are used. For the 2nd intersection, we use a Disjunction gadget. These gadgets are connected using two chains of 2-Copy gadgets. For each vertical segment that connects a variable segment to a clause segment above the x-axis, we use a chain of 2-Copy gadgets to connect the 4-Copy gadget of the variable segment to the 4-Copy or Disjunction gadget (if it is the 2nd intersection) of the clause segment. For segments that appear below the x-axis, we do likewise, except that we place a Not gadget before the chain of 2-Copy gadgets. A P

Note that some of the gadgets of Figure 7 need to be rotated or mirrored, for instance, in the vertical chains that connect clauses and variables. Also note that based on the sizes shown in Figure 7, shared m-disks always appear on grid lines in our construction. Since the distance between the shared m-disks of any of the gadgets is at least 0.25, at most four gadgets can appear on a grid segment of unit length. Given that the total area of the grid, and therefore the total length of grid segments, is bounded by O(|C|2), the number of gadgets used in the resulting instance of P
Suppose there is a proper assignment for our P
If c is a positive clause, a chain of 2-Copy gadgets connects the Input gadget of each of the variables that appear in c to g. Therefore, if variable v appears in the clause and if the shared m-disk of the Input gadget corresponding to v is merged out, the m-disk of the last 2-Copy gadget of its chain is merged in inside g. Since, one or more of the shared m-disks of g are merged in, at least one of the literals in g is satisfied. Similarly, if c is a negative clause, because there is a Not gadget in the chain that connects each variable v of c to its Disjunction gadget, if the shared m-disk of the Input gadget corresponding to v is merged out, the m-disk of the last 2-Copy gadget of its chain is also merged out inside g. Since, one or more of the shared m-disks of g are merged in, at least one of the variables in g is not satisfied.
Therefore, the P
For the reverse direction, suppose there exists an assignment A of the variables, for which all clauses of I are satisfied. We can obtain a proper assignment in our P
In Corollary 3.7 we show that even if all disks have the same radius, the problem remains NP-hard.
Corollary 3.7.
P
We fix the radius of m-disks to r = 0.01. We use the same construction as Theorem 3.6, with the difference that we replace each s-disk with a number of smaller disks of radius r with the same centre, so that the sum of the radii of these smaller disks equals the radius of the s-disk. Since the disks added for each s-disk are not centre-disjoint, and their centre cannot be contained in some other disk, exactly one of them must be selected and after merging others, it reaches the size of the original s-disk. The rest of the proof of Theorem 3.6 applies without significant changes. □
In the proof of Corollary 3.7, we can adjust the position of the disks that replace each s-disk so that their centres do not coincide: they can be placed evenly on a very short line segment (for instance of length 0.0001). However, that they cannot be centre-disjoint, as they are to be merged.
Now we present the proof of Lemma 3.5.
Let R be a monotone rectilinear representation of a P
Repeating the same process for vertical segments, we get at most 3c vertical lines. We can similarly move these lines and the segments on them horizontally so that they appear in order and consecutively on vertical integer grid lines. Variables that do not appear in any clause, can be placed in at most v additional vertical grid lines. This results in a (c + 1) × (3c + v) grid. □
Due to the first condition of proper assignments (Definition 2.3), in a proper assignment ϕ of a set of disks D, a disk di can be merged with another disk dj, only if all closer disks to di than dj are also merged with di. This condition, in addition to the second condition of Definition 2.3 (disk di may be merged with dj only if dj contains the centre of di after disks closer to dj than di are merged with dj), ensures the locality of the merges. By requiring this ordering for merges, however, we get instances for which there is no solution, such as the one demonstrated in Figure 4. For such instances, a solution can be obtained by relaxing this condition. In this section, we relax the first condition of Definition 2.3.
Definition 3.8.
In an assignment ϕ for a set of disks D, let
Definition 3.9.
An assignment ϕ is uproper (short for unordered proper) if it meets the following conditions.
For each pair of possible indices i and j, in which
Selected disks must be centre-disjoint with respect to their aggregate radii; i.e. none of them can contain the centre of any other selected disk.
Definition 3.10.
Given a set of disks, the goal in the Relaxed Maximum Centre-Disjoint Mergeable Disks Problem (RMCMD) is to find a uproper assignment of the maximum possible cardinality.
Theorem 3.11 shows that any set of disks has a uproper assignment, and therefore, RMCMD always has a solution.
Theorem 3.11.
There exists at least one uproper assignment for any set of disks D.
Let S be the largest subset of D for which there exists a uproper assignment
We obtain a uproper assignment
If, after these changes,
To show that RMCMD is NP-hard, in Theorem 3.12 we reduce the P
Theorem 3.12.
RMCMD is NP-hard.
We reduce P Add disk d1 of radius 2 s and add d2 with the same radius at distance 3 s on the right of d1. Add d3 at distance 5 s/2 + e above d1 with radius s. Similarly, add d4 at distance 5 s/2 + e above d2 with the same radius. Add one disk for each member of A in the midpoint of the centres of d1 and d2, such that the radius of the one corresponding to ai is ai. The construction in the proof of Theorem 3.12. Only if we have a uproper assignment of cardinality four, input numbers can be divided into two partitions of equal sum.

Let ϕ be the solution of this RMCMD instance. We show that there is a valid solution to the P
Suppose X is a subset of A with sum s/2. We obtain an assignment from X as follows: every disk corresponding to a member of X is assigned to d1 and others are assigned to d2. Since the sum of the members of X is s/2, the aggregate radii of both disks are exactly 5 s/2. Therefore, the centre of d3 and d4 are outside these disks. This yields a uproper assignment of cardinality 4.
For the reverse direction, suppose the cardinality of ϕ is four (note that it cannot be greater). If so, all of d1, d2, d3, and d4 are selected, and therefore, the aggregate radii of d1 and d2 are lower than 5 s/2 + e. Given that the sum of the radii of the disks corresponding to members of A is s (which is an integer) and 0 < e < 1, the sum of the set of disks assigned to d1 and d2 (and therefore the subsets of A corresponding to them) are equal. □
We cannot extend Theorem 3.12 to the case in which all disks have the same radius. The problem is that the radii of the disks may be arbitrarily large. This is necessary in Theorem 3.12, because the partition problem is weakly NP-complete, and using fixed-radius disks (the technique we used in Corollary 3.7 for MCMD) to construct larger disks may imply a number of disks that is not polynomial in the input size.
In this section we present algorithms for solving MCMD. We present an ILP formulation for general MCMD instances in Section 4.1, and in Section 4.2 we present a dynamic programming algorithm for MCMD instances in which disk centres are collinear.
ILP formulation of MCMD
Theorem 4.1.
Any instance of MCMD with n disks can be formulated as an integer linear programme with O(n2) binary variables.
For 1 ≤ i, j ≤ n, we introduce a binary variable xi,j. If i ≠ j, xi,j indicates whether disk di, is merged with disk dj. If i = j, it shows if disk di, is a selected disk. The following constraint for 1 ≤ i < n makes sure that each disk is either selected or merged with another disk.
Based on the conditions enumerated in Definition 2.3, we add additional constraints to make sure that the obtained assignment ϕ is proper. Let δi be as defined in Definition 2.2.
Based on the first condition of Definition 2.2, a disk can be merged with di, only if its closer disks are merged as well. In other words, Based on the second condition of Definition 2.2, dj can be merged with di, only if the distance of di and dj is less than ri(j − 1) (Definition 2.2) for 1 ≤ j ≤ n − 1; that is, after merging with di all disks closer than dj to di, the resulting disk must contain the centre of dj. We disallow merges that fail this condition: for 1 ≤ i ≤ n and 1 ≤ j ≤ n − k, where Based on the third condition of Definition 2.2, selected disks must be centre-disjoint. We add the following constraint for 1 ≤ i, j ≤ n.
Obviously, the left side computes the aggregate radius of di; note that if di is not selected, the left side equals zero and the inequality is trivially satisfied. There are two cases based on whether dj is selected or not. If dj is a selected disk (xjj — 1) the right side of the inequality simplifies to |pipj|, making sure that di does not contain dj. If, on the other hand, dj is merged with another disk (maybe even with di), the right side of the inequality simplifies to and the constraint is satisfied.
Finally, as the goal of MCMD (Definition 2.4) is to maximize the number of selected disks, the objective of the programme is simply to maximise
The number of variables used in the integer programme of Theorem 4.1 can be reduced based on the following observation. The value of some variables of an MCMD instance is always zero by constraints of type 3. These variables can be removed. The implementation of the ILP of Theorem 4.1 with this optimization is publicly available 1 ; it has been used to obtain Figure 2.
In this section we present a polynomial-time algorithm for solving MCMD for a set of disk with collinear centres. Note that even if disk centres are collinear, there may exist no proper assignments, as demonstrated in Figure 4. In the rest of this section, let
Definition 4.2.
Let ϕ be an assignment of {d1, d2,…,dn} and let
Definition 4.3.
M(x, y, z) denotes the maximum cardinality of a proper assignment of X = {d1, d2, …, dx}, such that the following conditions are met (we have y ≤ x ≤ z ≤ n).
dy is its right-most selected disk. dy + 1, dy + 2, …, dx are all merged with dy. dz is the right-most disk in D, where z ≥ x, whose centre is contained in dy considering its aggregate radius.
Note that by the third condition of Definition 4.3, the centres of dx + 1, dx + 2, …, dz are inside dy with respect to D, but they are not merged with it, because they are outside X and not present in the assignment which is limited to set X. Also, note that actually the second condition of Definition 4.3 is implied by its first condition: since dy is the right-most selected disk, all of the disks that appear on the right of dy in X are surely merged. On the other hand, none of these disks can be merged with a selected disk dw on the left of dy, because, in that case dw would contain the centre of dy and the assignment cannot be proper.
Theorem 4.4.
A proper assignment of the maximum cardinality for a set of n disks D, in which the centres of all disks are collinear, can be computed in polynomial time.
Let M be defined as in Definition 4.3. Obviously,
The function M accepts O(n3) different input values. We can compute and store the values returned by M in a three dimensional table, which we reference also as M. Algorithm 1 uses dynamic programming to fill M, and computes its entries based on the values of previously computed entries. Before explaining the details of the algorithm, we give a high-level overview as follows. The order of the disks referenced here, in the algorithm, and its succeeding discussion is demonstrated in Figure 10.
Demonstrating the symbols used in Theorem 4.4. di is the right-most selected disk, 
The main idea behind the algorithm is that in every proper assignment of {d1, d2,…, dx}, there is at least one selected disk; take the right-most selected disk di. By the first condition of Definition 2.3, for some j where 0 ≤ j ≤ n − 1, the first j entries of δ are merged with di. Thus, the algorithm considers different values of j for each disk di, to compute the maximum proper assignment of {d1, d2,…, dx} for any x in which di is the right-most selected disk and j disks are merged with di; it updates the entries of M accordingly. The main challenge is to decide what to do with the disks that appear on the left of di and use the previously filled entries of M for them. To do so, the algorithm enumerates possible choices for the right-most selected disk dt that appear on the left of di, and the number of disks k merged with it.
After presenting Algorithm 1, we shall explain the steps of this algorithm in more detail.
Find a solution to MCMD for a set of collinear disks
Let S denote the set of such disks. If this is not possible (the centre of one of these disks is not contained in di, after merging its previous disks), we skip this value of j, because it fails the second condition of Definition 2.3 (Step 3a). Note that if there exists no proper assignment in which j disks are merged with di, there cannot exists a proper assignment in which more than j disks are merged with di either, and we can safely skip the remaining values of j and continue the loop of Step 3 by incrementing the value of i.
Let a, b, A, and B be defined as Step 3b. If a = 1, selecting di and merging with it every disk in {d1, d2,…, db} \ {di} is a proper assignment of the first b disks of λ with cardinality one. Therefore, we update the value of M(b, i, B) to be at least one in Step 3c.
If a > 1, let ϕ be any assignment of {d1,…, db}, in which i) di is selected, ii) the members of S are merged with di, and iii) the members of
Let dt be the right-most selected disk of ϕL. The following conditions hold.
We have t < A, because {dA,…, da−1} are contained in di in ϕ, and dt cannot be a selected disk if t ≥ A. Therefore, disks {dt + 1,…, da−1} are merged with dt in ϕL. Suppose k disks are merged with dt in ϕL. Let df be the right-most disk of D contained in dt after merging disks in ϕL. We have f < i; otherwise, df would contain the centre of di, and di cannot be selected in ϕ. Also let dg be the right-most vertex of D contained in df. We have g < i; otherwise, di would contain the centre of di and ϕ cannot be an extension of ϕL.
By trying possible values of t and k that meet these conditions (Step 3d), we find the maximum cardinality of ϕL, which has been computed in the previous steps of this algorithm as M (a − 1, t, g). Since ϕ is an extension of ϕL by adding exactly one selected disk di, the maximum cardinality of ϕ therefore is at least 1 + M(a − 1, t, g). Thus, we have
Theorem 4.5.
The time complexity of computing M for an instance of MCMD with a set of n disks, as described in Theorem 4.4, is O(n5).
We analyse Algorithm 1. Constructing δi (Step 1) can be done in O(n2 log n) and initializing M (Step 2) can be done in O(n3). For each pair of values for i and j, Steps 3a-3c can be performed in O(n). In Step 3d, O(n2) possible cases for t and k are considered, and for each of these cases, the Steps 3(d)i, 3(d)ii, 3(d)iii, and 3(d)iv can be performed in O(n). Since the loop of Step 3 is repeated O(n2) times, the time complexity of the whole algorithm is O(n5). □
Note that Algorithm 1 cannot be used for RMCMD (Defintion 3.10) as it relies on the first condition of Definition 2.3: dj may be merged with di, only if disks closer to di than dj are also merged with it. This does not hold for RMCMD.
We introduced a variant of geometric independent set for a set of disks, such that the disks that do not appear in the output must be merged with a nearby disk that does (the problem was stated formally in Section 2). We proved that this problem is NP-hard (Theorem 3.6). Also by relaxing one of the conditions of the problem, we introduced a less restricted variant, which was proved NP-hard as well (Theorem 3.12). We presented an ILP for the general case, and a polynomial-time algorithm for the case in which disk centres are collinear.
The centre-disjointness property of the disks in the definition of MCMD and RMCMD implies that we are implicitly assuming Euclidean distance between the centre of the disks; disk di containing the centre of dj implies that the Euclidean distance between pi and pj is at most ri. If the problem is defined using other distance measures, we would have different shapes; for instance squares for
Several interesting problems call for further investigation, such as: i) general approximation algorithms, ii) studying the case in which the number of disks that can be merged with a selected disk is bounded by some constant, iii) solving RMCMD for disks with collinear centres, and iv) solving MCMD when disks are pierced by a line (the line may not pass through disk centres).
