Variable neighborhood search for the strong metric dimension problem

Variable neighborhood search for the strong metric dimension problem

Available online at www.sciencedirect.com Electronic Notes in Discrete Mathematics 39 (2012) 51–57 www.elsevier.com/locate/endm Variable neighborhoo...

203KB Sizes 5 Downloads 170 Views

Available online at www.sciencedirect.com

Electronic Notes in Discrete Mathematics 39 (2012) 51–57 www.elsevier.com/locate/endm

Variable neighborhood search for the strong metric dimension problem  Nenad Mladenovi´c a,1 Jozef Kratica b,2 ˇ Vera Kovaˇcevi´c-Vujˇci´c c,3 Mirjana Cangalovi´ c c,4 a b

c

Department of Mathematics, SISCM, Brunel University, London, UK

Mathematical Institute, Serbian Academy of Sciences and Arts, Kneza Mihaila 36/III, 11000 Belgrade, Serbia

Faculty of Organizational Sciences, University of Belgrade, Jove Ili´ca 154, 11000 Belgrade, Serbia

Abstract We consider a variable neighborhood search approach for solving the strong metric dimension problem. The proposed method is based on the idea of decomposition and it is characterized by suitably chosen neighborhood structures and efficient local search. Computational experiments on ORLIB instances show that the new approach outperformes a genetic algorithm, the only existing heuristic in the literature for solving this problem. Keywords: Strong metric dimension, metaheuristics, combinatorial optimization.

 This research was partially supported by Serbian Ministry of Science under grants 174010 and 174033. 1 Email: [email protected] 2 Email: [email protected] 3 Email: [email protected] 4 Email: [email protected] 1571-0653/$ – see front matter © 2012 Elsevier B.V. All rights reserved. doi:10.1016/j.endm.2012.10.008

52

1

N. Mladenovi´c et al. / Electronic Notes in Discrete Mathematics 39 (2012) 51–57

Introduction

The strong metric dimension problem (SMDP) was introduced by Sebo and Tannier [9] and further investigated by Oellermann and Peters-Fransen [8]. A vertex w strongly resolves two vertices u and v if u belongs to a shortest v − w path or v belongs to a shortest u − w path. A vertex set S of G is a strong resolving set of G if every two distinct vertices of G are strongly resolved by some vertex of S. A strong metric basis of G is a strong resolving set of the minimum cardinality. Now, the strong metric dimension of G, denoted by sdim(G) is defined as the cardinality of its strong metric basis. The strong metric dimension is NP-hard in a general case, see [8]. The first metaheuristic approach based on the genetic algorithm (GA) is proposed in [2]. Recently, the strong metric dimension of some special classes of graphs has been studied theoretically, such as distance hereditary graphs [5], Hamming graphs [3] and some convex polytopes [4]. Example 1.1 Consider the graph G of Figure 1. The set S = {A, B} is a strong resolving set of G. Indeed, in the case when v ∈ S then w = v strongly resolves u and v, for all u. Similarly, when u ∈ S then w = u strongly resolves u and v, for all v. In the case when u = C and v = D, then w = B strongly resolves u and v. Similar result holds for u = D and v = C. The last case when u = v ∈ {C, D} is trivial, since the shortest path of zero length can be extended to the shortest u − w path for any w ∈ S. It is easy to see that a singleton set cannot be a strong resolving set, since the u − v path with u = A, v = D or u = B, v = C cannot be extended to a shortest u − w path, with w in a singleton set. Therefore sdim(G) = 2.

Fig. 1. Graph G in Example 1.1

N. Mladenovi´c et al. / Electronic Notes in Discrete Mathematics 39 (2012) 51–57

2

53

Mathematical formulation

The integer linear programming (ILP) formulation of the strong metric dimension problem was proposed in [3]. Given a simple connected undirected graph G = (V ,E), where V = {1, 2, . . . , n}, |E| = m, it is easy to determine the length d(u, v) of a shortest u − v path for all u, v ∈ V , using any shortest path algorithm. Then, the coefficient matrix can be defined as:

A(u,v),i

⎧ ⎪ ⎨1, d(u, i) = d(u, v) + d(v, i) = 1, d(v, i) = d(v, u) + d(u, i) ⎪ ⎩ 0, otherwise

where 1 ≤ u < v ≤ n, 1 ≤ i ≤ n. Let the variable yi determine whether vertex i belongs to a strong resolving set S, i.e. yi = 1 for i ∈ S, yi = 0 otherwise. The ILP model of the strong metric dimension problem can now be formulated as follows, min

n 

yi

(1)

i=1

subject to: n 

A(u,v),i · yi ≥ 1

1≤u
(2)

i=1

yi ∈ {0, 1}

1≤i≤n

(3)

