## 1 Introduction
Therefore, the main goal of this paper is to propose a new discrete PSO algorithm by adapting the conventional PSO to build the optimal path tree more effectively in MWSNs; (2) Network-wide flooding significantly increased the communication overhead and energy consumption, while choosing the optimal routing result from all nodes greatly increases the computation burden. Thus, the second goal of this paper is to design a more efficient routing strategy; (3) As an evaluation criterion which helps us to periodically update the particles' personal best position _Pbest_ and the swarm's global best position _Gbest_, fitness function is very important, because it directly affects the final results. Good fitness function improves the solution. In order to achieve better network performance, the existing fitness functions focus on maximizing the total remaining energy, and minimizing the total route length, total energy consumption and total communication delay of the candidate routing result. No attempt has considered such a case that the lifetime of a routing path just only depends on the relay node that has least lifetime, rather than the total remaining energy and total energy consumption. Therefore, the third goal of this paper is to give a better fitness function for our new routing protocol. In this paper, we present an efficient routing strategy in which the greedy forwarding mechanism is employed as the underlying routing solution and the unicast local flooding method, rather than network-wide flooding, is adopted to reduce the communication and energy overhead caused by frequent broadcast communications. In our strategy, building routing tree from some source nodes to a mobile sink is formulated as an optimization problem, and the novel GMDPSO algorithm is put forward to solve this optimal problem. The main highlights of the proposed GMDPSO are as follows. First, we give a new fitness function in which we carefully calculated the energy consumption of relay nodes and try to minimize the distance among them to achieve energy conservation. Besides, we also minimize the total communication delay of routing tree. Second, the particle's velocity and position of conventional PSO have been carefully redefined under discrete scenario so as to make them as easy as possible to encode/decode. Third, to effectively reduce the exhaustive global searching space and drive the particles to promising regions, the particle's velocity and position updating principles have been thoroughly reconsidered by taking the advantage of the network topology of the collected candidate relay nodes by sink. Fourth, to avoid being trapped into local optima when building each optimal routing path, a greedy searching strategy specially designed for the particles to adjust their positions is proposed by improving the greedy forwarding mechanism. Fifth, searching history is memorized to accelerate convergence. By employing the provided GMDPSO and new fitness function, our new routing protocol is able to find the optimal routing tree, which well balances energy consumption of the relay nodes, delay and the overall rout tree length. In summary, the contribution of this paper can be listed as follows. * An efficient routing strategy of the MWSNs is designed which is formulated as optimization problem. * A novel greedy discrete PSO with memory (GMDPSO) algorithm, which offers faster global convergence and higher solution quality, is put forward to quickly build the optimal routing tree, which can decrease the control overhead and minimize energy consumption. * Our new routing protocol is realized based on GMDPSO and more accurate new fitness function. * Simulations of the proposed protocol are performed to demonstrate its performance against some of the existing protocols. The rest of the paper is organized as follows. The related work is presented in Section 2. Section 3 states the system model, which includes network model, energy model and fault model, and used terminologies. In Section 4, we present the routing strategy and the flowchart of our protocol.