Advanced Operations Management (33:623:400) 
Professor Eckstein
An Airline Booking Dynamic Programming Problem

An airline flight will depart 5 days from now, and 20 seats on it are still unsold.  The airline has two published fares for the route, a $169 discounted fare, and a $499 full fare.  Neither fare is refundable changeable; also, assume that the airline will not sell more seats than are on the aircraft.  The airline predicts that the number of booking inquiries it will receive each day until departure from passengers willing to pay the full fare is a Poisson random variable with mean 2.5.  Each day, it estimates the number of booking inquiries from passengers willing to pay only the discount fare is a Poisson random variable with a mean of 5.  Assume that all these Poisson random variables are independent.  (Note: in a more detailed, realistic model, the mean values for each fare class would vary with the number of days from departure, there might be dependencies between the variables, and the airline might overbook the aircraft in the hope that some passengers might not show up).

At the beginning of each day, the airline decides how many seats to "release" to be sold at the discount fare.  The remaining unsold seats are held for sale to full fare passengers, or for possible later release.  Passengers willing to pay full fare will buy discount fare seats if any are available.

Write a computer program that uses dynamic program to determine the optimal number of seats to release for discount sale on each day before departure, as a function of the number of remaining unsold seats on the aircraft.