*3.6. Complexity Analysis*

The main calculation method of the gradient method is to calculate the objective function, *L*, and its gradient according to the variables. The computational complexity of the objective function, *L*, is *<sup>O</sup>*(*ρMl* + *ρMvl* + *ρRl*), where *ρM* is the number of non-zero terms in the matrix, *M*, and *v* is the average number of nodes that have a social relationship with the node. Since there are not many users in a region who have a social relationship value with a user, this indicates that the value of *v* is relatively small. The computational complexities for the gradients, *∂L ∂Ni* , *∂L ∂Xj* , and *∂L ∂Yk* , in Equation (25) are *<sup>O</sup>*(*ρMsl* + *ρMsvl* + *ρRl*), *<sup>O</sup>*(*ρMl* + *ρMvl*) and *<sup>O</sup>*(*ρRl*), respectively. Among them, *s* is the average number of devices with social relationships that are close to one device, *ρR* is the number of non-zero terms in the matrix, *R*. Actually, in a complex social network, the value of *s* is approximately equal to the value of *v*. Therefore, the total computational complexity of an iteration is *<sup>O</sup>*(*ρMsl* + *ρMsvl* + *ρRl*), which indicates the calculation time of our method is linear with the amount of information collected by the node. If the obtained matrices are all sparse matrices, the algorithm will execute rapidly with a time complexity of *<sup>O</sup>*(*n*). It also applies when the number of nodes is large. However, if the obtained matrix is a dense matrix, the complexity in the communication range of big data with dense nodes and complex relations is difficult to estimate. Since the complexity of the CAOP, SSIS, and SIaOR algorithms are both *<sup>O</sup>*(*n*<sup>2</sup>), the complexity analysis shows that the proposed method is simpler than them.
