## 6 Numerical Results
### Variable Users  
The first set of results refer to the scenario where the users are changed. In addition, all three different length types of videos were considered. Three type of results were considered for testing the performance of the proposed solutions. In the first one, represented in Figure 2, the average downloading time for the whole videos is represented. It is possible to notice that, as expected, the longer the videos are, the higher the downloading time is. The quality downgrade has, in general, the lowest downloading time, except for the case of a reduced number of users. Despite this seeming a good result, we have to stress  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **Users** & **Fog Nodes** & **Videos** & **Segments** \\ \hline
**Varying Users** & \([2,5,10,20,50,100]\) & 10 & 10 & 10 For Short Videos \\ \hline
**Varying Nodes** & 20 & \(\{3,5,10,15,20\}\) & 10 & 100 For Medium Videos \\ \hline
**Varying Videos** & 20 & 10 & \([5,10,15,20,25]\) & 1000 For Long Videos \\ \hline \hline \end{tabular}
\end{table}
Table 1: Simulation Parameters.  
that in the downgrade condition, we would like to minimize the downloading time at the cost of reducing the quality of the videos requested. It is also interesting to notice that the optimal buffering has a video downloading time that is higher than the marginal gain maximization. Additionally, for this case, as becomes more clear by looking at the following figures, we have to consider that in optimal buffering, we would prefer to respect the buffering constraints and not merely minimize the marginal gain.  
Indeed, by analyzing the probability of not respecting the downloading time constraint, i.e., incurring in a potential under-buffering, as depicted in Figure 3, it is possible to notice that the Optimal buffering allows the outage probability to be reduced as much as possible. As we can notice, once the number of users increases, there is some possibility that the quality downgrade performs better. However, once again, we have to stress that in this case, the quality is reduced, while in all the other cases, the quality is always that requested by the users. Regarding the marginal gain, we can notice that it is able to perform better than the static allocation, while the optimal buffering has better performance.  
As a third result, we show the utility function (Figure 4). In this case, we cannot be surprised. The downgrade reduces the quality requested by the users; hence, the related utility function is lower, while in all the other cases, the quality is not changed and the same result occurs.  
Figure 2: Average video downloading time with variable number of users. (**a**) Short videos. (**b**) Medium videos. (**c**) Long videos.  
Figure 4: Utility function with variable number of users. (**a**) Short videos. (**b**) Medium videos. (**c**) Long videos.  
Figure 3: Outage probability with respect to downloading time constraints with a variable number of users. (**a**) Short videos. (**b**) Medium videos. (**c**) Long videos.  
Figure 6: Outage probability with respect to downloading time constraint with variable number of nodes. (**a**) Short videos. (**b**) Medium videos. (**c**) Long videos.  
Figure 7: Utility function with variable number of nodes. (**a**) Short videos. (**b**) Medium videos. (**c**) Long videos.  
A similar trend can be also seen by analyzing Table 3, where we report the probability of downgraded quality levels. As can be seen, the downgrade events are still significant and are needed for keeping the downloading time low. Additionally, when the number of nodes increases, the downgrade events decrease, gaining from the presence of multiple nodes and hence reducing the probability of requesting segments to the cloud.