Identification, location-domination and metric dimension on interval and permutation graphs. II. Algorithms and complexity1footnote 11footnote 1A short version of this paper, containing only the results about location-domination and metric dimension, appeared in the proceedings of the WG 2015 conference [28].

# Identification, location-domination and metric dimension on interval and permutation graphs. II. Algorithms and complexity111A short version of this paper, containing only the results about location-domination and metric dimension, appeared in the proceedings of the WG 2015 conference [28].

Florent Foucaud222LIMOS, Université Blaise Pascal, Clermont-Ferrand (France). florent.foucaud@gmail.com    George B. Mertzios333School of Engineering and Computing Sciences, Durham University (United Kingdom). george.mertzios@durham.ac.uk 444Partially supported by the EPSRC Grant EP/K022660/1.    Reza Naserasr555CNRS - IRIF, Université Paris-Diderot, Paris (France). reza@irif.fr    Aline Parreau666CNRS - LIRIS, Université Lyon 1, Villeurbanne (France). aline.parreau@univ-lyon1.fr    Petru Valicov777LIF, Université d’Aix-Marseille, Marseille (France). petru.valicov@lif.univ-mrs.fr
###### Abstract

We consider the problems of finding optimal identifying codes, (open) locating-dominating sets and resolving sets (denoted Identifying Code, (Open) Locating-Dominating Set and Metric Dimension) of an interval or a permutation graph. In these problems, one asks to distinguish all vertices of a graph by a subset of the vertices, using either the neighbourhood within the solution set or the distances to the solution vertices. Using a general reduction for this class of problems, we prove that the decision problems associated to these four notions are NP-complete, even for interval graphs of diameter  and permutation graphs of diameter . While Identifying Code and (Open) Locating-Dominating Set are trivially fixed-parameter-tractable when parameterized by solution size, it is known that in the same setting Metric Dimension is -hard. We show that for interval graphs, this parameterization of Metric Dimension is fixed-parameter-tractable.

## 1 Introduction

Combinatorial identification problems have been widely studied in various contexts. The common characteristic of these problems is that we are given a combinatorial structure (graph or hypergraph), and we wish to distinguish (i.e. uniquely identify) its vertices by the means of a small set of selected elements. In this paper, we study several such related identification problems where the instances are graphs. In the problem metric dimension, we wish to select a set of vertices of a graph such that every vertex of is uniquely identified by its distances to the vertices of . The notions of identifying codes and (open) locating-dominating sets are similar. Roughly speaking, instead of the distances to , we ask for the vertices to be distinguished by their neighbourhood within . These problems have been widely studied since their introduction in the 1970s and 1980s. They have been applied in various areas such as network verification [4, 5], fault-detection in networks [41, 56], graph isomorphism testing [3] or the logical definability of graphs [43]. We note that the similar problem of finding a test cover of a hypergraph (where hyperedges distinguish the vertices) has been studied under several names by various authors, see e.g. [9, 10, 15, 30, 46, 49].

Important concepts and definitions. All considered graphs are finite and simple. We will denote by , the closed neighbourhood of vertex , and by its open neighbourhood, i.e. . A vertex is universal if it is adjacent to all the vertices of the graph. A set of vertices of is a dominating set if for every vertex , there is a vertex in . It is a total dominating set if instead, . In the context of (total) dominating sets we say that a vertex (totally) separates two distinct vertices if it (totally) dominates exactly one of them. Set (totally) separates the vertices of a set if every pair in has a vertex in (totally) separating it. We have the three key definitions, that merge the concepts of (total) domination and (total) separation:

###### Definition 1 (Slater [52, 53], Babai [3]).

A set of vertices of a graph is a locating-dominating set if it is a dominating set and it separates the vertices of .

The smallest size of a locating-dominating set of is the location-domination number of , denoted . This concept has also been used under the name distinguishing set in [3] and sieve in [43].

###### Definition 2 (Karpovsky, Chakrabarty and Levitin [41]).

A set of vertices of a graph is an identifying code if it is a dominating set and it separates all vertices of .

The smallest size of an identifying code of is the identifying code number of , denoted .

###### Definition 3 (Seo and Slater [50]).

A set of vertices of a graph is an open locating-dominating set if it is a total dominating set and it totally separates all vertices of .

