Abstract

We consider, in this paper, the NP-hard problem of finding the minimum connected domination metric dimension of graphs. A vertex set B of a connected graph G = (V, E) resolves G if every vertex of G is uniquely identified by its vector of distances to the vertices in B. A resolving set B of G is connected if the subgraph induced by B is a nontrivial connected subgraph of G. A resolving set is dominating if every vertex of G that does not belong to B is a neighbor to some vertices in B. The cardinality of the smallest resolving set of G, the cardinality of the minimal connected resolving set, and the cardinality of the minimal connected domination resolving set are the metric dimension of G, connected metric dimension of G, and connected domination metric dimension of G, respectively. We present the first attempt to compute heuristically the minimum connected dominant resolving set of graphs by a binary version of the equilibrium optimization algorithm (BEOA). The particles of BEOA are binary-encoded and used to represent which one of the vertices of the graph belongs to the connected domination resolving set. The feasibility is enforced by repairing particles such that an additional vertex generated from vertices of G is added to B, and this repairing process is iterated until B becomes the connected domination resolving set. The proposed BEOA is tested using graph results that are computed theoretically and compared to competitive algorithms. Computational results and their analysis show that BEOA outperforms the binary Grey Wolf Optimizer (BGWO), the binary Particle Swarm Optimizer (BPSO), the binary Whale Optimizer (BWO), the binary Slime Mould Optimizer (BSMO), the binary Grasshopper Optimizer (BGO), the binary Artificial Ecosystem Optimizer (BAEO), and the binary Elephant Herding Optimizer (BEHO).

1. Introduction

Recently, connected domination metric dimension of graphs is introduced in [1]. Metric dimension has several applications in robot navigation [2, 3], network discovery and verification [4], application to wireless sensor network localization [5], pattern recognition, image processing [6], combinatorial optimization [7], and applications to pharmaceutical chemistry [8]. Domination theory is applied in wireless communication networks [9], electrical networks [10], and chemical structures [11]. The connected domination set with smallest cardinality is a natural candidate to be used for the information exchange in any kind of network. The utilization of connected domination sets of graphs for defining virtual backbone architecture in ad hoc wireless networks has been explored in [1215].

2. Problem Description

Let G= (V, E) be a connected graph, and let d(u,v) be the shortest path between two vertices V(G). An ordered vertex set B = {x1,x2,...,xk}⊆ V(G) is a resolving set of G if the representationis unique for every V(G). A resolving set is a dominating set of G if every vertex of V\B has at least one neighbor that belongs to . A dominating resolving set is connected if the subgraph induced by B is a nontrivial connected subgraph of G. Let Card (X) denote the cardinality of a set X. The metric dimension of G, denoted as dim(G), the domination metric dimension of G, denoted as Ddim(G), and the connected domination metric dimension of G, denoted as γcr (G), are defined as

Example 1. For the fan graph F7 given in Figure 1, the set B= is a minimal resolving set, so dim(F7) = 3. B is also a minimal domination resolving set since every vertex of V\B has at least one neighbor that belongs to , e.g., is adjacent to and , is adjacent to , and , is adjacent to , and , and is adjacent to ,  = 3. However, B is not connected domination resolving set of F7 since is not connected to vertices in B. On the other hand, the set B =  is a minimal connected domination resolving set of F7, so γcr (F7) = 4.
The connected domination metric dimension problem combines three components: connectedness, domination, and metric dimension of graphs. The problem of finding the metric dimension of a graph G is described in terms of an integer programming problem [8]. Let D = [dij] be the distance matrix of G, dij =  for 1 ≤ i, j ≤ n. For xi ∈ {0, 1}, 1 ≤ i ≤ n, the function F is defined byMinimizing F subject to the constraintsis equivalent to finding a basis in the sense that if ,,…, is a set of values for which F attains its minimum, then B = is a basis for G and conversely, if B = is a basis for G and if we definethen F( ,,…,) is a minimum subject to the given constraints.
The dominating set problem is NP-complete [16], and the metric dimension problem is NP-complete [17]. Consequently, the connected domination metric dimension γcr (G) is a typical NP-complete problem that involves determining if γcr (G) ≤ K for a given graph G and input K.
The rest of the paper is organized as follows: Section 3 gives a literature review. Section 4 introduces the Equilibrium Optimization Algorithm (EOA). Section 5 gives the BEOA for computing the connected domination metric dimension. Section 7 reports computational results. Finally, Section 7 provides the conclusion and future work.

3. Literature Review

Metric dimension, domination metric dimension, and connected domination metric dimension of graphs are determined theoretically for several graphs in the literature. A short overview of the main recently determined theoretically metric dimension results [1723] is given hereafter. The metric dimensions of the total graph of path powers three and four are determined theoretically in [18], symmetrical planar pyramid graph and reflection symmetrical planar pyramid graph in [19], m-level gear graph and generalized gear graph in [17], kayak paddles graph and cycles with chord in [20], circulant graphs in [21], generalized families of Toeplitz graphs in [22], and windmill graphs in [23].

