# DMFO-CD: A Discrete Meth-Flame Optimization Algorithm for Community Detection
## 1 Introduction  
The analysis of complex networks in real-world applications such as social, biological, metabolic, and paper citation networks is receiving more attention from researchers and experts [1, 2]. The structure and function of a real-world network can be studied by graph features such as small-world effect, power-law, or network transitivity [1, 2]. An important issue in most real-world networks is to find the hidden structures. Community detection (CD) identifies these structures of a complex network, and the density of edges inside these structures is higher than their outside. The more similarity between the members of a community has been caused the community detection able to be used as a tool in the analysis of complex networks structure [3]. CD has a significant role in social network analysis, which includes the identification of friendship groups, relationship analysis, identify influential people, detect terrorist attacks, use in link-prediction, or identify classes in COVID-19 datasets [1, 4, 5]. Each network is mathematically represented by a graph consisting of nodes and edges, which the nodes are connected to each other by edges. To detect a community in a complex network, there are different criteria such as betweenness [2], modularity [6], nodesimilarity [7], normalized cut [8], and partition entropy [9]. In addition, some algorithms detect the communities by approximate methods such as label propagation [10], which at first, a label is allocated to each node, and then the labels of some nodes, which are randomly selected, are propagated to other nodes. This method is continued until all nodes have most of their neighbor nodes' labels. In addition, many community detection approaches determine communities by optimizing modularity that has been proposed by [PERSON] in 2004 [11]. In this approach, algorithms attempt to reach the optimal value of the modularity by different methods [5; 12; 13; 14]. Generally, detecting communities with modularity maximization in a network can be considered as an optimization problem [15]. Metaheuristic algorithms are shown to be effective approaches to solve complex problems in a reasonable time when compared with exact methods [16]. A wide variety of metaheuristic algorithms have been introduced such as differential evolution (DE) [17], particle swarm optimization (PSO) [18], cuckoo search (CS) [19], grey wolf optimizer (GWO) [20], salp swarm algorithm (SSA) [21], whale optimization algorithm (WOA) [22], and multi-verse optimizer (MVO) [23]. Due to the arising challenges and complexities in real-world problems, there is still a need to propose new or enhance the existed algorithms [24; 25; 26; 27; 28; 29; 30; 31; 32]. Although these algorithms are well suited for solving problems with continuous search space, some algorithms such as genetic algorithm (GA) [33] and ant colony optimization (ACO) [34] were proposed to solve problems over discrete spaces. In addition, different methods were employed to develop the discrete version of a continuous algorithm [35]. The metaheuristic algorithms are applied for solving complex problems in different applications such as parameter identification of solar cells [36], feature selection [37; 38; 39; 40; 41], scheduling and planning [42; 43; 44], disease diagnosis [45; 46], clustering [47], medical applications [48; 49; 50], industrial applications [51; 52; 53; 54; 55], and engineering optimization [56; 57]. To use metaheuristic algorithms in community detection, each solution must be modeled according to the requirements of CD's problem, such that each solution can be represented to an N-dimensional vector with discrete values. The dimension of such a vector is equal to the number of network nodes and the value of each dimension depends on the type of solution representation that is used. Two representations that are utilized to represent the solution vectors are label-based representation and locus-based adjacency representation (LAR) [14].