Cluster Optimization in Mobile Ad Hoc Networks Based on Memetic Algorithm: memeHoc

Department of Computer Science, Abdul Wali Khan University Mardan, Mardan, Pakistan Department of Computing and Technology, Iqra University, Islamabad, Pakistan Department of Computer and Information Science, Faculty of Science and Technology, University of Macau, Macau, China School of Software, Northwestern Polytechnical University, China Department of Computer Science, Islamia College Peshawar, Peshawar 25120, Pakistan Department of Computer Science, College of Computers and Information Technology, Taif University, Taif 21944, Saudi Arabia Institute of Computing, Kohat University of Science and Technology, Kohat, Pakistan Department of Information Technology, College of Computers and Information Technology, Taif University, Taif 21944, Saudi Arabia

perform well when the MANET size becomes larger compared to flat MANET regardless of routing method adopted [4]. e scalability issue in flat MANET is very critical with a large number of node, and the nodes are moving in some directions. Once the number of MNs in MANET with flat routing structure is x, the complexity of proactive routing scheme will be O (x 2 ) [5]. When the number of MNs in the MANET grow, the routing overhead grows accordingly which can be calculated as the square the number of MNs. e re-active routing algorithms also cause route setup delay when we increase the number of MNs in a MANET. e flooding route request (RREQ) packets issue may also arise. Hence, to accomplish elementary performance assurance in sized MANET, a hierarchal organization is mandatory [6]. e classic implementation of hierarchal design is the clustering structure.
e selection of optimal CHs is an NP-hard problem [7].
Designing a clustering algorithm able to route information with little effort is a demand of the day in MANET research. Clustering is an important paradigm, and its importance can be stated in two ways. Firstly, network management can be carried out effectively via the clustering algorithm. A typical MANET comprises more than hundred or even thousand MNs. In flat MANET structure, needless packets are initiated [8]. e scalability issue may arise with flat-based MANET when we want to increase the number of MNs in MANET and may saturate the network. e MNs in MANETmay be static or mobile, and handling the scalability is more challenging as compared to other networks. erefore, managing the MANET effectively is more important. To manage the MANET effectively, utilizing the clustering mechanism becomes essential. Secondly, the problems like controlling the topology, construction of virtual network, intrusion detection, and routing can be solved with the help of clustering [9]. All the subjects stated previously are committed based on well-structured MANET clustering.
One of the imperative design consideration of a clustering algorithm is the discovery of an optimal CH set that should cover all parts of the MANET. At one instant, MN will be the member of one cluster. e existence of a CH in each cluster is not mandatory. However, the existence of a CH in a cluster has the advantage of managing the MANET easily, and most of the protocols discussed in the literature assume the selection of CHs. e cluster formation should be carried out in a way that the control overhead messages may decrease. Otherwise, the clustering algorithm will be more energy consuming than flat architecture. To find optimal CH set, optimization schemes such as particle swarm optimization, evolutionary algorithms, and neural networks may be used [10]. e contributions are listed as follows: (i) In this paper, the MANET is distributed into clusters using an evolutionary memetic algorithm.
(ii) e problem is formulated as a graph, and the fitness function is tested according to network requirements.
(iii) e proactive cluster-based routing scheme named "optimal clustering in MANET based on memetic algorithm: memeHoc" is proposed. (iv) e algorithm works by selecting a set of CHs where a cluster headset denotes a chromosome (solution). (v) e quality of the chromosome is improved with local search method. e (CH set) result is evaluated by a fitness function. e parents are selected for reproduction based on the fitness value. e crossover and mutation are applied to generate the offsprings. e new solutions are generated until the optimal solution is found. (vi) e efficiency of the clustering algorithm is increased with memetic algorithm. (vii) e test outcomes demonstrate that the suggested method has notable performance when compared to existing techniques. e rest of the article is planned as follows: Section 2 discusses the existing work. In Section 3, a detail description of the basic memetic algorithm is presented; in Section 4, network formulation using the memetic algorithm is presented, and in Section 5, the performance evaluation is described, and finally the paper is concluded.