The connected metric dimension are determined theoretically in [24, 25]. Cycle graph, wheel graph, star graph, complete graph, and path graph are determined in [24] and Petersen graph in [25].

The dominant metric dimension are determined theoretically in [26, 27]. Path graph, cycle graph, star graph, complete graph, and complete bipartite graph are determined in [26], the corona product graph of G and H is investigated whenever H is a path graph, and the cycle graph, complete bipartite graph, complete graph, and star graph Sn are determined in [27].

The connected domination metric dimensions of complete graph, path graph, and cycle graph are determined theoretically in [1].

On the other hand, only a few algorithms have been proposed to compute heuristically the metric dimension problem [2830]. In [28], a genetic algorithm has been developed for computing the metric dimension of many classes of graph instances including pseudo-Boolean, crew scheduling and graph coloring. The binary representation, frozen genes mutation, a limited number of different individuals with the same objective value, and the caching technique were all applied. Infeasible individuals are changed by the addition of the required nodes in order to become feasible. In [29], PSO is adapted for determining the metric dimension where a real valued vector of vertices is converted to binary valued vector by a linear function and infeasible particles are repaired by adding some vertices until the particles become feasible. The PSO is tested by computing the metric dimension of hypercube graphs. A variable neighborhood search approach has been proposed for solving metric dimension and minimal doubly resolving set problems in order to improve the existing upper bounds in [30]. The variable neighborhood search approach is based on a decomposition of the metric dimension problem and the minimal doubly resolving set problem into a sequence of subproblems with an auxiliary objective function. In addition, for both problems, the corresponding new integer linear programming formulations are proposed.

Here, the operations of the EOA are encoded and adapted to solve the connected domination metric dimension problem. The proposed BEOA is tested using graph results that are computed theoretically and is compared to competitive algorithms.

4. Equilibrium Optimization Algorithm (EOA)

The original EOA is a physics-based metaheuristic algorithm for handling continuous optimization problems in [31]. The EOA is a recently proposed metaheuristic algorithm that uses an equilibrium pool and candidates to update particles. The EOA is based on the analytic solution procedure for a well-mixed dynamic mass balance on a control volume. The EOA avoids falling into the local optimum in addition to having great exploitation and exploration capabilities. These benefits of EOA are made possible by the concept of generation rate.

The mass balance equation is solved analytically, yielding the following results:where V is considered to be 1 as the volume unit.

The EOA generates an equilibrium pool with four candidates and another averaged one:

The fitness values of the candidates in the equilibrium pool should satisfy the following rules for a given problem represented by f:

EOA uses the same initializing and iterating techniques as other bioinspired algorithms when solving problems, whether they are stated as benchmarks or come from real engineering work. While iterating, the EOA continues its domain exploration and exploitation operations. To improve performance, there are numerous specific operations in constructing the EOA.

4.1. The Initialization Procedure

Assuming that the presented problems are constrained by a symmetric or asymmetric domain with [lb,ub], the candidates of the swarms are uniformly distributed across the domain. To achieve this, the pseudo-random random number r1 is introduced:

The position vector for the ith candidate is .

4.2. The Random Chosen Candidate

The positions of the candidates for the following iteration would be significant to three phases during the iterations, as equated in equation (6). Ceq is a randomly selected candidate from the swimming pool constructing with equation (7) for the first phase.

4.3. The Exponential Parameter

There is an exponential parameter F for the second part of equation (6), which is determined as follows:where a1 is a constant variable that controls exploring capabilities as well as a parameter splitting the exploring and exploiting procedure. The higher the value of a1, the higher the probability for candidates to carry on exploration, and the smaller the probability for candidates to carry on exploitation. For experience and convenience, a1 = 2.r2 is another random number with the interval of [0, 1], and t is a parameter formulated to be related to the iteration times.where iter denotes the current iteration number, and maxIter denotes the maximum iteration number restricted at the start.

4.4. The Generation Rate Parameter

The word G stands for the generation rate parameter, which improves the exploiting capability of candidates. The rate of generation is proportional to the exponential parameter, which is given as follows:

GP stands for generation probability. GP is set to be 0.5 to achieve better results in balancing the probability between exploration and exploitation. Updating rule of EO will be as follows:where F is defined in equation (11) and V is considered as unit.

5. Binary EOA for the Connected Dominated Metric Dimension Problem

[31]. The high performance of EOA is mainly derived from its extensive design in balancing exploration and exploitation abilities. This advantage makes a binary version of the algorithm that uses binary encoding, which can be adapted to solve the connected domination metric dimension problem. In the continuous version of EOA, particles can move around the search space using position vectors within the continuous real domain. We convert EOA to binary values by applying an S-shaped transfer function to transform the continuous variable into a binary one. In discrete binary search space, position updates require switching between 0 and 1.

