Dynamic resource management and numerical optimization : practical applications in communication networks and finance