Improved primal simplex algorithms for shortest path, assignment and minimum cost flow problems