The following equation is used in the initialization step.

The rand() has uniform distribution, with a value of [0.0, 1.0], and Cbinaryij is binary valued position vector. To convert continuous values to binary ones, a transfer function is used. The sigmoid function (S) is used in this study as follows:where xd indicates the continuous-valued position at dimension d and S is the function output. To generate a binary value, apply the following equation:

The proposed algorithm deals with the connected domination resolving set problem as an optimization problem where it searches for the best solution, so each particle can be represented as a one-dimensional vector Cbinaryij = {Ci1, Ci2, Ci3, …, Cij}, and Cbinaryij is a binary valued position vector if j-th element of the vector has a value of 1; it means that vertex j belongs to B. If every V(G) has a unique representation , then B is a connected domination resolving set. The value of a binary valued position vector is produced by computing the value of the S-shaped transfer function. In the BEO algorithm, when a particle is not feasible as a connected domination resolving set, that particle is repaired by adding a vertex from V\B. This repair is applied until that particle becomes connected domination resolving set.

The algorithm represents each solution (individual) in the population as a string of binary in which 1 means that the connected domination resolving set will be chosen, and then the corresponding value will be “1,” and if the connected domination resolving set is not selected, then the corresponding value will be “0.”

The proposed BEO algorithm is displayed in Algorithm 1.

Initialize the particle’s populations i = 1,…,n
Assign equilibrium candidates’ fitness a large number
Assign free parameters a1 = 2; a2 = 1; GP = 0.5;
While Iter < Max_iter
For i = 1: number of particles (n)
 Calculate fitness of ith particle
  If () < ()
   Replace with and fit () with ()
 Convert each into binary using S-shaped transfer function in Cbinary ij
  Calculate the fitness of each Cbinary ij
  Update new position of the candidate using (16)
Else if () > ( ) & ()) < ()
   Replace with and fit () with ()
   Convert each into binary using S-shaped transfer function in Cbinary ij
   Calculate the fitness of each Cbinary ij
   Update new position of the candidate using (16)
Else if () > (( ) & () > () & () < ()
   Replace with and fit () with ()
   Convert each into binary using S-shaped transfer function in Cbinaryij
   Calculate the fitness of each Cbinaryij
   Update new position of the candidate using (16)
Else if () > () & () > () & () > () & ()) < ()
   Replace with and fit ( ) with ()
   Convert each into binary using S-shaped transfer function in Cbinary ij
   Calculate the fitness of each Cbinary ij
   Update new position of the candidate using (16)
End (If)
End (For)
Construct the equilibrium pool
Accomplish memory saving (if Iter >1)
Assign using (12)
  For i = 1: number of particles (n)
Randomly choose one candidate from the equilibrium pool (vector)
Generate random vectors of λ⃗, r⃗ using (11)
Construct using (11)
Construct using (15)
Construct using (14)
Construct using (13)
Update concentrations (1- F) using (16)
  End (For)
 Iter = Iter + 1
End while
Return candidate with best fitness value

6. Results and Discussion

This section summarizes the results of BEOA applied to graph instances that are computed theoretically and the family of snake graphs.

6.1. Experimental Results

In this section, the proposed BEOA is compared to the BGWO, BPSO, BWOA, BSMA, BGOA, BAEO, and BEHO algorithms. The algorithms are applied to a path graph, a cycle graph, a triangular snake graph, a double triangular snake graph, (2,k)c4– snake graph, a linear kc4-snake graph, and a nc4 ○ 2pn graph. The algorithm tests and comparisons were performed on the windows 10 Ultimate 64 bit operating system; the processor was an Intel Core i7 running at 16 GB of RAM, the hard drive was a 1TBHDD+1TBSSD, and the code was implemented in MATLAB 2021b. The parameter setting values are presented in Table 1.

All algorithms have been run 20 times for each graph, and the results are summarized in Tables 28.

The tables are organized as follows: The first three columns contain the number of nodes N, the number of edges M, the connected domination resolving number γcr, and the CPU time (t) used to indicate the exactly connected domination resolving number and iteration: the average number of iterations for finishing the algorithms to achieve the best solution, respectively.

Table 2 shows a comparison between BEOA, BGWO, BPSO, BWO, BSMO, BGO, BAEO, and BEHO for computing connected domination resolving number for path graph Pn, 4 ≤ n ≤ 17, and BEOA has reached an optimal solution.

Table 3 shows a comparison between BEOA, BGWO, BPSO, BWO, BSMO, BGO, BAEO, and BEHO for computing connected dominating resolving number for cycle graph Cn, 4 ≤ n ≤ 17, and BEOA has reached an optimal solution.

