## 4 Data Acquisition via V2U Communications
### Data Distribution at Roadside Units Based on Stable Matching of Bipartite Graph
Thus, the preference ranking is probabilistic to be in a weak order, which should be addressed via the stable improvement cycles algorithm. In addition, a priority ranking is a vector of linear orders \(Q=(q_{j}^{z})_{j\in U,L,z\in\{1,2,\ldots,w(j)\}}\) where \(q_{j}^{z}\) is the preference of a storage cell \(R(j,z)\) over all the contents \(\mathcal{C}\). Take a right vertex \(R(j,z)\) as an instance; denote the priority of \(R(j,z)\) over a left vertex \(L(k)\) as \(q(u_{j},c_{k})\). Note that the different storage cells of a roadside unit have the same priority ranking. To compute the priority, an encountering latency factor matrix is formulated as  
\[N=H^{T}\times F. \tag{5}\]  
In \(N=(n_{jk})_{j\in U,k\in\mathcal{C}}\), \(n_{jk}=\sum_{i\in V}h_{ij}f_{ik}\), which implies the total number of passing units before the vehicles obtain \(c_{k}\) from \(u_{j}\). Here, we take the average number of passing units as the priority \(q(u_{j},c_{k})\), indicating the average access latency relevant with the replica of \(c_{k}\) at \(u_{j}\). Thus,  
\[q(u_{j},c_{k})=\left\{ \begin{array}{ccc}\frac{1}{m_{kj}}\cdot \sum_{i\in V}h_{ij}f_{ik}&,&m_{kj}>0;\\ |\mathcal{U}|+1&,&m_{kj}=0.\end{array} \right. \tag{6}\]  
We see that the smaller \(q(u_{j},c_{k})\) is, the shorter latency \(u_{j}\) has to reply to the requests of \(c_{k}\). Hence, in the data acquisition model, a roadside unit \(u_{j}\) gives priority to content \(c_{k}\) with a smaller \(q(u_{j},c_{k})\) to occupy its storage cells. Based on this analysis, sort the contents in an ascending order of \(q(u_{j},c_{k})\), which reflects the priority ranking of the right vertex \(R(j,z)\) over all the contents. In our model DAS, the preference profile of the contents indicates the access ratio, while the priority rankings of the storage cells imply the access latency. Using the Gale-Shapley algorithm, we compute a stable matching of the original bipartite graph, denoted by \(GS=<L,R,ES>\). For each edge linking, a left vertex \(L(k)\) with a right vertex \(R(j,z)\) in \(ES\), the control center allocates a replica of \(c_{k}\) to the \(z\)th storage cell of \(u_{j}\). In this way, a stable replication solution with a tradeoff between the access ratio and the access delay is returned. Note that we do not use \(M\) to calculate \(q(u_{j},c_{k})\) and \(N\) to compute \(p(c_{k},u_{j})\) in that (1) in the Gale-Shapley algorithm, the left vertices have priorities to select matching nodes compared with the right vertices; (2) DAS aims for a high access ratio first and then an access delay as short as possible. An instance is given to clearly demonstrate the above process. In a vehicular network with three vehicular nodes \(\mathcal{V}=\{v_{1},v_{2},v_{3}\}\), three roadside units \(\mathcal{U}=\{u_{1},u_{2},u_{3}\}\) and three pieces of content \(\mathcal{C}=\{c_{1},c_{2},c_{3}\}\), each roadside unit has only one storage cell. Figure 1(a) displays the content request relationships between the contents and the vehicular nodes in \(\tau\) and the encountering relationships between the vehicular nodes and the roadside units in \(\tau+1\). The weight of an edge is the index of a roadside unit in those units which will be met in sequence by a vehicular node. For example, the edge linking \(c_{1}\) and \(v_{3}\) means that \(v_{3}\) requests \(c_{1}\) in \(\tau\), and the weight 3 of the edge linking \(v_{2}\) and \(u_{2}\) means that \(u_{2}\) is the third roadside unit, which \(v_{2}\) will meet in \(\tau+1\). In this instance, the preference profile of contents and the priority rankings of roadside units are listed in Tables 2 and 3, e.g., \(c_{1}\) is indifferent between \(u_{1}\) and \(u_{2}\) and prefers \(u_{3}\) to both of them. Using the Gale-Shapley algorithm, a stable matching is shown in Figure 2b. Tie-breaking is unnecessary because there exists no stable improvement cycle. Therefore, the solution is that \(c_{1}\), \(c_{2}\) and \(c_{3}\) are distributed to \(u_{3}\), \(u_{1}\) and \(u_{2}\), respectively.