Literature Review
e recent research on the cluster-based algorithm in MANET is presented in this section. e clustering procedures are divided into the following classes.

Clustering Based on Energy Efficiency.
e main goal of this technique is to minimize the power dissipation throughout the cluster creation. e paper [11] presents a clustering algorithm that works in a distributed manner named distributed cluster head scheduling (DCHS) algorithm. e purpose of the proposed scheme is to enhance the lifetime of MANET. In this algorithm, the MANET is grouped into two tiers, i.e., primary tire and secondary tier. e tier formation is based on the received signal strength of MN in MANET from the base station. e algorithm performs the cluster head selection for the primary tier as well as secondary tier. e authors claim that the proposed clustering scheme selects the CHs in a way that load balancing factor may not compromise. e benefit is to avoid or minimize calling reclustering procedure again and again.
e CHs are mainly selected based on the received signal strength and remaining energy of mobile nodes.
Findings: the mobility of node which is a key parameter is not considered in this scheme.
e MNs with a large number of neighbors are the most suitable candidates for CH selection, and it is also ignored in this paper. Similarly, the communication load, trust, and reputation are also ignored.
e CHs are selected randomly in the first round in [12]. e CHs in the next round are selected on the basis of residual energy.

Complexity
Findings: the output of the random selection of CH nodes in the first round may be unbalance partition. e CHs may be selected from one part of the network and may increase the messages overhead. e mobility and degree of node during the CH selection process is also ignored. e protocol may not perform well when we have a mobile base station.

Mobility-Based
Clustering. Mobility of sensor nodes is a key to consider during the selection of CHs so as to increase the lifetime of MANET. e movement may be random or the node may use other mobility patterns. In leader-based group routing, the overhead of routing throughout routing practice and resource requests are reduced significantly by assuming each set as a different element [13]. To reduce the impact of group variations on the performance of MANET, the resource assignments to every set separately is assumed. e contact opportunities of mobile nodes in delay tolerant networks are very less, and to better utilize the rare contact options, any node of a group within the transmission range of different group member exchanges data with other group instead of direct communication between group leaders.
In the work proposed in [14], the CH nodes are selected on the basis of node mobility. e nodes having least mobility are the best candidates for the role of CH. e weighted clustering algorithm is adopted to perform the election of CHs. e connectivity of CHs and their members are also checked. e authors claim that the proposed scheme outperforms in terms of energy and flexibility against mobility.
Findings: e nodes with least mobility are the best candidates for CHs, and the scheme may not perform well when the overall speed of the network is high. e nodes with low speed will be disconnected after a while, and the reclustering procedure will be called very frequently, resulting in decreasing network lifetime. Similarly, the direction of nodes also plays an important role during the CH selection. e CH with low mobility but different directions to their neighbors may cause the disconnection of CH with their members. e degree of node is also ignored in the CH selection process.

Stable Clustering.
e CHs should be selected in such a way to get more stable and balanced clusters in order to decrease the ripple effect of reclustering. For this, we need to consider the parameters like the relative mobility, degree, and the current energy of MNs. By clustering in MANETs through neighborhood stability-based mobility prediction (MobHiD), the clusters that are extremely resilient to variations of topology are formed with right prediction of MHs mobility [15]. Mobility measurement is based on the location of its neighbors over time and does not require any specific hardware.
e correct estimation of future mobility is achieved by the strong correlation between MHs movement. It combines the features of highest degree and node mobility prediction to form long life. In the stable k-hop clustering algorithm for routing in MANET, the clustering topology overhead by forming k-hop clusters is more stable than that forming by one-hop clustering structure [16]. For particular situations, two cluster heads are allowed in the k-hop neighborhood, and this will be achieved with maintenance function. In the k-hop neighborhood, the diffusion of the cluster information is reduced by two round cluster head selection mechanisms.

