## 3 Network Scenario and Problem Statement
Since several replicas of the same content at different roadside units may respond to the same request, the values of these replicas are not independent. Since the 0-1 knapsack problem is NP-complete, the data distribution problem, which is more complicated than that, is also an NP-complete problem. Therefore, in this paper, we attempt to find a solution in polynomial time, whose ultimate goal is to achieve a high access ratio with acceptable access latency. In order to clearly define the main metrics including the access ratio and delay, we denote the content distribution results by \(D=(d_{kj})_{k\in\mathcal{C},j\in\mathcal{U}}\). If content \(c_{k}\) is distributed to a roadside unit \(u_{j}\), then \(d_{kj}=1\); otherwise, \(d_{kj}=0\). Using the symbols in Table 1, we get that the access ratio is computed by  
\[Z_{AR}=\frac{\sum_{i\in V}\sum_{k\in C}f_{ik}\cdot sgn(\sum_{j\in U}g_{ij}d_{kj })}{\sum_{i\in V}\sum_{k\in C}f_{ik}}, \tag{1}\]  
where \(sgn()\) is a sign function, and specifically \(sgn(x)=1\) when \(x>0\), and \(sgn(x)=0\) when \(x=0\). In addition, the average number of roadside units which vehicles encounter before getting data, indicating the access delay, is computed by  
\[Z_{AD}=\frac{\sum_{i\in V}\sum_{k\in C}f_{ik}\cdot\min_{j\in U}\{h_{ij}|g_{ij} d_{kj}>0\}}{\sum_{i\in V}\sum_{k\in C}f_{ik}\cdot sgn(\sum_{j\in U}g_{ij}d_{kj })}. \tag{2}\] \begin{table}
\begin{tabular}{c c} \hline \hline
**Symbol** & **Description** \\ \hline \(\mathcal{V}\) & Vehicular nodes, \(\mathcal{V}=\{v_{1},v_{2},...,v_{i},...\}\). \\ \(\mathcal{U}\) & Roadside units, \(\mathcal{U}=\{u_{1},u_{2},...,u_{j},...\}\). \\ \(\mathcal{C}\) & Contents, \(\mathcal{C}=\{c_{1},c_{2},...,c_{k\
u},...\}\). \\ \(V\) & Index set of vehicular nodes, \(V=\{1,2,...,|\mathcal{V}|\}\). \\ \(U\) & Index set of roadside units, \(\mathcal{U}=\{1,2,...,|\mathcal{U}|\}\). \\ \(C\) & Index set of contents, \(C=\{1,2,...,|\mathcal{C}|\}\). \\ \(s\) & The size of content or a storage cell. \\ \(w(j)\) & The number of storage cells in \(u_{j}\). \\ \(F\) & Content request matrix, \(F=(f_{ik})_{k\in\mathcal{C}}\). \\ \(G\) & Encountering matrix, \(G=(g_{ij})_{i\in V_{j}\in\mathcal{U}}\). \\ \(H\) & Encountering latency matrix, \(H=(h_{ij})_{i\in V_{j}\in\mathcal{U}}\). \\ \(P\) & Preference profile of contents, \(P=(p_{k})_{k\in\mathcal{C}}\). \\ \(Q\) & Priority ranking of storage cells, \(Q=(q_{j}^{z})_{j\in\mathcal{U},z\in\{1,2,...,w(j)\}}\). \\ \(\tau\) & Current storage cycle. \\ \(\tau+1\) & The next storage cycle. \\ \(c_{k}^{l}\) & The \(l\)th replica of a content \(c_{k}\). \\ \(Fr(c_{k},u_{next})\) & Failure frequency of \(c_{k}\) relevant with the path to \(u_{next}\). \\ \(S(i)\) & The assistant score of \(v_{i}\). \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Symbols. In our scheme, we calculate the preference rankings for contents and roadside units based on the access ratio and the delivery delay, aiming to balance these metrics. Although DAS is based on the aforementioned assumptions, its application scope could be enlarged via simple adjustments--(1) Subject to the popularity, the different contents may have different storage times. For example, a popular video may be stored longer than an unpopular one because more vehicular users would like to download it. Since the content distribution is carried out at each storage cycle, a popular content may be allocated to the same roadside unit in several consecutive storage cycles when its queries continue to exist. In other words, popular content may be stored for more than one storage cycle in DAS; (2) Apparently, different contents may have different sizes. For instance, a video typically has a much larger size than an image. To deal with the variability in size, a preliminary step is used to make the content size equal. Specifically, a content with size \(b\times s\) (\(b\in\mathbb{N}^{+}\)) is separated into \(b\) sub-items, each of which has size \(s\).