The smallest size of an open locating-dominating set of is the open location-domination number of , denoted . This concept has also been called identifying open code in [38].

Another kind of separation based on distances is used in the following concept:

###### Definition 4 (Harary and Melter [34], Slater [51]).

A set of vertices of a graph is a resolving set if for each pair of distinct vertices, there is a vertex of with .888Resolving sets are also known under the name of locating sets [51]. Optimal resolving sets have sometimes been called metric bases in the literature; to avoid an inflation in the terminology we will only use the term resolving set.

The smallest size of a resolving set of is the metric dimension of , denoted .

It is easy to check that the inequalities and hold, indeed every locating-dominating set of is a resolving set, and every identifying code (or open locating-dominating set) is a locating-dominating set. Moreover it is proved that  [32] (using the same proof idea one would get a similar relation between and and between and , perhaps with a different constant). There is no strict relation between and .

In a graph of diameter , one can easily see that the concepts of resolving set and locating-dominating set are almost the same, as . Indeed, let be a resolving set of . Then all vertices in have a distinct neighbourhood within . There might be (at most) one vertex that is not dominated by , in which case adding it to yields a locating-dominating set.

While a resolving set and a locating-dominating set exist in every graph (for example the whole vertex set), an identifying code may not exist in if it contains twins, that is, two vertices with the same closed neighbourhood. However, if the graph is twin-free the set is an identifying code of . Similarly, a graph admits an open locating-dominating set if and only if it has no open twins, i.e. vertices sharing the same open neighbourhood. We say that such a graph is open twin-free.

The focus of this paper is the following set of four decision problems:

Locating-Dominating-Set

Instance: A graph , an integer .

Question: Is it true that ?

Identifying Code

Instance: A graph , an integer .

Question: Is it true that ?

Open Locating-Dominating Set

Instance: A graph , an integer .

Question: Is it true that ?

Metric Dimension

Instance: A graph , an integer .

Question: Is it true that ?

We will study these four concepts and decision problems on graphs belonging to specific subclasses of perfect graphs (i.e. graphs whose induced subgraphs all have equal clique and chromatic numbers). Many standard graph classes are perfect, for example bipartite graphs, split graphs, interval graphs. For precise definitions, we refer to the books of Brandstädt, Le and Spinrad and of Golumbic [13, 31]. Some of these classes are classes defined using a geometric intersection model, that is, the vertices are associated to the elements of a set of (geometric) objects, and two vertices are adjacent if and only if the corresponding objects intersect. The graph defined by the intersection model is its intersection graph. An interval graph is the intersection graph of intervals of the real line, and a unit interval graph is an interval graph whose intersection model contains only (open) intervals of unit length. Given two parallel lines and , a permutation graph is the intersection graph of segments of the plane which have one endpoint on and the other endpoint on .

Interval graphs and permutation graphs are classic graph classes that have many applications and are widely studied. They can be recognized efficiently, and many combinatorial problems have simple and efficient algorithms for these classes.

Previous work. The complexity of distinguishing problems has been studied by many authors. Identifying Code was first proved to be NP-complete by Charon, Hudry, Lobstein and Zémor [18], and Locating-Dominating-Set, by Colbourn, Slater and Stewart [19]. Regarding their instance restriction to specific graph classes, Identifying Code and Locating-Dominating-Set were shown to be NP-complete for bipartite graphs by Charon, Hudry and Lobstein [14]. This was improved by Müller and Sereni to planar bipartite unit disk graphs [47], by Auger to planar graphs with arbitrarily large girth [2], and by Foucaud to planar bipartite subcubic graphs [26]. Foucaud, Gravier, Naserasr, Parreau and Valicov proved that Identifying Code is NP-complete for graphs that are both planar and line graphs of subcubic bipartite graphs [27]. Berger-Wolf, Laifenfeld, Trachtenberg [7] and Suomela [55] independently showed that both Identifying Code and Locating-Dominating-Set are hard to approximate within factor for any (where denotes the order of the graph), with no restriction on the input graph. This result was recently extended to bipartite graphs, split graphs and co-bipartite graphs by Foucaud [26]. Moreover, Bousquet, Lagoutte, Li, Parreau and Thomassé [12] proved the same non-approximability result for bipartite graphs with no 4-cycles. On the positive side, Identifying Code and Locating-Dominating-Set are constant-factor approximable for bounded degree graphs (showed by Gravier, Klasing and Moncel in [32]), line graphs [26, 27], interval graphs [12] and are linear-time solvable for graphs of bounded clique-width (using Courcelle’s theorem [20]). Furthermore, Slater [52] and Auger [2] gave explicit linear-time algorithms solving Locating-Dominating-Set and Identifying Code, respectively, in trees.

