  The evolution of wireless and mobile networks becomes faster and faster, so
the optimal allocation of radio resources is a problem which is imperative.
This development of telecommunication networks is accompanied with an efficient
deployment of wireless networks such Wireless Fidelity and networks mobile as
LongTerm Evolution (LTE). In this paper, we propose an algorithm improving the
global allocation of radio resources within the framework of a heterogeneous
mobile and wireless networks system by using the dynamic programming in
particular the Bellman principle of optimality. We took into account the
mobility of users by using the \textbf{2D model Fluid Flow} to obtain the best
performances which are numerically tested by the Network Simulator 3 (NS3).
