AbstractEdge and fog computing paradigms have recently emerged as promising approaches to overcome latency and network congestion drawbacks of the cloud network architecture alternative. In this direction, the paper deals with an integrated edge‐fog computing system to provide computational offloading capabilities to end‐devices by assuming that each task can be alternatively run locally at the end‐device site, offloaded to a nearby device through a direct communication link (ie, device‐to‐device) or to a more far and computational powerful node, ie, a fog node. In particular, the goal of this paper is to identify a suitable tasks allocation strategy in order to minimize both the system energy consumption and the worst overall task completion time. The related optimization problem is formulated here as a matching game with externalities with incomplete preferences lists between tasks and computation sites due to the fact that each end‐device can reach only a subset of the fog nodes of the integrated computing system. Furthermore, this paper pursuits the stability analysis of the outcome matching, and provides a post matching procedure to reach a stable final matching configuration. Finally, the good behavior of the proposed approach is validated by providing performance comparisons with different alternatives, namely a typical cloud approach architecture, potential game and other matching theory based approaches recently proposed in literature.