The complexity of Open Locating-Dominating Set was not studied much; Seo and Slater showed that it is NP-complete [50], and the inapproximability results of Foucaud [26] for bipartite, co-bipartite and split graphs transfer to it.

The problem Metric Dimension is widely studied. It was shown to be NP-complete by Garey and Johnson [30, Problem GT61]. This result has recently been extended to bipartite graphs, co-bipartite graphs, split graphs and line graphs of bipartite graphs by Epstein, Levin and Woeginger [24], to a special subclass of unit disk graphs by Hoffmann and Wanke [39], and to planar graphs by Diaz, Pottonen, Serna and van Leeuwen [21].

Epstein, Levin and Woeginger [24] also gave polynomial-time algorithms for the weighted version of Metric Dimension for paths, cycles, trees, graphs of bounded cyclomatic number, cographs and partial wheels. Diaz, Pottonen, Serna, van Leeuwen [21] gave a polynomial-time algorithm for outerplanar graphs, and Fernau, Heggernes, van’t Hof, Meister and Saei gave one for chain graphs [25]. Metric Dimension can most likely not be expressed in MSOL and it is an open problem to determine its complexity for bounded treewidth (even treewidth 2).

Metric Dimension is hard to approximate within any factor for general graphs, as shown by Beerliova, Eberhard, Erlebach, Hall, Hoffmann, Mihalák and Ram [5]. This is even true for subcubic graphs, as shown by Hartung and Nichterlein [36] (a result extended to bipartite subcubic graphs in Hartung’s thesis [35]).

In light of these results, the complexity of Locating-Dominating-Set, Open Locating-Dominating Set, Identifying Code and Metric Dimension for interval and permutation graphs is a natural open question (as asked by Manuel, Rajan, Rajasingh, Chris Monica M. [45] and by Epstein, Levin, Woeginger [24] for Metric Dimension on interval graphs), since these classes are standard candidates for designing efficient algorithms to solve otherwise hard problems.

Let us say a few words about the parameterized complexity of these problems. A decision problem is said to be fixed-parameter tractable (FPT) with respect to a parameter of the instance, if it can be solved in time for an instance of size , where is a computable function (for definitions and concepts in parameterized complexity, we refer to the books [22, 48]). It is known that for the problems Locating-Dominating-Set, Open Locating-Dominating Set and Identifying Code, for a graph of order  and solution size , the bound holds (see e.g. [41, 53]). Therefore, when parameterized by , these problems are (trivially) FPT: one can first check whether holds (if not, return “no”), and if yes, use a brute-force algorithm checking all possible subsets of vertices. This is an FPT algorithm. However, Metric Dimension (parameterized by solution size) is W[2]-hard even for bipartite subcubic graphs [35, 36] (and hence unlikely to be FPT). Remarkably, the bound holds [16] (where is the graph’s order, its diameter, and is the solution size of Metric Dimension), and therefore for graphs of diameter bounded by a function of , the same arguments as the previous ones yield an FPT algorithm. This holds, for example, for the class of (connected) split graphs, which have diameter at most . Also, it was recently proved that Metric Dimension is FPT when parameterized by the largest possible number of leaves in a spanning tree of a graph [23]. Besides this, as remarked in [36], no non-trivial FPT algorithm for Metric Dimension was previously known.

Finally, we also mention a companion paper [29], in which we study problems Identifying Code, Locating-Dominating-Set, Open Locating-Dominating Set and Metric Dimension on interval and permutation graphs from a combinatorial point of view, proving several bounds involving the order, the diameter and the solution size of a graph.