The objective function (1) represents the cardinality of a feasible solution S. Constraints (2) make sure that for each two vertices u and v there exists at least one vertex w from S which strongly resolves u and v, i.e. that S is a strong resolving set. Constraints (3) reflect the binary nature of decision variables yi .

3

VNS for the strong metric dimension problem

Variable neighborhood search (VNS) is an effective metaheuristic introduced in [6]. The basic idea of VNS is to use more than one neighborhood structure and to proceed with their systematic change within a local search. A detailed description of different VNS variants is out of the scope of this paper and can be found in [1].

54

N. Mladenovi´c et al. / Electronic Notes in Discrete Mathematics 39 (2012) 51–57

The VNS approach for the SMDP is based on the idea of decomposition described in [7]. The initial set S is obtained by a simple procedure, which starts from the empty set and adds randomly chosen vertices from V until S becomes a strong resolving set. For a given strong resolving set S the last element is deleted, to obtain set S  . The objective function value ObjF (S  ) is computed as the number of pairs of vertices from V which are not strongly resolved with respect to S  . The following steps are repeated until the stopping criterion is met. For a given k set S  in k-th neighborhood N k (S  ) is obtained using the shaking function. Starting from S  the local search procedure tries to improve S  and updates S whenever a new strong resolving set with smaller cardinality is generated. The neighborhood N k (S  ) contains all sets obtained from S  by deleting k of its elements and replacing them by k elements from V \S  . In the local search procedure, starting with S  , one element from set S  is interchanged with one element of its complement. The best improvement strategy is used, i.e. in every step an interchange is performed, which gives the maximal decrease of the objective function. Whenever the improved set is a strong resolving set, the current set S is updated, the new set S  is obtained by deleting the last element, and the procedure continues. The local search procedure stops when there is no improvement. After the local search procedure, there are three possibilities. If |S  | < |S  | or ObjF (S  ) < ObjF (S ) then set S  := S  and continue the search with the same neighborhood N k . If |S | = |S  | and ObjF (S ) > ObjF (S ), then repeat the search with the same S  and the next neighborhood. If |S | = |S | and ObjF (S ) = ObjF (S  ), then with probability pmove set S  := S  and continue search with the same neighborhood N k , and with probability 1 − pmove repeat the search with the same S  and the next neighborhood.

4

Experimental results

All tests were performed on a single processor from an Intel Quad 2.5 GHz computer with 1GB memory, under Windows XP operating system. The VNS implementations were coded in C programming language. In our experiments, the following values for the VNS parameters were used: kmin = 2, kmax = 20, pmove = 0.2, itermax = 100. In this section we present the computational results on crew scheduling (CSP) and graph coloring (GCOL) [2] ORLIB graph instances. The VNS has been run 20 times for each instance and the results are summarized in Table

N. Mladenovi´c et al. / Electronic Notes in Discrete Mathematics 39 (2012) 51–57

55

Table 1 Comparison of GA and VNS on CSP instances Inst

n

m

GA

V NS

sol

t[sec]

ttot [sec]

sol

t[sec]

ttot [sec]

csp50

50

173

29

4.108

26.769

29

0.032

0.350

csp100

100

715

61

100.787

528.21

61

0.587

4.901

csp150

150

1355

98

540.584

3166.3

98

3.883

25.258

csp200

200

2543

144

4978.7

8047.6

142

11.810

83.261

csp250

250

4152

178

4941.3

17060

172

30.790

197.573

csp300

300

6108

-

-

-

224

135.132

463.696

csp350

350

7882

-

-

-

237

214.257

816.756

csp400

400

10760

-

-

-

288

231.514

1362.773

csp450

450

13510

-

-

-

316

361.747

2096.719

csp500

500

16695

-

-

-

367

859.872

3474.093

1 and Table 2. The tables are organized as follows: • The first three columns contain the test instance name and the number of nodes and edges, respectively; • The fourth column gives the best GA solution value from [2] (named sol) obtained in 20 runs; • The average running time (t, in seconds) used to reach the final GA solution for the first time is given in the fifth column, while the sixth column ttot shows the average total running time for finishing GA; • The next three columns show the VNS results, presented in the same way as for GA. From Table 1 and Table 2, it is clear that the results obtained by the VNS outperform those obtained by the GA approach from [2], both with respect to the solution quality and the running time. The VNS has made improvements of the GA upper bounds in 2 cases and has produced 15 new upper bounds for large scale instances which were out of reach for the GA method. The VNS running times are one to two orders of magnitude smaller than those of GA.

5

Conclusions

In this paper an efficient variable neighborhood search approach for solving the strong metric dimension problem is presented. The objective function gives the number of pairs of vertices not strongly resolved by the vertices of a set with the given cardinality. The corresponding neighborhood structures allow an effective shaking procedure which successfully diversifies the search process. The local search implementation was conducted very efficiently and it resulted in an excellent overall VNS performance for graphs with up to 300 vertices.