Optimization and Swarm Intelligence-Based Clustering.
In order to efficiently perform, the parameters used for the selection of CHs in clustering algorithms play a very important role. In proficient bee colony clustering protocol (PBC-CP), the bee intelligence is used to select the CHs in MANET [17]. e CHs are selected based on the current energy of node, nodes degree, and distance from the BS. e algorithm is further improved by choosing the shortest path for sending from and to the BS. e path which requires less energy to transmit a packet is assumed as the shortest path in this approach.
Findings: mobility is the main source of energy consumption in MANET because the topology changes very frequently when the nodes are highly mobile. e mobility metric during the selection of CH is not assumed in this protocol. e trust, reputation, and communication load of nodes need careful attention running the clustering selection algorithm and are ignored in this paper. e quality of neighbors plays a very vital role when dealing with CHs selection. e neighbor's response is not noted in the proposed scheme.
Because of the unequal distribution of CHs in MANET, the dynamic particle swarm optimization-based fuzzy clustering algorithm was proposed [18]. e authors claim that the fuzzy c means in addition to PSO results more stable and balanced clusters in MANET. An inference system named Mamdani fuzzy inference system is used to nominate the CHs. e node current energy, number of neighbors, and distance to BS are the parameters for the selection of a node as CH.
e parameters are the inputs in the inference scheme described above. e fuzzy instruction is optimized using the particle swarm optimization. e proposed scheme result increases the lifetime of the network.
Findings: In latest technology, we may deal with either static nodes or mobile nodes in MANET. e proposed scheme does not assume the mobility of sensors while electing the CHs. e factors assumed above are not sufficient to form balance clusters. e ripple effect of reclustering will be high in the proposed scheme. e reclustering burden may decrease the lifetime of MANET.
We have proposed a clustering scheme based on honey bee swarm optimization and genetic algorithm in [19]. e proposed scheme forms stable clusters compared to the existing schemes. An energy-efficient clustering in MANETs using multiobjective particle swarm optimization (EMPSO), which manages effectively the resources of MANET by finding the optimum number of clusters in multiobjective manner [20].

Load Balancing through Evolutionary Algorithms
Clustering.
e problem of dynamic load balancing (DLB) is first framed to dynamic optimization problem (DOP) [21].
Complexity 3 e use of different dynamic genetic algorithms developed for DOPs is proposed to solve the balance clustering issue in MANET.
e fitness of a solution is examined on DLB metric, and every individual denotes a CH set with member nodes associated with each CH. To control the environmental changing aspects, numerous multipopulation algorithms, colonists, memory, and permutations of all or some of these are incorporated in the SGA. Cluster-based LBP is modeled precisely to DOP and will be used by different AI techniques like artificial immune system and ant colony optimization. Dynamic GAs are developed for load balancing and used in this paper. Dynamic test and network environments are created and tested.
In this approach [22], the compactness, separation, and optimal number of clusters are optimized using the genetic algorithm. e weight function is developed based on some empirical analyses. e weights between 0 and 1 can be assigned to each parameter. e compact value should be minimized, and the cluster separation should be maximized. e optimal clusters are achieved. Findings: the nodes' distance and compactness are considered in CHs selection. e mobility, degree, and communication load of sensor nodes are ignored in this approach.

Hybrid Clustering.
To reduce the burden on the nodes near base station (BS), the clustering algorithm that assumes the energy constraint of MNs in MANET was proposed [23]. e clustering scheme focuses on the global optimization of MNs energy. e authors claim that the overloaded burden on the MNs near to BS is reduced to the optimal level. e scheme uses timer-oriented competition approach for the selection of CH set. e scheme topology overheads messages of MNs. In this way, the network traffic may reduce. e distance of MNs and BS is taken into consideration to equally distribute the CH throughout the network. is way, the MNs may consume energy in a uniform fashion. e member nodes join a cluster on the basis of communication radius and CH set in order to guarantee the balance partitioning.
Findings: CHs are rotated based on time interval, and it is hard to know that the reelection is required based on time.
e nodes may be selected from one part of the network. e mobility of nodes is not considered during the CH selection.
To improve the productivity and ease the process of cultivation, the precision agriculture needs the services of MANET. is will improve farming techniques, and production cost (labor) may decrease. e MANET has widely been used for the purpose [24]. e technical nature of wireless sensor nodes makes it difficult to transmit the sensing data in a timely manner without delay. e routing issues and short network lifetime may also arise due to limited energy of nodes. e sensor nodes near to base station manage heavy burden of data coming from other neighbors. e main goal of this proposal is to select the CHs from centroid locations and the gateway nodes are selected from each cluster based on their location. e purpose of gateway nodes is to reduce the burden on CHs. e gateway nodes forward data to and from other clusters. e authors claim that by this way, the load on the CHs will be equal. e coverage of CH will also increase because the gateway nodes communicate with other clusters on behalf of CH.

