Arithmetic Modelling and Routing Algorithms for an Edge–Fog–Cloud Continuum Structured as a Full k-ary Tree

Pedro J. Roig *

Miguel Hernández University, Elche, Spain and University of the Balearic Islands, Spain.

Salvador Alcaraz

Miguel Hernández University, Elche, Spain.

Katja Gilly

Miguel Hernández University, Elche, Spain.

Cristina Bernad

Miguel Hernández University, Elche, Spain.

Carlos Juiz

University of the Balearic Islands, Spain.

*Author to whom correspondence should be addressed.


Abstract

Remote computing is currently widely deployed in production networks, although its performance could be optimised through an appropriate architectural design. Accordingly, a mathematical model of an edge-fog-cloud hierarchy is presented, where all devices are organised as a full complete k-ary tree. When devices across layers are sequentially indexed, integer division and modular arithmetic can be used to determine the devices and ports involved along the path between a source and a destination end device. Two pseudocode algorithms are proposed, where one considers only a single cloud server, while the other extends the approach to multiple cloud servers. The key properties of both algorithms are simplicity and scalability, highlighting their technical relevance in remote computing architectures. The proposed model may have a practical impact on IoT, edge AI, and network design as it simplifies how packets are forwarded between end devices in remote computing environments.

Keywords: Edge computing, fog computing, cloud computing, arithmetic modelling, full complete k-ary tree, pseudocode


How to Cite

Roig, P. J., Alcaraz, S., Gilly, K., Bernad, C., & Juiz, C. (2026). Arithmetic Modelling and Routing Algorithms for an Edge–Fog–Cloud Continuum Structured as a Full k-ary Tree. Mathematics and Computer Science: Research Updates Vol. 9, 130–153. https://doi.org/10.9734/bpi/mcsru/v9/7259