# Writing expressions, Markov Models

## Homework Statement

Through donations the food bank tries to feed as many people as possible. Assume there are no backorders - any unsatisfied demand is lost. The food bank also has limited facilities to store donations, 200,000lbs maximum can be held in storage. Assume donations are processed separately, and added to the supply at the beginning of each week.

The amount of food donated is represented by: ps(s) = .4 for s = 1, & = .6 for s = 2

The amount of food demand is represented by: pd(d) = .3 for d = 1, & = .7 for d = 2

Develop a model to analyze the current state of the Food Bank. Assume a Markov model is desired where the state of the system is defined to be the amount of food in the food bank at the end of the week. Let Xn = the amount of food available at the end of week n.

a. Write an expression for Xn+1
b. Find the transition probability matrix for the current situation

## The Attempt at a Solution

a. Write an expression for Xn+1

I am not sure how to write the expression and keep it bounded without using inequalities. Does that matter?

For the expression I have Xn+1 = Xn + Sn - dn

But, I need to bound this between 0 and 2 because it cannot go negative and it cannot store more than 200K-lbs. I think it is something like Max(Xn + Sn - dn, 0) but I don't know how to account for the upper bound.

b. Find the transition probability matrix for the current situation

I am pretty positive I have this one right. I worked out the sample space and probabilities for everything that could happen given we start with Xn = 0, 1 and 2 and came up with:

.82 .18 .00
.28 .54 .18
.00 .28 .72

Thank you all for any help you can give!

Last edited:

Ray Vickson
Science Advisor
Homework Helper
Dearly Missed

## Homework Statement

Through donations the food bank tries to feed as many people as possible. Assume there are no backorders - any unsatisfied demand is lost. The food bank also has limited facilities to store donations, 200,000lbs maximum can be held in storage. Assume donations are processed separately, and added to the supply at the beginning of each week.

The amount of food donated is represented by: ps(s) = .4 for s = 1, & = .6 for s = 2

The amount of food demand is represented by: pd(d) = .3 for d = 1, & = .7 for d = 2

Develop a model to analyze the current state of the Food Bank. Assume a Markov model is desired where the state of the system is defined to be the amount of food in the food bank at the end of the week. Let Xn = the amount of food available at the end of week n.

a. Write an expression for Xn+1
b. Find the transition probability matrix for the current situation

## The Attempt at a Solution

a. Write an expression for Xn+1

I am not sure how to write the expression and keep it bounded without using inequalities. Does that matter?

For the expression I have Xn+1 = Xn + Sn - dn

But, I need to bound this between 0 and 2 because it cannot go negative and it cannot store more than 200K-lbs. I think it is something like Max(Xn + Sn - dn, 0) but I don't know how to account for the upper bound.

b. Find the transition probability matrix for the current situation

I am pretty positive I have this one right. I worked out the sample space and probabilities for everything that could happen given we start with Xn = 0, 1 and 2 and came up with:

.82 .18 .00
.28 .54 .18
.00 .28 .72

Thank you all for any help you can give!

I don't see how you get the second row. If X0 = 1, we have X1 = 0 if S = 1 or 2 (so start the week with 2 in stock) and D = 2; and we have X1 = 1 if S = 1 or 2 and D = 1. (Presumably, extra supply is discarded if it would take stock over 2.)

Yeah, I just figured that out. My matrix was wrong because I was letting supply go greater than 2.

My expression should have been: Max( Min(Xn + Sn, 2) - dn, 0)

and my matrix should have been:

.82 .18 .00
.70 .30 .00
.70 .30 .00

This should be right, now.

Thanks again Mr. Vickson for the help.