## 1 Introduction  
Nowadays, WSNs are employed in many applications designed for different purposes such as: environment and habitat monitoring [1; 2], traffic control [3], health care application [4], home automation [5] etc. The main purpose of WSN applications is the event detection in a Region of Interest (RoI), where sensor nodes are deployed to monitor any ongoing events. Besides the sensing function, communication is another major function of a sensor network [6]. Generally, when sensor nodes are spread out, they start to sense the information and forward it to the sink node using multi-hop paths [7], then to the base station (BS), where intelligent decisions can be made. Figure 1 shows the network architecture of a WSN application dedicated to monitor an area.  
WSN deployment is one of the major challenges of WSN research. It affects almost all its performance metrics, such as the connectivity between sensor nodes, the coverage, and the network's lifetime. These factors are the essential criteria to evaluate a WSN's performance in order to choose a WSN design from a number of candidates. Consequently, a considerable amount of research in the field of WSNs is dedicated to address the WSN deployment issue [8; 9]. Generally, deployment can be deterministic, namely pre-determined, or non-deterministic [9]. The pre-determined deployment, where the locations of sensor nodes are specified, is usually used in a friendly environment and when nodes are expensive. When the environment is dangerous and inaccway of deployment is using helicopters or automatic vehicles, as in this case, the deployment is non-deterministic or in other words random [9].  
WSN applications can only operate for a given period of time or as long as possible, due to sensor nodes' limited supply of energy from batteries. Hence, the network lifetime becomes a very important issue [10]. In the phase of deployment, if nodes are too close to each other, coverage overlapping and redundant nodes could occur, which generates unnecessary data transfer and more traffic load, and if the distance between nodes is too large, nodes will consume more energy to distribute data through the network. This constraint deeply affects the energy consumption of nodes. Consequently, it's very important to determine the optimal distance between nodes. Hence, network designers should not only be concerned about the basic requirements, such as the network connectivity and coverage, but also try to improve the network lifetime and reduce the network cost [11].  
The Simulated Annealing (SA) algorithm is a classical meta-heuristic global optimization method inspired by the annealing process of material in metallurgy and is widely used for global optimization problems. Several approaches were developed to improve coverage and connectivity using the SA algorithm [12; 13; 14; 15]. In this article, we propose a hybrid algorithm based on the Gradient method and the SA algorithm to solve the WSN placement problem while defining the optimal number of nodes to deploy, to ensure the required coverage and connectivity in the case of a deterministic deployment, where all sensor nodes positions are well controlled. The main contributions of this paper are as follows:  
* A Hybrid algorithm based on the gradient and the SA algorithm is demonstrated for the sensor deployment problem, with the selection of the minimal number of nodes.
* Simulation results are shown to prove the efficiency of the proposed technique.
* A comparison with other approaches is concluded in order to evaluate the efficiency of the proposed algorithm.  
This paper is organized as follows, in Section 2, we overview some basic concepts of WSN. In Section 3, the related works are discussed. Then in Section 4, we explain how the SA algorithm can optimize the deployment process. A problem description and formulation is presented in Section 5. Finally and before concluding, simulation results using MATLAB are explained and discussed.  
Figure 1: Typical wireless sensor network (WSN) architecture.