# Natural Computing Applied to the Underground System: A Synergistic Approach for Smart Cities
## 6 Application to the Smart Cities Realm and Potential Results
### Wireless Sensor Networks  
Wireless Sensor Networks consists of spatially distributed autonomous sensors to monitor physical or environmental conditions, such as temperature, sound, vibration, pressure, etc., and to cooperatively pass their data through the network. Researchers of wireless sensor networks face challenges such as communication failures, memory/computational constraints, and limited energy. Many issues in wireless sensor networks could be formulated as multidimensional optimization problems, and approached through bio-inspired techniques. * PSO is a simple, effective, and computationally efficient optimization algorithm. It could be applied to address WSN issues [40] such as optimal deployment, node localization, etc. * ACO is based on ants that are mobile agents that migrate from one node to an adjacent one searching for feasible paths between source and destination nodes [41]. Ant colony solution components correspond to network nodes, and, accordingly, routing tables correspond to pheromone tables in which each pheromone variable holds the estimated goodness of selecting a neighbor to forward a data packet [42; 43]. Routing, Energy and Deployment Using Ant Colony Optimization  
Like all routing algorithms, ant colony algorithms for mobile ad hoc networks, the information related to routing is organized into the so-called routing tables. These tables contain the used information by the algorithm in its forwarding of local decisions. The kind of information contained, as well as the way in which it is used and updated depend solely on the characteristics of the algorithm. The routing table is in turn a local database and a local model of the global state of the network [43]. A local routing, instead of storing the whole network graph, will be more suitable to keep track of the information going to a destination node. The local routing table in every node/mote keeps the following information:  
* A list of neighborhood nodes/motes that have Internet connection or act a sink node, see Table 2. This table is build using a discovery ant that every node will run, when the ant reaches the Internet sink a backward ant will be sent back to the source node that updates the probability and lookup table of nodes. These discovery ants could start at regular time intervals or when a network configuration change happens. * To be able to send back data packets, the MAC address or ID of the source node must be kept in the path of the route to the Internet sink. That is, every node/mote stores the pair:
* the MAC/ID of the source of every transmitted packet (to be able to send data back to the source),
* and the MAC/ID of the connected node/mote of transmitted packet (to send data back). Data packets are sent using the Internet lookup table, according to the probability of the node. When the echo information passes a node and reaches the source, then the probabilities are also updated. \begin{table}
\begin{tabular}{c c} \hline \hline
**Internet Lookup Table** & **Data Packet Information** \\ **(Mote ID: Probability)** & **(Source Mote, Route)** \\ \hline
7:0.9 & \((2,3)\) \\
5:0.6 & \((2,5)\) \\
3:0.3 & \((2,1)\) \\
1:0.4 & \((2,6)\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Sample of a local routing table store in a random sensor. Please note that (Mote ID:Probability) is the routing forward data and (Source Mote, Route) is the routing backward information. The probability of Internet lookup table at node \(i\) that has a radio link with node \(j\) is updated using the following equation:  
\[p_{ij}=\frac{\tau_{j}\alpha_{ij}\beta_{j}}{\sum_{j}\tau_{j}\alpha_{ij}\beta_{j}}, \tag{4}\]  
where \(\tau_{j}\) is the pheromone information updated by backward ants, \(\alpha_{ij}\) is the radio link power between nodes and \(\beta_{j}\) is the node power status. This approach does not consider low power consumption [44; 45] and does not consider memory limitations, this can be solved using a circular table to remove low probabilities.