  In this paper, we address the optimal control of stochastic matching models
on general graphs and single arrivals having fixed arrival rates, as introduced
in \cite{MaiMoy16}.
  On the `N-shaped' graph, by following the dynamic programming approach of
\cite{BCD19}, we show that a `Threshold'-type policy on the diagonal edge, with
priority to the extreme edges, is optimal for the discounted cost problem and
linear holding costs.
