The main objective of this research is to conduct some applications of dynamic programming in the Iraqi economy in order to determine the optimal solution, such as distributing investments among some economic sectors or finding the shortest distance between provinces using the Bellman-Ford algorithm. This includes providing some hypothetical examples of other dynamic programming methods such as the traveling salesman problem or the captain's ship model, as it is sometimes called. Dynamic programming revolves around cost reduction and maximizing returns, also known as optimality. Practical studies have been conducted on the shortest distance between provinces of Middle Euphrates in Iraq, in addition to applying the knapsack method to maximize returns in some economic sectors in Iraq for the year 2007.