56

N. Mladenovi´c et al. / Electronic Notes in Discrete Mathematics 39 (2012) 51–57

Table 2 Comparison of GA and VNS on GCOL instances Inst

n

m

GA

V NS

sol

t[sec]

ttot [sec]

sol

t[sec]

ttot [sec]

gcol1

100

2487

91

18.119

172.732

91

3.359

10.773

gcol2

100

2487

91

28.443

182.663

91

2.950

10.771

gcol3

100

2482

91

49.108

198.800

91

1.740

10.813

gcol4

100

2503

91

33.926

173.360

91

3.101

10.799

gcol5

100

2450

91

22.734

166.339

91

3.078

10.968

gcol6

100

2537

91

46.603

194.784

91

1.994

10.505

gcol7

100

2505

91

15.826

170.525

91

2.746

10.820

gcol8

100

2479

90

16.111

177.131

90

3.994

10.783

gcol9

100

2486

91

15.676

178.285

91

2.762

10.856

gcol10

100

2506

91

17.327

167.539

91

2.958

10.816

gcol11

100

2467

91

18.700

169.150

91

2.496

10.883

gcol12

100

2531

91

20.990

166.088

91

1.370

10.707

gcol13

100

2467

91

25.398

171.383

91

3.337

10.926

gcol14

100

2524

91

27.909

169.664

91

3.156

10.698

gcol15

100

2528

91

44.315

182.577

91

2.148

10.617

gcol16

100

2493

91

33.121

173.897

91

2.892

10.849

gcol17

100

2503

91

25.073

172.929

91

1.356

10.841

gcol18

100

2472

91

34.893

173.495

91

2.895

10.838

gcol19

100

2527

91

14.407

163.039

91

1.534

10.611

gcol20

100

2420

91

31.080

175.908

91

3.065

11.114

gcol21

300

22482

-

-

-

288

245.705

905.704

gcol22

300

22569

-

-

-

288

334.413

901.708

gcol23

300

22393

-

-

-

289

223.233

908.390

gcol24

300

22446

-

-

-

288

198.009

914.817

gcol25

300

22360

-

-

-

288

292.655

906.743

gcol26

300

22601

-

-

-

288

279.909

912.178

gcol27

300

22327

-

-

-

288

307.033

913.269

gcol28

300

22472

-

-

-

288

226.901

902.212

gcol29

300

22520

-

-

-

288

268.638

973.929

gcol30

300

22543

-

-

-

288

319.898

964.425

An experimental comparison with the only existing heuristic approach based on the genetic algorithm indicates the superiority of the VNS approach with respect to the solution quality and running time. Further research could be directed to testing on more powerful and/or parallel computers as well as to using the computational results to generate theoretical hypotheses about the strong metric dimension.

References [1] Hansen, P., N. Mladenovi´c and J.A. Moreno-P´erez, Variable neighbourhood search: algorithms and applications, Annals Oper. Res. 175 (2010), 367–407. ˇ [2] Kratica, J., V. Kovaˇcevi´c-Vujˇci´c, and M. Cangalovi´ c, Computing strong metric

N. Mladenovi´c et al. / Electronic Notes in Discrete Mathematics 39 (2012) 51–57

57

dimension of some special classes of graphs by genetic algorithms, Yugoslav J. Oper. Res. 18 (2008), 43–51. ˇ [3] Kratica, J., V. Kovaˇcevi´c-Vujˇci´c, M. Cangalovi´ c, M. Stojanovi´c, Minimal doubly resolving sets and the strong metric dimension of Hamming graphs, Applicable Analysis and Discrete Mathematics 6 (2012), 63–71. ˇ [4] Kratica, J., V. Kovaˇcevi´c-Vujˇci´c, M. Cangalovi´ c, M. Stojanovi´c, Minimal doubly resolving sets and the strong metric dimension of some convex polytopes, Appl. Math. Comput. 218 (2012), 9790–9801. [5] May, T., and O.R. Oellermann, The strong metric dimension of distance hereditary graphs, J. Comb. Math. Comb. Comput., in press [6] Mladenovi´c, N., and P. Hansen, Variable neighbourhood search, Comp. & Oper. Res. 24 (1997), 1097–1100. ˇ [7] Mladenovi´c, N., J. Kratica, V. Kovaˇcevi´c-Vujˇci´c, and M. Cangalovi´ c, Variable neighborhood search for metric dimension and minimal doubly resolving set problems, Euro. J. Oper. Res. 220 (2012), 328–337. [8] Oellermann, O.R., and J. Peters-Fransen, The strong metric dimension of graphs and digraphs, Discr. Appl. Math. 155 (2007), 356–364. [9] Seb¨o, A., and E. Tannier, On metric generators of graphs, Math. & Oper. Res. 29 (2004), 383–393.