Research Article

Efficient Task Offloading for 802.11p-Based Cloud-Aware Mobile Fog Computing System in Vehicular Networks

Algorithm 1

1: For each state , initialize the state-value . Set a small constant , and initialize the number of iterative .
2: For each state , calculate by Bellman optimal equation:
   
3: If for all , go to step 4; otherwise the number of iterative increases, i.e., and go to step 2.
4: For all state , calculate the optimal strategy by