Finished computing DSI and applying dynamic programming min-cost algorithm