Table 4 shows a comparison between BEOA, BGWO, BPSO, BWO, BSMO, BGO, BAEO, and BEHO for computing connected dominating resolving number for triangular snake graph Tn, 3 ≤ n ≤ 33, and BEOA has reached an optimal solution.

Table 5 shows a comparison between BEOA, BGWO, BPSO, BWO, BSMO, BGO, BAEO, and BEHO for computing connected dominating resolving number for double triangular snake graph DTn, 4 ≤ n ≤ 46.

Table 6 shows a comparison between BEOA, BGWO, BPSO, BWO, BSMO, BGO, BAEO, and BEHO for computing connected dominating resolving number for (2,k)c4– snake graph, 1 ≤ k ≤ 15 and 6 ≤ n ≤ 76.

Table 7 shows a comparison between BEOA, BGWO, BPSO, BWO, BSMO, BGO, BAEO, and BEHO for computing connected dominating resolving number for linear kc4-snake graph, 1 ≤ k ≤ 15 and 4 ≤ n ≤ 46.

Table 8 shows a comparison between BEOA, BGWO, BPSO, BWO, BSMO, BGO, BAEO, and BEHO for computing connected dominating resolving number for nc4 ○ 2Pn graph and 4 ≤ n ≤ 60.

6.2. Comparison

To further demonstrate the excellence of proposed BEOA, we choose BGWO, BPSO, BWO, BSMO, BGO, BAEO, and BEHO algorithms to conduct experiments under the same conditions and compared the results.

The results on graphs are shown in Tables 28, which indicate that the proposed BEOA algorithm outperforms other algorithms on graphs, reaching 253.87 sec in BEOA, 949.24 sec in BGWO,1112.73 sec in BPSO,1285.3 sec in BWO, 928.7 sec in BSMO,1175.3 sec in BGO,1342.6 sec in BAEO, and 1308.9 sec in BEHO for path graph, 231.93 sec in BEOA, 1165.33 sec in BGWO,1013.1 sec in BPSO,1168.5 sec in BWO,854.3 sec in BSMO,1091.8 sec in BGO,1315.7 sec in BAEO, and 1289.6 sec in BEHO for cycle graph, 702.6 sec in BEOA,1291.8 sec in BGWO,1459.1sec in BPSO,1286.5 sec in BWO, 892.6 sec in BSMO, 1093.7 sec in BGO,1276.3 sec in BAEO, and 1197.9 sec in BEHO for triangular snake graph, and 1045.9 sec in BEOA, 2006.1sec in BGWO, 2273.4 sec in BPSO 1937.5 sec in BWO, 1511.1 sec in BSMO, 1784.9 sec in BGO,1673.5 sec in BAEO, and 1760.3 sec in BEHO for double triangular snake graph, 1455.8 sec in BEOA, 2252.3 sec in BGWO, 2513.1 sec in BPSO, 2047.3 sec in BWO, 1739.5 sec in BSMO, 2096.4 sec in BGO, 2134.7 sec in BAEO, and 2086.3 sec in BEHO for (2,k)c4– snake graph, 1149.1 sec in BEOA, 1904.4 sec in BGWO, 2193.8 sec in BPSO, 1725.9 sec in BWO, 1631.6 sec in BSMO, 1729.2 sec in BGO, 1681.5 sec in BAEO, and 1708.1 sec in BEHO for linear kc4-snake graph, and 1125.3 sec in BEOA, 2026.9 sec in BGWO, 2257.5 sec in BPSO, 2067.4 sec in BWO, 1712.9 sec in BSMO, 1822.6 sec in BGO, 1705.1 sec in BAEO, and 1839.3 sec in BEHO for nc4 ○ 2pn graph. It proves the correctness and superiority of the proposed BEOA.

Figures 28 show the superiority of the proposed BEOA on the BEOA, BGWO, BPSO, BWO, BSMO, BGO, BAEO, and BEHO according to the connected domination resolving number.

7. Conclusion

In this paper, a binary variant of the basic equilibrium optimization algorithm BEOA for determining the minimum connected domination resolving set of graphs and compared to BGWO, BPSO, BWO, BSMO, BGO, BAEO, and BEHO. Comparisons were performed on the graphs: a path graph, cycle graph, triangular snake graph, double triangular snake graph, (2,k)c4– snake graph, linear kc4-snake graph, and nc4 ○ 2pn graph. Experimental results and their analysis confirmed the superiority of the proposed BEOA for solving the connected domination metric dimension problem.

For further work in the future, we plan to compute other variants of metric dimension by other metaheuristic algorithms and compare them with competitive algorithms.

Data Availability

https://invoicing.hindawi.com/payment-details/c4921783-ade7-470d-acf7-cd6f9ec421fb The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that they have no conflicts of interest regarding the present study.