  To address the evolving landscape of next-generation mobile networks,
characterized by an increasing number of connected users, surging traffic
demands, and the continuous emergence of new services, a novel communication
paradigm is essential. One promising candidate is the integration of network
slicing and in-network computing, offering resource isolation, deterministic
networking, enhanced resource efficiency, network expansion, and energy
conservation. Although prior research has explored resource allocation within
network slicing, routing, and in-network computing independently, a
comprehensive investigation into their joint approach has been lacking. This
paper tackles the joint problem of network slicing, path selection, and the
allocation of in-network and cloud computing resources, aiming to maximize the
number of accepted users while minimizing energy consumption. First, we
introduce a Mixed-Integer Linear Programming (MILP) formulation of the problem
and analyze its complexity, proving that the problem is NP-hard. Next, a Water
Filling-based Joint Slicing, Routing, and In-Network Computing (WF-JSRIN)
heuristic algorithm is proposed to solve it. Finally, a comparative analysis
was conducted among WF-JSRIN, a random allocation technique, and two optimal
approaches, namely Opt-IN (utilizing in-network computation) and Opt-C (solely
relying on cloud node resources). The results emphasize WF-JSRIN's efficiency
in delivering highly efficient near-optimal solutions with significantly
reduced execution times, solidifying its suitability for practical real-world
applications.
