Question 7 of 9: Probabilistic Dynamic Programming — The Parking-Space Problem
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Notes on this paper
National Exams — May 2013 — 98-Ind-A1 Operations Research. Three-hour, open-book exam (any non-communicating calculator permitted); the paper totals 180 marks across 9 questions and only 100 marks are required, so a candidate would normally answer a subset — all nine are solved below for completeness.
Reference texts: Hillier & Lieberman, Introduction to Operations Research (11th ed., McGraw-Hill) — linear/integer programming, network optimization, dynamic programming, decision analysis and queueing theory; Niebel & Freivalds, Niebel's Methods, Standards, and Work Design (13th ed.) — job-shop sequencing context.
Question 7: Probabilistic Dynamic Programming — The Parking-Space Problem (20 marks)
Given. Spaces indexed $t=-T,\dots,-1,0,1,\dots,T$ in the order Robert reaches them (see Figure 2), with $t=0$ at the restaurant; $P(\text{space }t\text{ empty})=p_t$, independent across spaces; cost $|t|$ if he parks in space $t$; cost $M$ if he never parks. He observes emptiness only on arrival (no lookahead) and cannot revisit a passed space.
Figure 2 — Parking places in the order Robert encounters them; space 0 is the restaurant, and his walking cost from space $t$ is $|t|$.
Approach. Work backward from the last space $T$. Define the expected cost-to-go before Robert learns whether the current space is empty; at each space he only faces a real choice (park vs. press on) when it turns out to be empty, so the recursion mixes "act optimally if empty" with "forced to continue if occupied."
State. Let the state be the current space index $t$, reached having already skipped every earlier empty space. Define $V(t)$ = Robert's minimum expected remaining cost on arriving at space $t$, before observing whether it is empty.
Boundary condition. If he reaches and skips the last space $T$, he ends up with no space at all: $V(T+1)=M$.
Bellman recursion. With probability $p_t$ space $t$ is empty, and Robert then chooses the cheaper of parking now (cost $|t|$) or continuing (expected cost $V(t+1)$); with probability $1-p_t$ it is occupied and he is forced onward, incurring $V(t+1)$:
$$\boxed{V(t)=p_t\min\big[\,|t|,\,V(t+1)\,\big] + (1-p_t)\,V(t+1)},\qquad t=T,T-1,\dots,-T.$$
Solve backward. Compute $V(T),V(T-1),\dots,V(-T)$ in that order using the recursion (each step needs only the already-computed $V(t+1)$); $V(-T)$ is Robert's overall minimum expected cost for the whole approach.
Optimal policy — a threshold rule. At each space $t$, the recursion shows the optimal action when empty is: park if $|t|\le V(t+1)$, otherwise continue. Because $|t|$ decreases monotonically as $t\to0^-$ then increases for $t>0$, while $V(t+1)$ is non-increasing as $t$ approaches the restaurant (later stages have progressively better options), the optimal policy reduces to: skip empty spaces while still far from the restaurant, and start accepting the first empty space once $|t|$ drops to (or below) the expected cost of continuing — a critical-distance ("accept once close enough") rule, exactly analogous to the classical secretary/optimal-stopping structure.
Element
Result
State
current space index $t$ (on arrival, before observing occupancy)
Recursion
$V(t)=p_t\min[\,|t|,V(t+1)\,]+(1-p_t)V(t+1)$
Boundary
$V(T+1)=M$
Optimal policy
park at the first empty space with $|t|\le V(t+1)$; a threshold/critical-distance rule