Proposed Memetic Algorithm for MANET Clustering: memeHoc
To formulate the problem of dividing the network in clusters, we assume N number of MNs in the network, and the task is to divide the MANET to k clusters. In the proposed algorithm, the network model is first presented and then the dynamic and optimal clustering in MANET is formulated. e problem of balanced cluster formation of n MNs is actually solved by constructing a mapping or finding a set of MNs (cluster heads) which shows the allocation of n MNs into k nonoverlapping clusters (C 1 , C 2 , . . ., C k ) and roughly have equal size which the cluster head serves. is can be achieved by modeling/assuming the MANETas graph G (V, E), and the edge E represents the communication links between the MNs in the graph. e wireless nodes (routers) are represented by the vertices V. A set of vertices (CHs) is selected optimally based on the fitness value of MNs for cluster heads role. e equation described below can be used to compute the weighting value of a MN: where WFE x is the weighting factor with respect to remaining energy of a MN x and computed as where R.Enr Node i is the residual energy of a MN, n is MNs in MANET (total nodes), and AE x is the average energy of MNs at current. A weight value with respect to energy can be extracted as follows: the value of WFE x will be 1 if the R.Enr x is greater than AE x , its value will negative if the R.Enr x is less than AE x , if both cases are false, the value of AE x will be zero. WFD x is the weight factor w.r.t a MN's inner and outer degrees. e weight value to WFD x can be assigned based on the outer and inner degrees of a MN such as where OD and ID are the outer and inner degrees of MN x, AFD x is the average number of neighbors in MANET. e weight value with respect to MN neighbors can be assigned in the following way: if the degree of a MN x is greater than AFD x , its value will be 1; if the degree of a MN x is less than AFD x , its value will be −1; otherwise, its value will be zero. Correspondingly, the weighting factor/value of MN w.r.t mobility WFRM x can be computed by keeping in mind that 4 Complexity MN has relative mobility or the stationary MNs are ideal nominees for the role of CH. e value of WMob x will be 1 if the relative mobility of a MN x is nearly equal to that of its neighbors; otherwise, its value will be −1. e number of clusters k will be computed prior choosing the cluster headset by the equality below. e value of k is obtained as where the total number of clusters in MANET is k, the total number of MNs in MANET is represented by n, and (OD + ID) x represents the neighbors' information of a MN x. e cluster headset covers nodes as at least three hops away from other CHs. When the weighting values of the whole MANET nodes are computed, the function described in equation (5) will be applied to compute the suitability of cluster headset. e proposal of the memetic algorithm (MA) for the dynamic and optimal clustering in MANET is illustrated in this section. e CH is denoted by chromosome (individual). e cluster headsets are selected at random initially. e cluster headset is optimized using the objective function. e fittest individuals are chosen for the next generation to develop a new solution. e parents for reproduction are selected from the population similar to the classical GA. After the selection of two parents for the new population, the mutation and crossover are applied to generate new offsprings. e new population is improved by applying the local search procedure. In the memetic algorithm, local search is performed to efficiently find the local optimum solution and proceed for global optimum. e algorithm starts its operation by calculating the weights of every node. Nodes with the higher weights are selected for initial population.
e fitness values of the population are calculated. e nodes to become the cluster head are selected. e probability of selection is calculated. e local search is applied. e fitness value of the node to survive in the population is calculated. e process of MA comprises numerous significant modules such as (1) memetic representation, (2) initialization, (3) fitness function (FF) assessment, (4) selection methods, (5) crossover, and (6) mutation. e process of the memetic algorithm to form balanced clusters is shown in Algorithm 1. Table 1 presents notations used in Algorithm 1.

