## 2 Intelligence Artificial (AI)-Based Resource Allocation Algorithms in Dynamic Traffic Scenario  
### State-of-the-Art  
In NFV networks, a network service is composed of a set of Network Functions (NFs) connected in a specific order. As these NFs are implemented as VNFs, the VNF Forwarding Graph (VNF-FG) provides the logical connectivity between them. In other words, a VNF-FG defines the possible sequences of VNFs that the packets traverse between two endpoints, to realize an end-to-end service. The variability of traffic and services required leads to the need to define algorithms for the reconfiguration of cloud and bandwidth resources. The typical variations that could happen are as follows [14]:  
* The instantiation of new Virtual Network Function-Forwarding Graphs (VNF-FG);
* The extension or the reduction of VNF-FGs already instantiated with the addition or the removal of VNFs;* The variation of required bandwidth of the current VNF-FGs. The reconfiguration of NFV networks is based on various techniques of which the most important are those of:  
* Increasing and decreasing the cloud resources (CPU, memory, disk, etc.) assigned to Virtual Network Function Instances (VNFI) that support VNFs; it is possible to apply horizontal and vertical scaling techniques; the former are based on the increase (scaling in) and decrease (scaling out) of the number of Virtual Machines assigned to each VNFI; the latter are based on the increase (scaling up) or decrease (scaling down) of the cloud resources assigned to the single Virtual Machine in which the VNFI are executing the VNFs. * Migrating VNFIs to other servers or even other NFVI-PoPs with the application of the above-mentioned scaling techniques. Reactive reconfiguration procedures are not adequate due to the high time required to reallocate cloud resources [11]. For this reason algorithms based on predictions have recently been proposed. There are two categories of solutions: the first one based on traffic prediction [15], the second one based on the prediction of resources to be allocated [12]. Some state-of-the-art solutions are reported in Table 1. They are compared in terms of prediction type (traffic or resource-based), prediction methodology and loss function characteristic to be minimized. Among the solutions based on traffic prediction, [PERSON] et al. [15] proposes a Deep Learning (DL) framework based on Long/Short Term Memory recurrent neural networks [16] to predict the VNF-FGs requests in an NFV network with NFVI-PoPs interconnected by an Elastic Optical Network; the arrival and hold-on times, the bandwidth, the originating and terminating nodes and the type of the SFCs are predicted. Among the solutions based on the prediction of the resources to be allocated, [PERSON] et al. [17] proposes regressive algorithms for estimating memory and processing consumption in cloud data centers; the proposed solutions are based on Linear Regression [18] and K-Nearest Neighbor Regression (K-NNR) [19] methods that notoriously determine the prediction by minimizing symmetric error functions. Unfortunately, there are random components that are not predictable and that lead to an unavoidable prediction error. Such a mistake leads to higher operational costs. For example, if the predicted traffic is higher than the real traffic, the resources will be over-sized and this will lead to an over-provisioning cost; in the opposite case less resources will be allocated and this will lead to a QoS degradation and to an under-provisioning cost characterized by the compensation due to the user. To our knowledge only in [13] traffic prediction is performed taking into account the over-provisioning and under-provisioning cost. The authors use convolutional neural networks for the prediction, model only the datacenters and consider under-provisioning costs independent of traffic loss.