## 3 D2D-Based Resource Allocation Algorithms
### Power and Delay Optimization Based Uplink Resource Allocation Algorithm
Figures 6 and 7 display the simulation results regarding total network throughput and total D2D throughput obtained using this D2D creation link method. Consequently, the simulation results confirm that the OP-DMCG exhibits superior performance in terms of throughput and D2D throughput when compared to other algorithms even when varying the search method. Figure 8 illustrates the fairness index, indicating that the OP-DMCG algorithm demonstrates a lower value compared to the GTM+ and DMCG algorithms, and higher values when compared to the PDO-URA algorithm. Figure 4: Fairness index—random search. Figure 5: Delay—random search. Figure 8: Fairness index—closest search. Figure 6: Total throughput—closest search. Figure 7: Total D2D throughput—closest search. Furthermore, Figure 9 shows that when the number of CUEs exceeds 60, the delay of OP-DMCG is lower compared to the other algorithms. ### Radius Search

The last method, namely radius search, generates the positions of CUEs, DRs, and DTs randomly. Subsequently, the method verifies which DRs are located within a 15 m radius of each CUE; a distance value chosen through a comprehensive simulation-based search aimed at optimizing various performance metrics, including throughput, delay, and fairness index. From this group of DRs, one is selected randomly, and a link is established between the chosen DR and the corresponding CUE. Similarly, the links between DRs and DTs are established by checking which DTs are within the 15 m radius of each DR. One of the DTs from this group is randomly selected, and the D2D link is created between the chosen DR and the respective DT. Figures 10 and 11 showcase the simulation results obtained through the utilization of the D2D creation link method. Notably, the search method significantly enhances the outcomes in terms of throughput and device-to-device throughput, surpassing the performance of the preceding methods, namely random search and closest search. Again, the OP-DMCG algorithm demonstrates superior performance in terms of throughput in comparison to the DMCG, GTM+, and PDO-URA algorithms. Figure 10: Total throughput—radius search. Figure 9: Delay—closest search. Figure 12 depicts the fairness index, highlighting that the DMCG and GTM+ algorithms demonstrate the highest values in comparison to other algorithms. Nevertheless, the PDO-URA algorithm exhibits lower fairness index values than OP-DMCG. Furthermore, as illustrated in Figure 13, it can be observed that when the number of CUEs exceeds 70, the delay of OP-DMCG is lower compared to the other algorithms. Figure 11: Total D2D throughput—radius search. Figure 12: Fairness index—radius search. Figure 4:0 Delay—radius search. ## 6 Conclusions

In this work, we analyze, considering some particular algorithms, how the use of resource allocation and power allocation methods can influence the total throughput and the total D2D throughput of a cellular network system using device-to-device communication. In this sense, based on some results and approaches, we also propose a resource and power allocation algorithm whose performance was compared against others from the literature. The simulations conducted highlight the substantial influence of resource and power allocation methods on the overall performance of the system. It is evident from the numerical results that modifying these allocation strategies significantly affects both total system throughput and device-to-device throughput. Our proposed solution, the optimal power allocation and delay minimization based on conflict graph algorithm for device-to-device communications, consistently demonstrates superior performance compared to the greedy throughput maximization plus, delay minimization conflict graph, and power and delay optimization based uplink resource allocation algorithms, as observed through comprehensive analysis of both total system throughput and total device-to-device throughput metrics.