Genetic Representation.
e conventional evolutionary algorithms such as genetic algorithm fail to search several solutions for the problem domain owing to its inherent quality of premature convergence. A memetic algorithm uses a local search to reach its final destination without stopping on local maxima. e first step in the memetic algorithm is encoding the chromosome.

Encoding and Population Initialization.
e set S CHi of nodes are randomly selected from all the networks as cluster heads where i � 1, 2, . . ., k. Each solution of the problem is the set of cluster heads (S Chi ). In this way, the cluster headset can be generated by a random combination of node IDs. And the chromosome can be represented by a random set of cluster head IDs. Repetition of node IDs in a chromosome is strictly prohibited. e gene of a chromosome can be represented by a single node ID. Suppose we have a network of 8 nodes. e IDs of the nodes in the network would be from 1 to 8. In this scenario, the chromosome may be represented by a random permutation 54673128. e next task is to extract a set of cluster heads. Assume that the first gene is added to the cluster headset. en the second ID is also added. e weights of the nodes are calculated by adding the third node to the cluster headset and so on. At each step of adding nodes to the cluster headset, the weights of the node are updated. e node having higher weight is replaced with the node that has lower weight. e discarded node from the cluster headset is no more considered to be a cluster head in the current round. After encoding, the objective function is evaluated for the fitness of the solution. e population is initialized using the following procedure.  MN to perform the role of CH. e following equation can be used to compute AFV y for a node x: Re lWei xy * WF y k , where the clusters in the MANET is k (solution) and Re lWei xy is the relationship weight of MN x and cluster y; when the MN x is allocated to the cluster y (member node), the Re lWei xy will be assigned 1, else its value will be 0. After all the fitness function values are computed, the probability of choice P x for each CH can be computed by where k is equal to total CHs, WF x be the weight value of node y, and local search is applied for optimal CH set in the region of y by using node y (x + 1) � node y (x) + α xy * rz, where α xy is the radius of node x with cluster y and rz is the random variable within the range [−1, 1] to compute the fitness value by using equation (8) above. Moving outside the radius of the target node is not permissible in the new population. e cluster headset is selected based on the fitness/objective function. e neighbor MNs join the nearest cluster heads to form clusters. Once the clusters are formed, various MNs change their state to sleep mode and other nodes wake up from time to time due to limited energy. As a result, the network topology changes periodically. e purpose of this study is finding the set of cluster heads as soon as possible when a topology change occurs.

Selection.
is step is very important for improving the quality of the population. With good selection, high-quality individuals are passed to the next population for reproduction. e chromosome is selected on the basis of its fitness value. e selection method used in this work is the pairwise tournament selection. e selection is performed without replacement. is method of selection is efficient and very simple. e size of the tournament is set to 2. A local search is applied to extract high-quality genes from the population.
3.4. Local Improver. In this step, a local search is applied when the chromosome is evaluated and selected. e weights of the genes in the population are calculated. e genes with higher weights are searched in the population. e population is searched, and the higher weight genes are replaced with low weight genes. Algorithm 2 improves the solution locally.

Crossover and Mutation.
e significant memetic operators are crossover and mutation. e offspring generated from two predecessor chromosomes is known as a crossover. e properties of the new generated chromosome are extracted/inherited from all parts of its parents. For the purpose of this research, the well-known method "x-order1" is used. e offspring generated from only one chromosome by changing one gene is known as mutation. e mutation used in this research is substituting one gene in the chromosome.
3.6. Accepting. After the mutation and crossover, the new chromosomes are placed in the population. e chromosomes with high quality are replaced with low-quality chromosomes.

Replace.
e new generated population is used for the further runs of the algorithm. is process can be explained by using Algorithm 3.

Test.
e algorithm is iterated until the stopping criterion is met. e best solution is returned after the last iteration of the memetic algorithm.

