Dynamic Programming With Python

Dynamic Programming With Python

Gurram Sunitha, Arman Abouali, Mohammad Gouse Galety, A. V. Sriharsha
Copyright: © 2023 |Pages: 21
DOI: 10.4018/978-1-6684-7100-5.ch005
OnDemand:
(Individual Chapters)
Available
$37.50
No Current Special Offers
TOTAL SAVINGS: $37.50

Abstract

Algorithms are at the heart of computer programming. They form the basis of all software applications and help to solve complex computational problems. Various problem-solving strategies involve divide and conquer, greedy, recursion, dynamic programming, backtracking, etc. This can be used to solve optimization problems that have overlapping subproblems. It aims to find an optimal solution by breaking down a problem into sub-problems in order to manage the complexity of the problem-solving and remembering their solutions in order to avoid repeating computation time in future steps. Mathematical optimization is a crucial component of dynamic programming, and it allows us to efficiently solve a wide range of problems that involve making decisions over time. This chapter discusses dynamic programming's relevance, mathematical optimization, ability to solve a wide range of issues, important qualities, and top-down and bottom-up problem-solving methodologies. Dynamic programming solves some typical computational problems effectively, and Python code is supplied for reference.
Chapter Preview
Top

Dynamic Programming

Dynamic Programming is an essential algorithmic technique used to solve complex problems efficiently. It is widely used in various fields, such as computer science, operations research, and economics. Dynamic programming can solve optimization problems with overlapping subproblems by breaking them down into smaller subproblems and storing their solutions in a table for later use. This technique helps reduce the time complexity of these problems and makes them easier to solve (Kool et al., 2022). Dynamic programming is beneficial when dealing with issues that depend on previously calculated solutions or where multiple decisions must be made simultaneously (Şenaras, et al., 2021).

“Dynamic Programming” makes sense as dynamic means' changing' and programming means 'the set of instructions to be executed.' This was introduced by “Richard Bellman” in the 1950s, which is a mathematical optimization and a computer programming technique. This has been used in various disciplines, from economics to aeronautical engineering. Let us imagine what happens if a non-optimized code consumes much memory and computing time. Consequently, the processor may need help allocating resources for other services. Most of these problems can be controlled by using dynamic programming (Bertsekas, 2022).

Expressed, this is a technique for resolving complex problems by breaking them down into smaller, more manageable sub-problems and archiving the solutions for use when the smaller sub-problems come up later. The subproblems are computed to find the optimal solution to the complex problem. In brief words, this is an optimization technique over plain recursion.

Complete Chapter List

Search this Book:
Reset