You are on page 1of 7

PMS TUTORIAL

DYNAMIC PROGRAMMING (LECTURE


WEEK 8)
OUTLINE

Dynamic Programming

Dynamic Programming Stagecoach/Shortest


Knapsack Problem
Solution Approach Route Problem
Introduction to Dynamic Programming

Dynamic programming is a solution approach an not a technique and often uses other techniques
within its overall solution approach.
Basic Definition of
Dynamic Programming
Dynamic programming solution approach, knapsack problem, stagecoach /
Example
shortest route problem

DP is a useful mathematical technique for making a sequence of interrelated


decisions

Introduction It provides a systematic procedure for determining the optimal combination of


decisions

There does not exist a standard mathematical formulation of the DP problem


Dynamic Programming Solution Approach
Explanation Main Steps

Main principle is subdivision of a problem into smaller sub problems referred to as stages
The solution approach encompassed
Consider stages in reverse order so as to be able to observe the last decision (stage 1) in terms of
by dynamic programming is to break
all possible outcomes
down a problem into smaller sub
States are identified at each stage (different levels of resources available at that stage)
problems called stages and then
The best decision is the one that results in the greatest return
solve these stages sequentially. The
States and decisions are then related to the next stage in the solution process through a transition
outcome of a decision/solution at one
function
stage will affect the decision made at
At the last stage, all resources are considered available
the next stage in the sequence.
We select the decisions that triggered the sequence of best decisions with the highest return.

Example Sales return for combinations of


salespeople per region
• The Wood Valley Cosmetics Company has subdivided Return on Each Territory ($ 1,000s) Allocation of salespeople to :
its sales area into three regions : north, east and south
Decision alternatives
• The company has 3 salespeople it wants to allocate to North East South
South = 0 🡪 $ 2,000
Salespeople/Territory
these 3 regions.
0 0 0 2 East = 2 🡪$ 15,000
• The company wants to allocate these salespeople in a
1 7 9 6 North = 1 🡪$ 7,000
manner that will result in maximum dollar sales
• The company will not restrict the number of 2 12 15 10
salespeople that can be assigned to any one region (all 3 20 18 16
Total = $ 24,000
3 salespeople could be assigned to one region)
Knapsack Problem
Explanation

The knapsack problem is a traditional example of dynamic programming that is concerned with how
many of each of several different kinds of item to put in a knapsack in order to maximize the return
from the items.

Example

• Travelers from China who visit the United States and Optimal decision Item :
Europe on a frequent basis (such as athletes, Item Weight (lb) Profit ($)
musicians and dancers) are allowed to return with a Denim jeans = 1 🡪 $ 90
limited number of consumer items not generally Denim jeans 2 90 Radio/tape = 1 🡪 $ 150
available in China.
Tape cassettes = 0 🡪 0
• The items, which are carried in a duffel bag, cannot Radio/tape players 3 150
exceed a weight of 5 pounds.
• Once the travelers is inside the country, the items are Total profit = $ 240
Tape cassettes 1 30
sold on the black market at a highly inflated price.
Stagecoach Problem

Explanation

The stagecoach problem is a problem specially constructed1 to illustrate the features and to
introduce the terminology of dynamic programming. It concerns a mythical fortune seeker in
Missouri who decided to go west to join the gold rush in California during the mid-19th century.
The journey would require traveling by stagecoach through unsettled country where there was
serious danger of attack by marauders.

Optimal Decision

The shortest route is : 1 🡪 4 🡪 5 🡪 7

Minimum time is 43 hours


Thanks!

Any Question?

You might also like