Our results. We continue the classification of the complexity of problems Identifying Code, Locating-Dominating-Set, Open Locating-Dominating Set and Metric Dimension by giving a unified reduction showing that all four problems are NP-complete even for graphs that are interval graphs and have diameter  or permutation graphs of diameter . The reductions are presented in Section 2. Then, in Section 3, we use dynamic programming on a path-decomposition to show that Metric Dimension is FPT on interval graphs, when the parameter is the solution size. Up to our knowledge, this is the first non-trivial FPT algorithm for this problem when parameterized by solution size. We then conclude the paper with some remarks in Section 4.

## 2 Hardness results

We will provide a general framework to prove NP-hardness for distinguishing problems in interval graphs and permutation graphs. We just need to assume few generic properties about the problems, and then provide specific gadgets for each problem.

We will reduce our problems from 3-Dimensional Matching which is known to be NP-complete [40].

3-Dimensional Matching

Instance: Three disjoint sets , and each of size , and a set of triples of .

Question: Is there a perfect 3-dimensional matching of the hypergraph , i.e. a set of disjoint triples of such that each element of belongs to exactly one of the triples?

We give the general framework and the gadgets we will use in Section 2.1, then prove the general reduction using this framework in Section 2.2 and apply it to obtain the NP-hardness for Identifying Code, Locating-Dominating-Set and Open Locating-Dominating Set in Section 2.3. We finally deduce from the results for graphs of diameter  the hardness of Metric Dimension in Section 2.4. We give the reduction using interval graphs and prove subsequently that it can be built as a permutation graph too.

In the three distinguishing problems Locating-Dominating-Set, Identifying Code and Open Locating-Dominating Set, one asks for a set of vertices that dominates all vertices and separates all pairs of vertices (for suitable definitions of domination and separation). Since we give a reduction which applies to all three problems (and others that share certain properties with them), we will generally speak of a solution as a vertex set satisfying the two properties.

For two vertices let us denote by the set . In the reduction, we will only make use of the following properties (that are common to Locating-Dominating-Set, Identifying Code and Open Locating-Dominating Set):

###### Property 5.

Let be a graph with a solution to Locating-Dominating-Set, Identifying Code or Open Locating-Dominating Set.
(1) For each vertex , any vertex from dominates ;
(2) For each vertex , at least one element of belongs to ;
(3) For every pair of adjacent vertices, any vertex of separates ;
(4) For every pair of adjacent vertices, contains a vertex of .

The problems Identifying Code and Open Locating-Dominating Set clearly satisfy these properties. For Locating-Dominating-Set, the vertices of a solution set do not need to be separated from any other vertex. However one can say equivalently that two vertices are separated if either or belongs to , or if there is a vertex of in . Therefore, Locating-Dominating-Set also satisfies the above properties.

Before describing the reduction, we define the following dominating gadget independently of the considered problem (we describe the specific gadgets for Locating-Dominating-Set, Open Locating-Dominating Set and Identifying Code in Section 2.3). The idea behind this gadget is to ensure that specific vertices are dominated locally — and are therefore separated from the rest of the graph. We will use it extensively in our construction.

A dominating gadget is an interval graph such that there exists an integer and a subset of of size (called standard solution for ) with the following properties:

• is an optimal solution for with the property that no vertex of is dominated by all the vertices of ;999Note that this implies .

• if is an induced subgraph of an interval graph such that each interval of either contains all intervals of or does not intersect any of them, then for any solution for , .101010By this property, an interval of may only be useful to dominate a vertex in (but not to separate a pair in ). Hence the property holds if any optimal solution for the separation property only, has the same size as an optimal solution for both separation and domination.

In the following, a dominating gadget will be represented graphically as shown in Figure 1, where is an induced subgraph of an interval graph . In our constructions, we will build a graph with many isomorphic copies of as its induced subgraphs, where will be a fixed graph. Denote by an optimal solution for : the size of each local optimal solution for will always be . Moreover, the conditions of the second property in Definition 6 (that each interval of either contains all intervals of or does not intersect any of them) will always be satisfied.

###### Claim 7.

Let be an interval graph containing a dominating gadget as an induced subgraph, such that each interval of either contains all intervals of or does not intersect any of them. Then, for any optimal solution of , and we can obtain an optimal solution with by replacing by the standard solution .

###### Proof.

