Research Article

Randomization-Based Dynamic Programming Offloading Algorithm for Mobile Fog Computing

Algorithm 1

DPOA.
Input: number of tasks N; size of tasks ;
Output: optimal offloading decision set ;
(1) Initialization: initialize the DP table and set the ;
(2) for h=1, 2, …, H do
(3) Generate random offloading decision sets ;
(4) Fill in the DP table according to the rules and calculate the system utility for ;
(5) if (the filled decisions have a common set and not the same as the cells in the previous table) then
(6) Calculate the system utility corresponding to this decision and the original decision, respectively;
(7) Select the decision corresponding to the lower value to replace the original decision;
(8) Renew and ;
(9) else
(10) Execute the following: and ;
(11) ifor () then
(12) Execute the following: and ;