Experimentation and Results
To evaluate the performance of our proposed memeHoc cluster configuration algorithm, several simulation experiments were conducted on Eastnet. In a square simulation area of 1000 m × 1000 m, the mobile nodes (MN) (50-500) are distributed randomly. e simulation parameters were taken from [19]. e speed of the MN varies from 1 km/h to 80 km/h. Each MN is equipped with deaf omnidirectional antennas. e transmission range of each antenna differs in radius from 100 m to 300 m. Each node has an archive (queuing mechanism) for incoming and outgoing packets and keeps information about the mobility of their neighbors. e continuous bit rate was used to generate the origins of the traffic. e threshold used for generating traffic was 20 packets per second. e simulations were run for 50 minutes. e average of 100 simulation runs is represented as graphs. Table 2 shows the parameters used during the simulation as in [19]. (1) Procedure Local Improver (11) end if (12) end for (13) end for (14)

Complexity 7
In Table 2, the first column represents the parameter, and the adjacent column shows the value. ese are kept constant throughout all the experiments. e number of nodes, the transmission interval, and the speed have varied accordingly.
e performance of the memeHoc algorithm is compared with dynamic genetic algorithms for the DLB clustering problem (DGAC) [21] and energy-efficient clustering in MANETs using multiobjective PSO (EMPSO) {control overhead, computation} [20] and a neighborhood stabilitybased mobility prediction algorithm for clustering the MANETs (MobHiD) [cluster lifetime, re-affiliation] [15]. To evaluate memeHoc's performance, the following metrics are taken into account.
Number of clusters: the network is divided into a number of virtual groups called clusters in clusterbased MANETs. In this metric, the number of clusters represents the number of virtual groups obtained after running the cluster formation algorithm. e least number of clusters represents its stability. Problems such as channel access planning, frequency reuse, power consumption, and latency complexity can arise when we increase the number of clusters. Cluster life: it is the period of time that a node is assigned the role of a cluster head (CH). e duration of the cluster represents its stability. Mobility can affect the life span of a cluster when neighbors have a different mobility. A clustering algorithm should select the CHs to increase the duration of the clusters. Affiliation rate: the number of affiliate and disaffiliate nodes as a CH or member during a given time interval represents the affiliate rate. In cluster-based routing, one node joins the nearest CH and leaves the other. A node can reconnect when its CH no longer exists, and another node plays the CH role in the jurisdiction. Reaffiliation can occur when the CH is outside the transmission range of a member node. e duration of a cluster will increase when the reaffiliation rate is low and vice versa. Control message overhead (CMO): exchanges of packets of numbers to keep information about topology changes represent the control overhead. Numerous exchanges of control messages (CMs) occur during the cluster building phase. To measure the CMO metric, the number of CM sent/received per unit of time is counted.

Number of Clusters (NOC).
Numerous experiments have been conducted to calculate the NOC metric when we increase the number of nodes from 50 to 500. e incremental step 50 is used to increase the number of nodes in the individual simulation experiment. e mobility model adopted is RWP. e speed of the MN varies in the range from 1 km/h to 80 km/h, i.e., from 1 km/h to 5 km/h for walking, from 5 km/h to 20 km/h for running, and from 20 km/h to 80 km/h for vehicle movement. Likewise, the transmission range is 100 meters and 200 for different experiments. To measure the NOC metric, the results obtained during the simulation are presented in the form of a graph in Figures 1 and 2. e curves presented in the figure show the number of clusters for networks of different sizes (i.e., 50-500 knots).
e number of clusters increases as the number of nodes increases, as shown in Figure 1. e graph shows that memeHoc forms fewer clusters than MobHiD, DGAC, and EMPSO. In memeHoc, the number of clusters is calculated based on the degree of the node. Average degrees of nodes are calculated to calculate the number of clusters k.
erefore, memeHoc has fewer clusters and the stability of the clusters can be guaranteed even if the degree of the node is taken into account. After memeHoc, DGAC performs well compared to other algorithms, as shown in Figure 1. Analyzing the arcs presented in Figure 1, we see that EMPSO has full performance, plus the number of clusters created by MobHiD is considerably less than EMPSO. ModHiD focuses on cluster stability by predicting future node mobility during cluster formation. EMPSO's attention to optimization and the number of calculations become low. e results show that memeHoc outperforms the leading clustering algorithms in terms of counting clusters. DGAC performs well after memeHoc. To evaluate memeHoc's performance in more detail, a series of simulation experiments are conducted for a different transmission interval, for example, 200 meters. e results of subsequent experiments are illustrated in Figure 2. e curves in Figure 2 show that the radio transmission intervals of the mobile nodes influence the performance of the clustering algorithms. e NOC metric decreases considerably with high transmission intervals. With a large transmission interval, the CH will cover a large 8 Complexity area and the number of member nodes that a CH services will increase; therefore fewer clusters result. e size of the backbone network will decrease when we increase the radio transmission radius of the nodes. All algorithms work the same way as in Figure 1.