By the second property of a dominating gadget, we have . Since each interval of either contains all intervals of or does not intersect any of them, a pair of intervals of either cannot be separated by any interval in , or is separated equally by any interval in . Since , there is at least one interval in but the structure of does not influence the rest of the graph. Hence, can be replaced by and we have (otherwise the solution with would be better and would not be optimal). ∎

###### Definition 8 (Choice pair).

A pair of intervals is called choice pair if both contain the intervals of a common dominating gadget (denoted ), and such that none of contains the other.

See Figure 2 for an illustration of a choice pair. Intuitively, a choice pair gives us the choice of separating it from the left or from the right: since none of is included in the other, the intervals intersecting but not (the set ) can only be located at one side of ; the same holds for . In our construction, we will make sure that all pairs of intervals will be easily separated using domination gadgets. It will remain to separate the choice pairs.

We have the following claim:

###### Claim 9.

Let be a solution of a graph and be a choice pair in . If the solution for the dominating gadget is the standard solution , both vertices and are dominated, separated from all vertices in and from all vertices not intersecting .

###### Proof.

If is such a solution, by the definition of a dominating gadget, . Since all vertices of are in the open neighbourhood of and , by Property 5(1)-(3), and are dominated and separated from the vertices not intersecting . Moreover, both are adjacent to all vertices of . By Definition 6, no vertex of is dominated by the whole set , hence are separated from all vertices in . ∎

We now define the central gadget of the reduction, the transmitter gadget. Roughly speaking, it allows to transmit information across an interval graph using the separation property.

Let be a set of two or three choice pairs in an interval graph . A transmitter gadget is an induced subgraph of consisting of a path on seven vertices and five dominating gadgets , , , , such that the following properties are satisfied:

• and are the only vertices of that separate the pairs of ;

• the intervals of the dominating gadget (resp. , ) are included in interval (resp. , ) and no interval of other than (resp. , ) intersects (resp. , );

• pair is a choice pair and no interval of intersects both intervals of the pair. The same holds for pair .

• the choice pairs and cannot be separated by intervals of other than , and .

Figure 3 illustrates a transmitter gadget and shows the succinct graphical representation that we will use. As shown in the figure, we may use a “box” to denote . This box does not include the choice pairs of but indicates where they are situated. Note that the middle pair could also be separated (from the left) by instead of , or it may not exist at all.

The following claim shows how transmitter gadgets will be used in the main reduction.

###### Claim 11.

Let be an interval graph with a transmitter gadget and let be a solution. We have and if , no pair of is separated by a vertex in .

Moreover, there exist two sets of vertices of , and of size and respectively, such that the following holds.

• The set dominates all the vertices of and separates all the pairs of but no pairs in .

• The set dominates all the vertices of , separates all the pairs of and all the pairs in .

###### Proof.

By the definition of the dominating gadget, we must have with vertices of belonging to the dominating gadgets. By Property 5(4) on the choice pair , at least one vertex of belongs to (recall that the intervals not in cannot separate the choice pairs in ), and similarly, for the choice pair , at least one vertex of belongs to . Hence and if , vertex must be in and neither nor are in . Therefore, no pair of is separated by a vertex in .

We now prove the second part of the claim. Let be the union of the five standard solutions of the dominating gadgets of . Let and . The set has vertices and so and have respectively and vertices. Each interval of either contains a dominating gadget or is part of a dominating gadget and is therefore dominated by a vertex in . Hence, pairs of vertices that are not intersecting the same dominating gadget are clearly separated. By the first property in Definition 6, a vertex adjacent to a whole dominating gadget is separated from all the vertices of the dominating gadget. Similarly, by definition, pairs of vertices inside a dominating gadget are separated by . Therefore, the only remaining pairs to consider are the choice pairs. By Property 5(3), they are separated both at the same time either by or by . Hence the two sets and are both dominating and separating the vertices of . Moreover, since contains and , it also separates the pairs of . ∎

A transmitter gadget with a solution set of size (resp. vertices) is said to be tight (resp. non-tight). We will call the sets and the tight and non-tight standard solutions of .

### 2.2 The main reduction

We are now ready to describe the reduction from 3-Dimensional Matching. Each element is modelled by a choice pair . Each triple of is modelled by a triple gadget defined as follows.

