  Scavenging the idling computation resources at the enormous number of mobile
devices can provide a powerful platform for local mobile cloud computing. The
vision can be realized by peer-to-peer cooperative computing between edge
devices, referred to as co-computing. This paper considers a co-computing
system where a user offloads computation of input-data to a helper. The helper
controls the offloading process for the objective of minimizing the user's
energy consumption based on a predicted helper's CPU-idling profile that
specifies the amount of available computation resource for co-computing.
Consider the scenario that the user has one-shot input-data arrival and the
helper buffers offloaded bits. The problem for energy-efficient co-computing is
formulated as two sub-problems: the slave problem corresponding to adaptive
offloading and the master one to data partitioning. Given a fixed offloaded
data size, the adaptive offloading aims at minimizing the energy consumption
for offloading by controlling the offloading rate under the deadline and buffer
constraints. By deriving the necessary and sufficient conditions for the
optimal solution, we characterize the structure of the optimal policies and
propose algorithms for computing the policies. Furthermore, we show that the
problem of optimal data partitioning for offloading and local computing at the
user is convex, admitting a simple solution using the sub-gradient method.
Last, the developed design approach for co-computing is extended to the
scenario of bursty data arrivals at the user accounting for data causality
constraints. Simulation results verify the effectiveness of the proposed
algorithms.