Cluster Lifetime.
In this section, we evaluate the effect of node speed on the duration of CH. Nodes with a high mobility ratio can reduce the duration of CH. Emptying 100 nodes in the network performs the simulation. e transmission interval of each node is set to 200 in the first experiment. e nodes move at a speed between 1 km/h and 80 km/h. e movable features are adopted as in [15]. e duration of the CH is calculated in seconds. Figure 3 shows the results obtained during the simulation. As the graph shows, the proposed memeHoc aggregation algorithm selects the CH for a long time. Stable (permanent) brackets are formed using the memeHoc algorithm, as the relative mobility of the nodes and their neighbors are considered during CH selection. As shown in Figure 3, the proposed memeHoc exceeds the performance of DGAC, MobHiD, and EMPSO in terms of screening stability. MobHiD works well after memeHoc because it assumes future mobility of nodes during cluster formation. e behavior of NMs cannot be projected realistically in the long run. In mem-eHoc, group members remain associated with CH for a long time. e relative mobility of MNs is measured during the selection of CHs and MNs with high degree and relative mobility are the ideal candidates to become CHs.
By evaluating the arcs shown in Figure 3, we examine that memeHoc forms stable and sustained groups compared to MobHiD. EMPSO and DGAC select unstable CH. EMPSO is better than DGAC. erefore, DGAC chooses an unstable CH when we increase the speed of MN. Node mobility is not considered during the CH selection process. e radio transmission range of MN was increased to 300 meters in the following experiment, and the results are shown in Figure 4. All other parameters are constant (as in Figure 3). e graph shows that the radio transmission interval of MN significantly influences the performance of all clustered algorithms under consideration, including our proposed memeHoc scheme. More stable ramps are obtained once by increasing the MN communication range. Class and online life can increase. e proposed memeHoc works well when we increase the delivery. With a high transmission interval, the reaffiliation of the nodes decreases and CH will cover a large number of nodes.

Reaffiliation Rate (RR).
A series of simulation experiments were performed to evaluate the performance of the binding rate for the node speed and the radio transmission range. e results are presented in the form of graphs, e.g., Figures 5 and 6. A new join may occur when the MN leaves the current CH and joins another cluster or when the CH moves across a member node's radio transmission interval. NM can no longer communicate with its CH. As the speed of MNs increases, new affiliation is more common when MNs leave their CH more often. e mobility model chosen is a random waypoint, as in Section 4.2.
e nodes move at a speed of 1 km/h to 80 km/h. Several experiments are taken into account as an average of the   results. e average connection rate over 100 different experiments is shown in Figure 5. As shown in the graph, the increase in reconnection rate is shown for memeHoc, MobHiD, DGAC, and EMPSO with an increase in node speed. e performance of memeHoc in arcs is better because they have the lowest RR compared to other weighted schemes. e duration of CHs is long when the memeHoc clustering algorithm is started, and this indicates that rejoining is small because the cluster mechanism is restarted less frequently when stable CHs are selected. at is why, CH is selected based on the residual energy, degree, and relative mobility of the node. erefore, the duration of CHs increases, and member nodes leave the existing cluster less frequently. MobHiD performance is better after memeHoc because MobHiD takes into account future node mobility in the CH selection process. MobHiD performance is better among all the modern clustering algorithms studied, as the selected CH neighbors remain long, and therefore, the probability of reconnection is reduced. e worst performance compared to reconnection is in DGAC compared to MobHiD and EMPSO. Node mobility is not taken into account in DGAC when forming clusters. erefore, unstable clusters may result. e same simulation tests are repeated for a network of different sizes, ranging from 50 MN to 500 MN. e results are shown in Figure 6 as a graph. An incremental phase 50 was used to evaluate the performance of memeHoc in a network with different numbers of NMs. e graph in Figure 6 shows that the reconnection rate decreases as the size of the mobile network becomes large. In a large network, the CH server has many nodes, and topology changes are transmitted less frequently. e simulation area was the same as in the previous experiment. e curve at the bottom of the graph in Figure 6 shows that the reconnection rate decreases in memeHoc as the network size increases in line with other state-of-the-art clustering algorithms. In memeHoc, CH is selected based on relative mobility, the remaining energy and node degree are obtained, and stable clusters are obtained. If we have stable clusters, the reunification rate is low.