Let be a triple of . The triple gadget is an interval graph consisting of four choice pairs , , , together with their associated dominating gadgets , , , and five transmitter gadgets , , , and , where:

• , and ;

• Except for the choice pairs , , , , , , , for each pair of intervals of , its two intervals intersect different subsets of dominating gadgets of .

• In each transmitter gadget and for each choice pair , the intervals of intersect the same intervals except for the vertices of ;

• The intervals of that are intersecting only a part of the gadget intersect accordingly to the transmitter gadget definition and do not separate the choice pairs , , and .

Note that there are several ways to obtain a triple gadget that is an interval graph and that satisfies the properties in Definition 12. The one in Figure 4 represents one of these possibilities. We remark that , , and in , are all functions of but to simplify the notations we simply write , , and .

###### Claim 13.

Let be a graph with a triple gadget and be a solution. We have and if , no choice pair corresponding to , or is separated by a vertex in .

Moreover, there exist two sets of vertices of , and of size and respectively, such that the following holds.

• The set dominates all the vertices of and separates all the pairs of but does not separate any choice pairs corresponding to .

• The set dominates all the vertices of , separates all the pairs of and separates the choice pairs corresponding to .

###### Proof.

The proof is similar of the proof of Claim 11. Each transmitter gadget must contain at least vertices, and each of the four dominating gadgets of the choice pairs , , , must contain vertices. Hence there must be already vertices of in the solution. Furthermore, to separate the choice pair , or must be non-tight (since is not separated by other vertices of the graph). In the same way, to separate the choice pair , or must be non-tight. Then at least two transmitter gadgets are non-tight and we have . If , exactly two transmitter gadgets are non-tight and they can only be and (otherwise some of the choice pairs would not be separated). Hence the choice pairs corresponding to are not separated by the vertices of .

For the second part of the claim, the set is defined by taking the union of the tight standard solutions of , and , the non-tight standard solutions of and and the standard solutions of the dominating gadgets , , and . The set is defined by taking the union of the non-tight standard solutions of , and , the tight standard solutions of and and the standard solutions of the dominating gadgets , , and . By Claim 11, the definition of a dominating gadget and the fact that the only intervals sharing the same sets of dominating gadgets are the choice pairs, all intervals of are dominated and all the pairs of intervals except the choice pairs are separated by both and . The choice pairs , , and are separated by the non-tight solutions of the transmitter gadgets. Hence and are dominating and separating all the intervals of .

When the solution contains , the transmitter gadgets , and are tight. Hence does not separate any choice pairs among . On the other hand, since contains the non-tight solution of , and , the three choice pairs are separated by . ∎

As before, a triple gadget with vertices (resp. ) is said to be tight (resp. non-tight). We will call the sets and the tight and non-tight standard solutions of .

Given an instance of 3-Dimensional Matching with and , we construct the interval graph as follows.

• As mentioned previously, to each element of , we assign a distinct choice pair in . The intervals of any two distinct choice pairs are disjoint and they are all in .

• For each triple of we first associate an interval in such that for any two triples and , and do not intersect. Then inside , we build the choice pairs , , , . Finally, using the choice pairs already associated to elements , and we complete this to a triple gadget.

• When placing the remaining intervals of the triple gadgets, we must ensure that triple gadgets do not “interfere”: for every dominating gadget , no interval in must have an endpoint inside . Similarly, the choice pairs of every triple gadget or transmitter gadget must only be separated by intervals among , and of its corresponding private transmitter gadget.

For intervals of distinct triple gadgets, this is easily done by our placement of the triple gadgets. To ensure that the intervals of transmitter gadgets of the same triple gadget do not interfere, we proceed as follows. We place the whole gadget inside interval of . Similarly, the whole is placed inside interval of and the whole is placed inside interval of . One has to be more careful when placing the intervals of and . In , we must have that interval separates from the right of . We also place so that it separates from the left of . Intervals both start in , so that also separates and also to ensure that does not separate the choice pair . Intervals continue until after pair . In , we place so that it separates from the right, and we place so that it separates from the right; intervals lie strictly between and ; intervals intersect but stop before the end of (so that can separate both pairs and but without these pairs interfering). It is now easy to place between and . An example is given in Figure 5.

