Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Pintu ram
1. PRESENTATION Topic : “DYNAMIC PROGRAMMING”
Prepared By: Pintu Ram
Course: B.Sc.(Hons.)C.S. Sem : 2nd Roll no : 2k17/CS/72
Submitted to : Mr. Ashish Jha
College Of Vocational Studies
2. INDEX
WHAT IS DYNNAMIC PROGRAMMMING
WHAT IS OPTIMIZATION PROBLEM
WHAT IS OPTIMAL SOLUTION
PRICIPLE OF OPTIMALITY
DYNAMIC PROGRAMMING ALGORITHM
ADVANTAGE OF DYNAMIC PROGRAMMING
DISADVANTAGE OF DYNAMIC
PROGRAMMING
EXAMPLE OF DYNAMIC PROGRAMMING
3. WHAT IS DYNAMIC PROGARMMING
DEFINITION:
Dynamic Programming is a general algorithm
design technique for solving a complicated
problem defined by recurrences with overlapping
sub problems.
Invented by : “American mathematician”
“Richard Bellman”
in 1950
4. Dp and dcp
DP:> Dynamic Programming
DCP:> Divide and Conquer Programming
DP likes DCP.
But, Some difference
DCP :applies when sub problems does not overlap.
(repeatedly works)/(top down)
DP :applies when sub problems overlap.
(avoids repeatedly works)(bottom up)
5. Optimization problem
Dynamic Programming is generally applied for
solving optimization problems.
OPTIMIZATION PROBLEM:
Such problems that can have many possible
solutions and each solution has a
value and we wish to find a solution with
optimal value (minimum and maximum).
6. Optimal solution
It is a feasible/suitable/appropriate/right
solution which is our favorable.
Or not a solution but the best solution.
It provides the most beneficial result for the
specified objective problems.
If the objective problem is related to profit then
optimal solution has a maximum value
While if the objective problem is related to the
cost the optimal solution has a minimum value.
7. Principle of optimality
The Dynamic Programming works on a
principle of optimality.
“The principle of optimality states that in an
optimal sequences of decisions/choices, each
sequences must also be optimal.”
8. Dynamic programming algo
or dpa
Steps for designing a DPA:
♠CHRACTERIZE optimal substructure.
♠RECURSIVELY define the. optimal value
♠COMPUTE the optimal value in bottom up.
♠CONSTRUCT an optimal solution.
9. ADVANTAGE OF DYNAMIC PROGRAMMING
Easier to implement.
Require much less computing resources.
Much faster to executer.
Greedy algorithm is used to solve optimization
problems.
10. DISADVANTAGE OF DYNAMIC
PROGRAMMING
It does not always reach to the global solution.
Or,
Even the global solution is not found, most of
the times is lose, and in this case the sub
optimal solution is the best solution.
11. EXAMPLE OF DYNAIMC PROGRAMMING
Multi graph:
A multistage graph is a directed weighted graph
and the vertices are divided into stages such that
the edges are connecting the vertices from one
stage to next stage only. First stage and last stage
have a single vertex to represent the starting
point to sink of a graph.