Control Message Overhead.
A number of packet exchanges are required during the CHs' selection process in MANET. In this section, the number of messages interchanged throughout the cluster construction and maintenance phase is noted and presented. e performance of memeHoc is compared with MobHiD, EMPSO, and DGAC.
In this series of simulation experiments, 50 MNs are randomly distributed. e simulation area is set to 1000 m × 1000 m. Random mobility of waypoints is accepted in simulation tests. e coverage area of MN radio transmission is set at 200 meters. e nodes move at a speed of 0-5 km/h for walking, 5-20 km/h for running, and 20-80 km/h for a vehicle. e results are shown in a linear graph in Figure 7. e tests were performed for a further 300 m transmission range, and the results are shown in Figure 8. As shown in the graph, the DGAC control is too low when the MNs are moving at low speed, i.e., up to 40 km/h and become high as MNs move faster. e genetic algorithm suffers from local maxima, and unstable clusters can occur when the node speed becomes high. e same   effect can be observed in all other schemes under consideration, including memeHoc, as the clustering procedure is often called for high mobility. Control overload may decrease if the MN radio transmission range is increased. Long transmission distances may consume more power during network operations. Prolonged network life may not be guaranteed if the MN transmission interval is high. Once the optimal CH has been found and the optimization technique has high overall control values, more communication is required, as shown in Figure 7 and 8. EMPSO and MobHiD provide uniform performance when the MN radio beam is 200 meters. If the transmission range is large, EMPSO and MobHiD have minimal environmental control. e mem-eHoc algorithm we offer requires several messages during cluster formation. Metrics such as energy, degree, and relative mobility are taken into account, and accurate calculation can increase the number of control messages. e optimal CH is calculated based on the higher congestion cost, but once the optimal CH is determined, the clustering procedure is called less frequently.

Conclusions and Future Work
In this research, the memetic algorithm is used to solve the cluster formation problem in MANET known as memeHoc. Due to its well-organized local search mechanism, the memetic algorithm forms balance clusters efficiently. A set of solutions (chromosomes) is randomly selected as initial population. A chromosome is a set of possible cluster heads. e population is optimized by using the local search mechanism. e fitness of the population is evaluated using the fitness function. e parents are selected for reproduction if the solution is not optimal. Mutation and crossover are applied for diversity in the population resulting in new population generation. e process continues until the optimal clusters are found. e memeHoc is validated via detail simulation study. e performance is compared with other related protocols such as DGAC, MobHiD, and EMPSO algorithms. e proposed solution gives satisfactory results compared to protocols under consideration. e proposed memeHoc performs well in almost every experiment.
In future, this work can be extended to vehicular ad hoc networks. e good performance with high-speed MANETs gives an indication that it is well suited for vehicular ad hoc network cluster formation. It can also be used in MANETs in a distributed fashion for the same purpose.

Data Availability
e data used to support the findings of this study are included within the article.

Conflicts of Interest
e authors declare no conflicts of interest.