The graph has vertices (where is the order of a dominating gadget) and the interval representation described by our procedure can be obtained in polynomial time. We are now ready to state the main result of this section.

###### Theorem 14.

has a perfect 3-dimensional matching if and only if has a solution with vertices.

###### Proof.

Let be a perfect 3-dimensional matching of . Let (resp. ) be the union of all the non-tight (resp. tight) standard solutions for (resp. for ). Let be the union of all the standard solutions of the dominating gadgets corresponding to the choice pairs of the elements.

Then is a solution of size . Indeed, by the definition of the dominating gadgets, all the intervals inside a dominating gadget are dominated and separated from all the other intervals. All the other intervals intersect at least one dominating gadget and thus are dominated. Furthermore, two intervals that are not a choice pair do not intersect the same set of dominating gadgets and thus are separated by one of the dominating gadgets. Finally, the choice pairs inside a triple gadget are separated by Claim 13 and the choice pairs corresponding to the elements of are separated by the non-tight standard solutions of the triple gadgets corresponding to the perfect matching.

Now, let be a solution of size . We may assume that the solution is standard on all triple gadgets and on the dominating gadgets. Let be the number of non-tight triple gadgets in the solution . By Claim 13, there must by at least vertices of inside the triple gadgets and vertices of for the dominating gadgets of the elements of . Hence and we have . Each non-tight triple gadget can separate three choice pairs corresponding to the elements of . Hence, if , it means that at least choice pairs corresponding to elements are not separated by a triple gadget. By the separation property, the only way to separate a choice pair without using a non-tight triple gadget is to have or in the solution. Hence we need vertices to separate these choice pairs, and these vertices are not in the triple gadgets nor in the dominating gadgets. Hence the solution has size at least , leading to a contradiction.

Therefore, and there are exactly non-tight triple gadgets. Each of them separates three choice element pairs and since there are elements, the non-tight triple gadgets separate distinct choice pairs. Hence, the set of triples corresponding to the non-tight triple gadgets is a perfect 3-dimensional matching of . ∎

###### Corollary 15.

Any graph distinguishing problem based on domination and separation satisfying Property 5 and admitting a dominating gadget that is an interval graph, is NP-complete even for the class of interval graphs.

A similar hardness result can be derived for the class of permutation graphs as follows.

###### Corollary 16.

Any graph distinguishing problem based on domination and separation satisfying Property 5 and admitting a dominating gadget that is a permutation graph, is NP-complete even for the class of permutation graphs.

###### Proof.

We can use the same reduction as the one that yields Theorem 14. We represent a permutation graph using its intersection model of segments as defined in the introduction. A dominating gadget will be represented as in Figure 6. The transmitter gadget of Definition 10 is also a permutation graph, see Figure 7 for an illustration. Using these gadgets, we can build a triple gadget that satisfies Definition 12 and is a permutation graph. A simplified permutation diagram (without dominating gadgets) of such a triple gadget is given in Figure 8. Now, similarly as for interval graphs, given an instance of 3-Dimensional Matching, one can define a graph that is a permutation graph and for which has a perfect 3-dimensional matching if and only if has a solution with vertices. The proof is the same as the one in Theorem 14. ∎

### 2.3 Applications to the specific problems

We now apply Theorem 14 to Locating-Dominating-Set, Identifying Code and Open Locating-Dominating Set by providing corresponding dominating gadgets.

###### Corollary 17.

Locating-Dominating-Set, Identifying Code and Open Locating-Dominating Set are NP-complete for interval graphs and permutation graphs.

###### Proof.

We prove that the path graphs , and are dominating gadgets for Locating-Dominating-Set, Identifying Code and Open Locating-Dominating Set, respectively. These graphs are clearly interval and permutation graphs at the same time. To comply with Definition 6, we must prove that a dominating gadget (i) has an optimal solution of size  such that no vertex of is dominated by all the vertices of , and (ii) if is an induced subgraph of an interval graph such that each interval of either contains all intervals of or does not intersect any of them, then for any solution for , .

• Locating-Dominating-Set. Let and . The set satisfies (i). For (ii), assume that is a locating-dominating set of a graph containing a copy of satisfying the conditions. If or , then and are not separated. If , then and are not separated. Hence, by symmetry, there at least two vertices of in , and (ii) is satisfied.

• Identifying Code. Let and . The set satisfies (i). For (ii), assume that is an identifying code of a graph containing a copy of satisfying the conditions. To separate the pair , we must have , since the other vertices cannot separate any pair inside . To separate the pair , we must have and to separate the pair , we must have . Hence there at least three vertices of in , and (ii) is satisfied.

• Open Locating-Dominating Set. Let and . The set satisfies (i). For (ii), assume that is an open locating-dominating set of a graph containing a copy of satisfying the conditions. To separate the pair , we must have . Symmetrically, . To separate the pair , we might have and symmetrically, . Hence there at least four vertices of in , and (ii) is satisfied.

### 2.4 Reductions for diameter 2 and consequence for Metric Dimension

We now describe self-reductions for Identifying Code, Locating-Dominating-Set and Open Locating-Dominating Set for graphs with a universal vertex (hence, graphs of diameter ). We also give a similar reduction from Locating-Dominating-Set to Metric Dimension.

Let be a graph. We define to be the graph obtained from by adding a universal vertex and then, a neighbour of of degree . Similarly, is the graph obtained from by adding a twin of . See Figures 9(a) and 9(b) for an illustration.

###### Lemma 18.

For any graph , we have . If is twin-free, . If is open twin-free, .

###### Proof.

Let be an identifying code of . Then is also an identifying code of : all vertices within are distinguished by as they were in ; vertex is dominated only by itself; vertex is the only vertex dominated by the whole set . The same argument works for a locating-dominating set. Hence, and . If is an open locating-dominating set of , then similarly, is one of , hence .

It remains to prove the converse. Let be an identifying code (or locating-dominating set) of . Observe that since must be dominated. Hence if is an identifying code (or locating-dominating set) of , we are done. Let us assume the contrary. Then, necessarily since does not dominate any vertex of . But is a universal vertex, hence does not separate any pair of vertices of . Therefore, separates all pairs, but does not dominate some vertex : we have . Note that is the only such vertex of . This implies that (otherwise and are not separated by ). But then is an identifying code (or locating-dominating set) of of size . This completes the proof.

A similar proof works for open location-domination: if is an open locating-dominating set of , then since must be separated and totally dominated. Similarly, if is an open locating-dominating set of , we are done. Otherwise, again must belong to , and is needed only for domination. But then if there is a vertex among that is not in , the other one would not be separated from the vertex only dominated by . But then , for any vertex , is an open locating-dominating set of size and we are done. ∎

Lemma 18 directly implies the following theorem:

###### Theorem 19.

Let be a class of graphs that is closed under the graph transformation (, respectively). If Identifying Code or Locating-Dominating-Set (Open Locating-Dominating Set, respectively) is NP-complete for graphs in , then it is also NP-complete for graphs in that have diameter .

Theorem 19 can be applied to the classes of split graphs (for ), interval graphs and permutation graphs (for both and ). By the results about split graphs from [26] and about interval graphs and permutation graphs of Corollary 17, we have:

###### Corollary 20.

Identifying Code and Locating-Dominating-Set are NP-complete for split graphs of diameter . Identifying Code, Locating-Dominating-Set and Open Locating-Dominating Set are NP-complete for interval graphs of diameter  and for permutation graphs of diameter .

We now a give a similar reduction from Locating-Dominating-Set to Metric Dimension. Given a graph , let be the graph obtained from by adding two adjacent universal vertices and then, two non-adjacent vertices and that are only adjacent to and (see Figure 9(c) for an illustration).

###### Lemma 21.

For any graph , .

###### Proof.

Let be a locating-dominating set of . We claim that is a resolving set of . Every vertex of is clearly distinguished. Every original vertex of is determined by a distinct set of vertices of that are at distance  of it. Vertex is the only vertex to be at distance  of each vertex in . Finally, vertex is the only vertex to be at distance  of and at distance  from all other vertices of .

For the other direction, assume is a resolving set of . Then necessarily one of (say ) belongs to ; similarly, one of (say ) belongs to . Hence, if the restriction is a locating-dominating set of , we are done. Otherwise, since no vertex among may distinguish any pair of and since vertices of