TITLE: Do I need foci to calculate an ellipse?
QUESTION [0 upvotes]: I have been trying to find an answer, but where I look does not tell me why I need foci if I have all $4$ vertices and the center. If I am just trying to create an ellipse with the $4$ vertices and center, can I just plug the numbers into the equation of an ellipse without worrying about the foci? I am trying to understand how the foci come into play, as they don't appear in the actual equation of an ellipse. However, I want my ellipse to be correct. I am trying to take a circle, and scale the y axis only, elongating the circle to create the ellipse that still passes through the $4$ points, $2$ now scaled. It is a vertical ellipse. Tia!

REPLY [1 votes]: You have $2a,2b$ from the given points. If you want to calculate an ellipse from relation
$$ \frac{x^2}{a^2} + \frac{y^2}{b^2}=1 $$
which has axes parallel to coordinate axes that is taken implied for your exercise, you can use
$$ y= b \sqrt{1-x^2/a^2} $$
to find $y$ for each $x.$
(Foci location, latus rectum, eccentricity) are related parameters that is not required for above calculation).


TITLE: Function minimum and Fourier series.
QUESTION [1 upvotes]: I'm preparing for my calculus exam.And I have one examle in my textbook that put me in a deadlock.

Suppose $f(x)$- piecewise continuous function on $[a,b]\in
> \mathbb{R}$, $\{\phi_k(x)\}$ is orthogonal system of functions in
  space of piecewise continuous functions. Suppose that $f_k$-Fourier
  coefficients of function $f(x)$. What is the minimum value of function
  $$F(C_1,C_2,...,C_n)=\int_a^b\left(f(x)-\sum_{k=1}^nC_k\phi_k\right)^2dx.$$ And for what values of the argument, it is achieved?

I know a theorem about the extremal property of the Fourier series.

If Fourier series $\sum_kx^ke_k$ of vector $x\in X$ converges to vector $x_l\in X$, then $\forall y=\sum_{k=1}^\infty\alpha_ke_k$ we have
  $$||x-x_l||\leq||x-y||,$$ with equality when $y=x_l$

So, as I understand it, the minimum is achieved when $C_k$ equal to Fourier
coefficients of function $f(x)$, but I don't understand what is the minimum value of function $F$.

REPLY [1 votes]: The minimum value is achieved when
$$ C_k = \frac{\int_a^b dx \: f(x) \phi_k{(x)}}{\int_a^b dx \: \phi_k{(x)}^2} $$
assuming that you are dealing with a real orthogonal basis set of functions $\phi_k$.  The denominator is 1 when the set is orthonormal.


TITLE: "Theory" question on system of first order linear equations, help?
QUESTION [2 upvotes]: If $x_1 =y$ and $x_2 = y'$
then the second order equation
$$y'' + p(t)y' + q(t)y =0$$ corresponds to the system $x_1'=x_2$ and $x_2' = -q(t)x_1 -p(t)x_2$.
Show that if $x^{(1)}$ and $x^{(2)}$ are a fundamental set of solutions of Eq: $x_2'=-q(t)x_1 -p(t)x_2$. (this is the same equation as above) and if $y^{(1)}$ and $y^{(2)}$ are a fundamental set of solutions of eq: $y''+ p(t)y' +q(t)y =0$ then $W[y^{(1)} , y^{(2)}] = cW[x^{(1)} , x^{(2)}]$ where $c$ is a nonzero constant.
Hint: $y^{(1)} (t)$ and $y^{(2)} (t)$ must be linear combinations of $x_{11}(t)$ and $x_{12}(t)$

REPLY [1 votes]: Since $x_1=y$ and $x_2=y'\implies x_2'=y''$, then
\begin{align}
x_2'&=-qx_1-px_2\tag{1}\\
x_2'+qx_1+px_2&=0\\
y''+qy+py'&=0\\
y''+py'+qy&=0\tag{2}.
\end{align}
The superscript notation is hideous to type, so allow me to rename some things. The result you need is:

If $\{f,g\}$ forms a fundamental solution set (FSS) of $(1)$ and $\{y_1,y_2\}$ forms a FSS of $(2)$, then $W[f,g]=cW[y_1,y_2]$, for $c\not=0$.

To see this, since the FSS are for equivalent DEs, we can write
$$
f=c_1y_1+c_2y_2, \quad g=d_1y_1+d_2y_2, \quad\text{ for some }c_i,d_i.
$$
Thus,
\begin{align*}
W[f,g]&=fg'-gf'\\
&=(c_1y_1+c_2y_2)(d_1y_1+d_2y_2)'-(d_1y_1+d_2y_2)(c_1y_1+c_2y_2)'\\
&\vdots\\
&=(c_1d_2-c_2d_1)y_1y_2'+(c_2d_1-c_1d_2)y_2y_1'\\
&=[c_1d_2-c_2d_1](y_1y_2'-y_2y_1')\\
&=c\cdot W[y_1,y_2],
\end{align*}
with $$c=c_1d_2-c_2d_1.$$
Note that $c\not=0$ since otherwise we get $W[f,g]=0$, but we know $\{f,g\}$ is a FSS, so the Wronskian of $f$ and $g$ does not vanish.


text:
\begin{document}

\RUNAUTHOR{Sasanuma, Delasay, Pitocco, Scheller-Wolf and Sexton}

\RUNTITLE{Marginal Analysis of Perishable Inventory Models}

\TITLE{Marginal Analysis of Perishable Inventory Models Using the Externality Principle}
\ARTICLEAUTHORS{
\AUTHOR{Katsunobu Sasanuma,$^{\bold{a}}$ Mohammad Delasay,$^{\bold{a}}$ Christine Pitocco,$^{\bold{a}}$ Alan Scheller-Wolf,$^{\bold{b}}$\\ Thomas Sexton$^{\bold{a}}$}
\AFF{$^{\bold{a}}$College of Business, Stony Brook University, State University of New York, Stony Brook NY 11794\\
$^{\bold{b}}$Tepper School of Business, Carnegie Mellon University, Pittsburgh PA 15213}

}

\iffalse
\ABSTRACT{
\textbf{}

}
\fi
\ABSTRACT{The exact analysis of optimal ordering policies for periodic-review perishable inventory systems is challenging because of their high-dimensional state space arising from multiple interrelated ordering decisions over many periods and age distributions of on-hand products. We develop a new marginal analysis framework to approximate this complex multiple-decision model into a single-decision model with an \emph{externality} term, which internalizes the long-term impact of ordering decisions. Our externality-based approximation utilizes a constant base-stock policy; it is fast and easy to apply. Numerical experiments show that our approach provides state-dependent ordering amounts almost identical to the optimal dynamic programming-based policy.}

\KEYWORDS{marginal analysis; perishable inventory; periodic review; externality; dimensional-reduction approximation; constant base-stock policy}

\maketitle

\section{Introduction}
The exact analysis of optimal ordering policies for periodic-review perishable inventory systems is challenging. Due to their interrelated ordering decisions over arbitrarily many periods and the different age distributions of on-hand products, their exact analysis requires a computationally expensive dynamic programming (DP) based approach in a high-dimensional state space. To overcome this challenge, we develop a new marginal analysis framework that utilizes the fundamental economic concept of \emph{externality} \citep{vickrey1969congestion}. Our framework approximates a model that involves interrelated periodic ordering decisions over an infinite horizon by a single-decision model that encapsulates the complexities of all interrelated ordering decisions in an externality term. The resulting single-decision model internalizes the impact of all ordering decisions and involves only a single ordering decision for a given initial inventory level; thus the model is easy to solve, for example, in a spreadsheet.

To explain our externality-based approximation and demonstrate how it works, we choose a perishable inventory model that was first studied in \cite{nahmias1973optimal} (referred to as the \emph{Nahmias model}), for which the DP solution is available \citep{nahmias1975optimal, fries1975optimal}. The Nahmias model is a periodic-review lost sales model with a single product and zero lead time. For this model we approximate the externality term using the constant base-stock (CBS) policy. Our approximation provides a near-optimal ordering policy with an average cost within 0.34\% of the optimal DP policy for all cases that we investigate. Note that although we use the CBS policy to approximate the externality term, our method provides a state-dependent (initial inventory level-dependent) policy like the DP policy; in fact, the individual state-dependent order amounts obtained from our approximation closely match those of the DP policy. We believe that the concept of approximating hard-to-solve and computationally expensive DP problems using the externality concept will prove to have broad applicability.

In the sections below, we review related literature (\S1.1) and develop our marginal analysis framework that incorporates the externality effect (\S2). We then apply our method to the Nahmias model, derive an approximate optimal policy, and evaluate the accuracy through numerical experiments (\S3).  Finally, we summarize our findings (\S4).

\subsection{Related Literature}
Perishable inventory systems are difficult to analyze; thus many researchers have sought effective heuristic methods \citep[for comprehensive reviews, see, e.g.,][]{baron2011managing, karaesmen2011managing, nahmias2011perishable}. Among many such methods, the simplest and most popular policy is CBS: It provides asymptotically optimal results in some cases despite its simplicity. Many revised methods based on the CBS policy have also been proposed. For example, \cite{nandakumar1993near} use the weighted average of the upper and lower bounds of the order-up-to level, \citet{nahmias1977higher} develops a heuristic method that considers age distribution, and \citet{haijema2007blood} propose double order-up-to levels for ``young'' inventory and total inventory. For more general state-dependent ordering policies, two important approaches have received increased attention in recent literature: $L^\natural$-convexity and the marginal cost accounting scheme. $L^\natural$-convexity is an extension of convex analysis introduced by \citet{murota1998discrete}, which is further applied to solve perishable inventory models \citep[see, e.g.,][]{zipkin2008structure, huh2010optimal, chen2014coordinating}. The marginal cost accounting scheme utilizes a cost balancing technique between the expected costs of over and under ordering. This new approach has inspired a variety of cost-balancing techniques \citep[see, e.g.,][]{levi20082, truong2014approximation, chao2015approximation, zhang20162, zhang2016approximation, chao2018approximation}. These two approaches are effective when analyzing the cost structure of optimal policies and evaluating the theoretical gap between the costs of the approximate policy and the true optimal policy. For more complicated perishable inventory models with multiple demand classes that require products of different ages, \cite{abouee2019managing} show that the optimal cost function is multimodular ($L^\natural$-convex) and derive the optimal joint ordering, allocation, and disposal policies.

In comparison, our approach focuses on the development of a simple, efficient approximation algorithm to reduce the dimensionality of perishable inventory models and find simple ordering policies that perform well. We do so by capturing (if they exist) meaningful low-dimensional properties hidden in models with a high-dimensional state space. While the investigation of the exact optimal cost structure is out of scope, our method gives analytical intuition into well-performing state-dependent policies when the average cost is convex in the base-stock level, such as in the case of the Nahmias model.

Our approximation bears close resemblance to three existing approximations. First, our method has the same spirit as mean-field theory \citep[MFT; see, e.g.,][]{bruus2004many}, one of the simplest and most commonly used approximation when solving high-dimensional physics and probability models for which exact computations are infeasible. The key idea of MFT is to average out the interaction of many bodies, find an average (effective) interaction, and solve a single body problem with this average term. The validity of MFT has been confirmed numerous times; its success is due to the fact that the \emph{average} plays a dominant role when there exist many interactions, whose randomnesses cancel out as the dimensionality grows. Another related technique is congestion pricing \citep{vickrey1969congestion}, which is a fee imposed on each driver to optimize the total traffic flow. The key idea, which we also use in our approximation, is to make the fee equal to the marginal external cost (MEC). The congestion pricing scheme has been applied to many other transportation problems, including airport runway capacity \citep{carlin1970marginal}, airline route selection \citep{odoni2001congestion}, and on-street parking \citep{larson2010}. Finally, density-functional theory \citep[DFT;][]{kohn1965self} for electronic systems converts a many-body total energy function into a one-body energy function with a single exchange-correlation term that incorporate all the interactions. The key idea---to reduce the dimensionality of the original many-body model by averaging out the entire interrelated interactions---is the same idea as we use in our approach. The key technique used in DFT is the variational principle \citep{parr1989density} applied to a functional of electronic density representing the total energy, whereas the same principle is applied to a functional of an ordering policy representing the total cost in our method. Despite its drastic simplification of equations, DFT is by far the most successful approximation method when analyzing complex electronic structures of materials.

Of course in general such simple dimensional-reduction approaches, including ours of using the ``average'' (i.e., CBS) policy to approximate the externality, may fail. Nevertheless, we believe our work is an important initial step to finding well-performing policies for inventory models whose exact analysis is very complex or infeasible due to high dimensionality. Many successful applications of methods similar to our approach based on a general idea of dimensionality reduction supports our belief.

\section{General Formulation}
We consider an inventory system with a single product that has a fixed lifetime. In each period we first review the initial inventory (remaining inventory from the previous periods), make a new order and receive it (with zero lead time), fulfill any demand, and discard perished products. Our objective is to determine the ordering policy that minimizes the infinite horizon average periodic operational cost of such systems, given that a stationary distribution for initial inventory exists under the ordering policies we consider. (If, for example, periodic random demands depend on initial inventory, limiting and stationary distributions may not exist; we do not consider such cases.)

\subsection{Average Cost}
Assume our model has reached stationarity under a given policy. Let $m(\ge 1)$ be the number of periods of product lifetime, and $x_i$ be the number of units with $i$ ($1 \leq i \leq m$) remaining periods of the life at the beginning of each period. Using this notation, \emph{initial inventory} and \emph{order amount} are represented by $x_1, \dots, x_{m-1}$ and $x_m$, respectively. For ease of representation, we define $x^i=\sum_{j=1}^{i} x_j$ as inventory with remaining life of at most $i$ periods, and $x=x^{m-1}$ as the total initial inventory. Similarly, we define a vector $\mathbf{x}^i=(x_1,...,x_i)$ as the inventory vector with remaining life of at most $i$ periods, and $\mathbf{x}=\mathbf{x}^{m-1}$ as the total initial inventory vector. For notational convenience, we define $x^0=\mathbf{x^0}=0$. Let $\Omega=\mathbb{R}_{\geq0}^{m-1}$, a set of non-negative real numbers in an $(m-1)$-dimensional vector space, then $\mathbf{x} \in \Omega, \forall \mathbf{x}$.

Our ordering policy is characterized by the order-up-to level $q(\mathbf{x})$, which is a scalar valued function of the initial inventory vector $\mathbf{x}$. With a slight abuse of notation, we denote $q$ to represent either the order-up-to level $q(\mathbf{x})$ for a particular $\mathbf{x}$ or the policy $q(\cdot)$, a function of $\mathbf{x}$, distinguishing between the two when necessary. When implementing the policy $q$, the order amount at the beginning of each period becomes $x_m=\max\{q(\mathbf{x})-x,0\}$, or simply $x_m=[q-x]^+$.

Under the stationarity assumption, we can define each period's initial inventory $\mathbf{X}$ as a non-negative \emph{random vector} following a stationary distribution $f_{\mathbf{X}}^q(\cdot)$ given the policy $q$. If $\mathbf{X}$ is a mixture of continuous and discrete random vectors, we should use either the Dirac delta function or probability mass function to represent the distribution. However, we omit this discussion since the analysis is essentially the same.

Let $L(q, \mathbf{x})$ be the one-period operational cost associated with the single ordering decision $q$ when initial inventory $\mathbf{x}$ is observed at the beginning of the period. We can define the average operational cost of the stationary model as
\begin{align*}
L(q) = \mathbb{E}_{\mathbf{X}}[L(q,\mathbf{X})]= \int_\Omega L(q(\mathbf{k}),\mathbf{k}) f_{\mathbf{X}}^q(\mathbf{k})d\mathbf{k}.

\end{align*}
In this equation, only a recurrent initial inventory $\mathbf{k}$ (satisfying $f_{\mathbf{X}}^q(\mathbf{k})>0$) contributes to $L(q)$; a transient $\mathbf{k}$ (satisfying $f_{\mathbf{X}}^q(\mathbf{k})=0$) does not. For this reason, it suffices for our cost minimization analysis to only consider recurrent initial inventory cases. Finally, we assume $L(q)$ is convex, which is true for the specific model we discuss in \S3. (Note: Our model has a similar cost structure to \cite{nahmias1975optimal}, where the $n$-period value function of the model is proved to be convex. Since the limit of a sequence of convex functions is convex as the number of periods approaches infinity and the discount rate approaches 1, the long-run \emph{time average} cost function is convex, implying, due to ergodicity, that $L(q)$ is also convex in $q(\mathbf{x})$.)

\subsection{Optimality Condition}
The average cost $L(q)$ is a functional of the policy $q=q(\mathbf{x}), \forall \mathbf{x} \in \Omega$, and is convex with respect to $q(\mathbf{x})$ for any given $\mathbf{x}$. Now let $q^\ast=\argmin L(q)$. Since $L(q)$ is convex, an inventory policy with the order amount $x_m=[q^\ast-x]^+$ should minimize $L(q)$ under the constraint $q(\mathbf{x}) \ge x$. Hence, it suffices for our purpose to find the (unconstrained) minimizer $q^{\ast}$ of $L(q)$, which satisfies the optimal functional derivative condition: $\delta L(q)/\delta q(\mathbf{x}) = 0, \forall \mathbf{x} \in \Omega$. Therefore, the optimality condition for the stationary model becomes

\begin{align}
\dfrac{\delta L(q)}{\delta q(\mathbf{x})}&= \int_\Omega \left[ \dfrac{\partial L(q(\mathbf{k}),\mathbf{k})}{\partial q(\mathbf{k})} \dfrac{\delta q(\mathbf{k})}{\delta q(\mathbf{x})} f_{\mathbf{X}}^{q}(\mathbf{k}) + L(q(\mathbf{k}),\mathbf{k})\dfrac{\partial f_{\mathbf{X}}^q(\mathbf{k})}{\partial q(\mathbf{x})}\right]d\mathbf{k}\nonumber \\
&= \int_\Omega \left[ \dfrac{\partial L(q(\mathbf{k}),\mathbf{k})}{\partial q(\mathbf{k})} \delta (\mathbf{k}-\mathbf{x}) f_{\mathbf{X}}^{q}(\mathbf{k}) + L(q(\mathbf{k}),\mathbf{k})\dfrac{\partial f_{\mathbf{X}}^q(\mathbf{k})}{\partial q(\mathbf{x})}\right]d\mathbf{k}\nonumber \\
&= \int_\Omega \dfrac{\partial L(q(\mathbf{k}),\mathbf{k})}{\partial q(\mathbf{k})} f_{\mathbf{X}}^{q}(\mathbf{k}) \delta (\mathbf{k}-\mathbf{x}) d\mathbf{k} + \int_\Omega  L(q(\mathbf{k}),\mathbf{k})\dfrac{\partial f_{\mathbf{X}}^q(\mathbf{k})}{\partial q(\mathbf{x})} d\mathbf{k}\nonumber \\
&=\dfrac{\partial L(q(\mathbf{x}),\mathbf{x})}{\partial q(\mathbf{x})} f_{\mathbf{X}}^{q}(\mathbf{x})+ \int_\Omega L(q(\mathbf{k}),\mathbf{k})\dfrac{\partial f_{\mathbf{X}}^q(\mathbf{k})}{\partial q(\mathbf{x})}d\mathbf{k} = 0, \quad \forall \mathbf{x} \in \Omega,
\label{eq:stationary optimality condition}
\end{align}
where we apply \emph{chain rule} first and then \emph{product rule} of the functional derivative \citep[][Appendix A]{parr1989density} to obtain the first line, replace ${\delta q(\mathbf{k})}/{\delta q(\mathbf{x})}$ with the Dirac delta function $\delta(\mathbf{k}-\mathbf{x})$ to obtain the second line, and apply its sifting property \citep[$g(\mathbf{x})=\int_\Omega g(\mathbf{k}) \delta(\mathbf{k}-\mathbf{x})d\mathbf{k}$ for every continuous function $g(\cdot)$;][]{bracewell1986fourier} to obtain the fourth line. Essentially Eq. \eqref{eq:stationary optimality condition} is the result of the variational principle for the functional $L(q)$.

The optimality condition \eqref{eq:stationary optimality condition} has two components: The first term is the change of the operational cost when the order-up-to level changes while maintaining the initial inventory distribution. The second term is the cost incurred by the change in the initial inventory distribution ($\delta f_{\mathbf{X}}^q(\mathbf{x})=f_{\mathbf{X}}^{q+\delta q}(\mathbf{x})-f_{\mathbf{X}}^{q}(\mathbf{x})$) when the order-up-to level changes from $q$ to $q+ \delta q$. The key component of the optimality condition for the stationary model is the second term, \emph{externality}, which considers a long-term impact of ordering decisions that affect the stationary distribution. Unfortunately, the optimality condition \eqref{eq:stationary optimality condition} is complicated to solve because it is recursive: The optimal ordering policy $q^{\ast}$ can be obtained only when we know the initial inventory distribution $f_{\mathbf{X}}^{q^{\ast}}(\cdot)$, which itself depends on $q^{\ast}$. To simplify the analysis of the condition \eqref{eq:stationary optimality condition}, we utilize the properties of the CBS policy, which is known to be a good ordering policy in many instances including all experiments that we analyze in \S \ref{sec: numerical}.

\subsection{Approximation Based on the Constant Base-Stock (CBS) Policy}
We assume that, for a given instance and any recurrent $\mathbf{x}$, the optimal order-up-to level $q^{\ast}(\mathbf{x})$ is close to the optimal CBS level $q_c^{\ast}$: $q^{\ast}(\mathbf{x})=q_c^{\ast}+\tilde{q}^{\ast}(\mathbf{x})$ with $|\tilde{q}^{\ast}(\mathbf{x})|/q_c^{\ast} \ll 1$. We thus make two approximations when switching the policy from $q^{\ast}$ to $q_c^{\ast}$:
\begin{enumerate}
\item The expected change in the one-period cost originating from the change of the initial inventory distribution is conserved: $L(q^{\ast}(\mathbf{x}),\mathbf{x}) \delta f^{q^{\ast}}_{\mathbf{X}}(\mathbf{x})\approx L(q_c^{\ast},\mathbf{x}) \delta f^{q^{\ast}_c}_{\mathbf{X}}(\mathbf{x})$.

\item The expected change in the order amount is conserved: $f^{q^{\ast}}_{\mathbf{X}}(\mathbf{x})\delta q^{\ast}(\mathbf{x}) \approx \delta q^{\ast}_c$, or equivalently, $\partial q_c /\partial q(\mathbf{x})\big|_{q=q^{\ast}} \approx f^{q^{\ast}}_{\mathbf{X}}(\mathbf{x})$.
\end{enumerate}
\iffalse
test
\fi
Under our proposed approximation, we can evaluate the externality term in the condition \eqref{eq:stationary optimality condition} as
\begin{align}
\int_{\Omega} L(q^{\ast}(\mathbf{k}),\mathbf{k}) \left.{\dfrac{\partial f^q_{\mathbf{X}}(\mathbf{k})}{\partial q(\mathbf{x})}} \right|_{q=q^{\ast}} d\mathbf{k}& \approx \int_{\Omega} L(q_c^{\ast}(\mathbf{k}),\mathbf{k}) \left.{\dfrac{\partial f^{q_c}_{\mathbf{X}}(\mathbf{k})}{\partial q_c}}\right|_{q_c=q_c^{\ast}} \left.{\dfrac{\partial q_c}{\partial q(\mathbf{x})}}\right|_{q=q^{\ast}}d\mathbf{k} \approx V_{ex}(q^{\ast}_c) f^{q^{\ast}}_{\mathbf{X}}(\mathbf{x}),
\label{eq: approximate externality}
\end{align}
where
\begin{align}
V_{ex}(q_c)=\int_{\Omega} L(q_c,\mathbf{k}) \dfrac{\partial f^{q_c}_{\mathbf{X}}(\mathbf{k})}{\partial q_c}d\mathbf{k}.
\label{eq: externality term}
\end{align}
Combining Eqs.~\eqref{eq:stationary optimality condition} and \eqref{eq: approximate externality}, we obtain an approximate optimality condition:
\begin{align*}
\left[ \dfrac{\partial L(q,\mathbf{x})}{\partial q(\mathbf{x})} + V_{ex}(q^{\ast}_c) \right] f^q_{\mathbf{X}}(\mathbf{x})=0, \forall \mathbf{x} \in \Omega,
\end{align*}
which simplifies to the optimaility condition for our approximate optimal (heuristic) policy $q_h^{\ast}$ conditioned on $\mathbf{x}$ being recurrent (i.e., $f^q_{\mathbf{X}}(\mathbf{x})>0$):
\begin{align}
\label{eq:optimality condition}
\dfrac{\partial L(q,\mathbf{x})}{\partial q(\mathbf{x})}+ V_{ex}(q^{\ast}_c)=0.
\end{align}
The optimality condition \eqref{eq:optimality condition} has two components, just as condition \eqref{eq:stationary optimality condition}. The first term, ${\partial L(q,\mathbf{x})}/{\partial q(\mathbf{x})}$, is the \emph{marginal internal cost} (MIC) and the second term, $V_{ex}(q^{\ast}_c)$, is the \emph{marginal external cost} (MEC). This MEC term, $V_{ex}(q^{\ast}_c)$, is a constant since it is independent of $\mathbf{x}$ under our approximation. If we ignore MEC, Eq.~\eqref{eq:optimality condition} reduces to the optimality condition of a standard single-decision inventory model, which involves only MIC and is easy to solve. Inclusion of MEC does not increase the computational complexity, because the MEC term is simply an added constant cost (or benefit if it is negative) when solving Eq.~\eqref{eq:optimality condition}. However, this constant term plays an important role for minimizing the average cost.

To evaluate the MEC term, we use a sample of states obtained by simulating a system under the optimal CBS policy. This sampling approach has been utilized to compute several important parameters of the heuristic method for analyzing lost sales non-perishable models and back-order perishable models based on the Approximate Dynamic Programming via Linear Programming (ADP-LP) framework (\citealt{de2003linear}, \citealt{de2004constraint}, and \citealt{sun2014quadratic}). In the same spirit, we can obtain a steady-state distribution close to the distribution of the optimal policy using a well-performing heuristic policy (i.e., the optimal CBS policy $q_c^{\ast}$ in our problem), from which we can obtain a set of sample states to evaluate the MEC term accurately. So far we have a general inventory model, but to proceed further, we will need to assume a specific cost structure for our inventory model, which we develop next.

\section{Application to the Perishable Inventory Model (the Nahmias Model)}
In this section we apply our method to analyze a single-product periodic-review perishable inventory model. The model assumes lost sales, fixed product lifetime, zero lead time, i.i.d. demand, and FIFO policy: oldest units on hand are used first. \citet{nahmias1975optimal} extensively analyze this model and derive its optimal policy using DP; our approach provides an efficient and accurate alternative to the DP analysis. In this Nahmias model, the operational cost is characterized by four cost parameters: purchase ($c$ per unit), holding ($h$ per unit), shortage ($r$ per unit), and wastage ($\theta$ per unit). Holding cost applies to the remaining units at the end of each period including those that become outdated. Wastage cost applies to the units not used by the end of their $m$-period lifetime. We normalize the unit purchase cost to zero and use $r-c$ as the unit normalized shortage cost (understocking cost) and $\theta+c$ as the unit normalized wastage cost (overstocking cost). We assume $h \geq 0$, $r-c>0$, and $\theta+c>0$ to avoid trivial optimal policies. We solve Eq.~\eqref{eq:optimality condition} to find an approximate optimal policy $q_h^{\ast}$.

\subsection{Marginal Internal Cost (MIC)}
\label{sec: MIC}
To derive the one-period cost $L(q,\mathbf{x})$, we consider making a single ordering decision at the beginning of period 1 (the current period) and evaluate the associated costs for the lifetime ($m$ periods) of the new order: Specifically, we consider holding and shortage costs incurred only in period 1 and wastage cost incurred only in period $m$. Our analytical representations of $L(q,\mathbf{x})$ and its partial derivative (MIC) are almost identical to the results obtained in \citet{nahmias1975optimal} except we use a new random variable to express the expected wastage efficiently: an $i$-period \emph{effective demand} $D^i(\mathbf{x}^{i-1})$, which represents the total outflow (through demand and wastage) from periods 1 to $i$ (excluding the wastage in period $i$). Denoting the demand and wastage in period $i$ by $D_i$ and $R_i$, respectively, we can define $D^i(\mathbf{x}^{i-1})$ recursively:

\begin{definition}
\begin{align}
D^{i}(\mathbf{x}^{i-1}) =
  \begin{cases}
   D^{i-1}(\mathbf{x}^{i-2})+R_{i-1}+D_{i} & \quad \text{if }  i = 2, \dots, m,\\
   D_1  & \quad \text{if } i=1,
  \end{cases}
  \label{eq: Di}
\end{align}
where
\begin{align}
R_{i-1} =
  \begin{cases}
   [x^{i-1} - D^{i-1}(\mathbf{x}^{i-2})]^+ & \quad \text{if } i = 2, \dots, m,\\
   0  & \quad \text{if } i=1.
  \end{cases}
  \label{eq: Ri}
\end{align}
\label{def:effective demand}
\end{definition}
In a special case where $\mathbf{x}=\mathbf{0}$, we observe no wastage in the first $m-1$ periods, and therefore, we obtain $D^m(\mathbf{0})=\sum_{j=1}^{m}D_j$, which is a sum of $m$ number of i.i.d. demand $D$. For simplicity, we denote $D^m=D^m(\mathbf{0})$. Let $F_Y (\cdot)$ and $f_Y (\cdot)$ represent a cumulative distribution function (CDF) and a probability density function (PDF) of a random variable $Y$, respectively. The CDF of $D^m(\mathbf{x})$ is obtained by applying a modified convolution formula recursively as follows. (All proofs including the proof of Lemma~\ref{prop:convolution formula} appear in the appendix.)

\begin{lemma}
\label{prop:convolution formula}
The CDF of the effective demand can be recursively obtained following:
\begin{align}
\label{eq:convolution formula}
F_{D^{i+1} (\mathbf{x}^{i})}(z)=
	\begin{cases}
	\int_{\xi=0}^{z-x^i}  F_{D^{i} (\mathbf{x}^{i-1})} (z-\xi) f_{D_{i+1}}(\xi) d \xi & \quad \text{if } z>x^i, i=1, \dots, m-1,\\
	0 & \quad \text{if } z \le x^i, i=1, \dots, m-1,\\
	F_{D}(z) & \quad \text{if } i=0.
	\end{cases}
\end{align}
\end{lemma}
We can now represent the number of units being held, in shortage, and wasted under the policy $q$ as $[q - D]^+$, $[D - q]^+$, and $[q - D^m(\mathbf{x})]^+$, respectively. Denote $\bar{F}_D(q)=1-F_D(q)$. The expected one-period cost and its partial derivative (i.e., MIC) become
\begin{align}
L(q,\mathbf{x})&=h \mathbb{E}_D[q - D]^+ + (r-c) \mathbb{E}_D[D - q]^+ + (\theta+c) \mathbb{E}_{D^m(\mathbf{x})}[q - D^m(\mathbf{x})]^+ \nonumber\\
&=h\int_0^{q} (q-t)f_D(t)dt + (r-c) \int_{q}^\infty (t-q)f_D(t)dt + (\theta+c) \int_{0}^{q}(q-t)f_{D^m(\mathbf{x})}(t)dt,
\label{eq:total cost given initial inventory}
\end{align}
and
\begin{align}
\dfrac{\partial L(q,\mathbf{x})}{\partial q(\mathbf{x})}&=hF_D(q)-(r-c)(1-F_D(q))+(\theta+c) F_{D^m(\mathbf{x})}(q)
\nonumber\\
&=-(h+r-c)\bar{F}_D(q)+(\theta+c)F_{D^m(\mathbf{x})}(q)+h.
\label{eq:marginal internal cost}
\end{align}
Furthermore, we can confirm $L(q,\mathbf{x})$ is strictly convex because
\begin{align*}
\dfrac{\partial^2 L(q,\mathbf{x})}{\partial q(\mathbf{x})^2}=(h+r-c){f}_D(q)+(\theta+c)f_{D^m(\mathbf{x})}(q) > 0, \forall q \in [0,\infty).

\end{align*}

\subsection{Marginal External Cost (MEC)}
The MEC term $V_{ex}(q^{\ast}_c)$ is fundamental in our method. To evaluate $V_{ex}(q_c)$ for a general $q_c$ that is not necessarily optimal, we first substitute the expression for $L(q_c,\mathbf{x})$ from Eq.~\eqref{eq:total cost given initial inventory} into Eq.~\eqref{eq: externality term}. Since $q_c$ is independent of $\mathbf{x}$, the only term in $L(q_c,\mathbf{x})$ that contributes is the term that depends on $\mathbf{x}$; other terms independent of $\mathbf{x}$ do not contribute because
\begin{align*}
\int_{\Omega} \dfrac{\partial f^{q_c}_{\mathbf{X}}(\mathbf{x})}{\partial q_c}d\mathbf{x}= \dfrac{\partial [\int_{\Omega} f^{q_c}_{\mathbf{X}}(\mathbf{x})d\mathbf{x}]}{\partial q_c}= \dfrac{\partial 1}{\partial q_c}= 0,

\end{align*}
where we use Leibniz's rule \citep[see, e.g., \S2.4 of][]{casella2002statistical} to interchange integration and differentiation since the integration of the derivative of $f^{q_c}_{\mathbf{X}}(\cdot)$ over a bounded region is finite (note: $f^{q_c}_{\mathbf{X}}(\cdot)$ has a bounded support under the CBS policy $q_c$). We can conclude that the only cost term in Eq.~\eqref{eq:total cost given initial inventory} contributing to $V_{ex}(q_c)$ is the wastage term that involves $D^m(\mathbf{x})$:
\begin{align}
&V_{ex}(q_c)=(\theta+c) w_{ex}(q_c),
\label{eq:marginal external cost}
\end{align}
where
\begin{align}
w_{ex}(q_c)=\int_\Omega \int_{0}^{q_c}(q_c -t)f_{D^m(\mathbf{k})}(t)dt \dfrac{\partial f_{\mathbf{X}}^{q_c}(\mathbf{k})}{\partial q_c} d \mathbf{k}.
\label{eq:marginal external cost2}
\end{align}
Plugging Eqs.~\eqref{eq:marginal internal cost} and \eqref{eq:marginal external cost} into Eq.~\eqref{eq:optimality condition}, we obtain the optimality condition satisfied by the approximate policy $q_h^\ast$:
\begin{align}
\label{eq:optimality3}
(\theta+c) F_{D^m(\mathbf{x})}(q)=(h+r-c)\bar{F}_D(q)-h-(\theta+c) w_{ex}(q^{\ast}_c).
\end{align}
For convenience, we call the left hand side of Eq.~\eqref{eq:optimality3} the \emph{marginal cost} or MC and its right hand side the \emph{marginal benefit} or MB. Following the process of marginal analysis, we can find $q_h^{\ast}$ numerically by plotting MC and MB and identifying their intersection.

\subsection{Numerical Results}
\label{sec: numerical}
To obtain our approximate optimal policy $q_h^\ast$, we implement the algorithm that includes two main steps: (i) a pre-processing step, which finds $w_{ex}(q_c)$ based on a Monte Carlo simulation of the CBS policy and $F_{D^m(\mathbf{x})}(\cdot)$ based on the analytical expression in Eq.~\eqref{eq:convolution formula}; (ii) a marginal analysis step, which determines $q_h^{\ast}(\mathbf{x})$ by solving Eq.~\eqref{eq:optimality3} using the result of the pre-processing step. We require the pre-processing step only once for each combination of product lifetime $m$ and demand distribution. (For more details, please see Appendix \ref{sec: algorithm}.) The entire algorithm is implemented in a spreadsheet for the examples we use. As a benchmark policy, we use DP following the formulation and the value iteration algorithm described in \citet{nahmias1975optimal}. We run experiments with model parameters chosen from $m \in \{2,3\}$, $h \in \{0,1\}$, $r-c \in \{5,8,10\}$, $\theta+c \in \{5,7,10,20\}$, and exponential and Poisson demands with mean 10; these parameters almost match the values used in related papers. We only consider smaller $m$ cases because policies are highly state-dependent in such cases---policies approach CBS as $m$ grows large (see Corollary~\ref{minimum lifetime}). We set $c=0$ when determining $q_h^\ast$; this does not affect the exact DP policy as long as we maintain the original understocking and overstocking costs. For the continuous demand case, we discretize the continuous state space with a step size of 0.1.

\subsubsection{Comparison of Average Costs.}
\label{sec: average cost}
We can rewrite the average cost $L(q)$ as follows:
\begin{align}
L(q) &= \mathbb{E}_{\mathbf{X}}[L(q,\mathbf{X})] \nonumber\\
&=h  \underbrace{\mathbb{E}_{\mathbf{X}} \mathbb{E}_D[q(\mathbf{X}) - D]^+}_{n_h(q)} + (r-c) \underbrace{\mathbb{E}_{\mathbf{X}} \mathbb{E}_D[D - q(\mathbf{X})]^+}_{n_s(q)} + (\theta+c) \underbrace{\mathbb{E}_{D^m(\mathbf{X})}[q(\mathbf{X}) - D^m(\mathbf{X})]^{+}}_{n_w(q)},
\label{eq:expected total cost2}
\end{align}
where $n_h(q)$, $n_s(q)$, and $n_w(q)$ represent the expected number of products in holding, in shortage, and in wastage, respectively, which we evaluate using a Monte Carlo simulation; this is necessary because the closed-form expression for the initial inventory distribution $f_{\mathbf{X}}^q(\cdot)$ is unknown. We define the percentage cost deviation: $\Delta~=~({L_h^{\ast}-L^{\ast}})/{L^{\ast}},$ where $L_h^{\ast}$ and $L^{\ast}$ correspond to $L(q)$ following our approximate policy $q_h^{\ast}$ and the optimal DP policy, respectively. The results summarized in Table~\ref{table:experiments1} indicate that the performance of our approximate policy $q_h^{\ast}$ is very close to that of the DP policy: The average deviation from the DP policy is around 0.05\% and the maximum deviation is 0.34\% for the forty instances we test.
\begin{table}[]
\OneAndAHalfSpacedXI
\caption{Average Periodic Operational Costs Following DP and the Approximate Policy.}
\centering
\small
\begin{tabular}{  l  c  c  c  c  c  c  c  c  c  }
\hline
	 & \multicolumn{4}{c}{Exponential Demand} & \multicolumn{4}{c}{Poisson Demand}  \\
	 & \multicolumn{2}{c}{$m=2$}      & \multicolumn{2}{c}{$m=3$}  & \multicolumn{2}{c}{$m=2$}  & \multicolumn{2}{c}{$m=3$}  &   \\
	$h, r, \theta$ & DP & Approx & DP & Approx & DP & Approx & DP & Approx &   \\\hline
	0, 5, 5 & 19.838 & 19.847 & 12.142 & 12.184 & 1.465 & 1.467 & 0.1255 & 0.1259 &  \\
	\multicolumn{1}{c}{} &  & 0.04\% &  & 0.34\% &  & 0.14\% &  & 0.27\% &   \\
	0, 5, 10 & 25.400 & 25.416 & 16.053 & 16.065 & 2.091 & 2.093 & 0.1866 & 0.1867 &   \\
	\multicolumn{1}{r}{} &  & 0.06\% &  & 0.07\% &  & 0.11\% &  & 0.04\% &   \\
	0, 5, 20 & 30.739 & 30.745 & 20.243 & 20.248 & 2.917 & 2.920 & 0.2629 & 0.2629 &   \\
	\multicolumn{1}{r}{} &  & 0.02\% &  & 0.02\% &  & 0.08\% &  & 0.00\% &   \\
	0, 8, 7 & 30.060 & 30.076 & 18.306 & 18.343 & 2.159 & 2.159 & 0.1879 & 0.1879 &   \\
	\multicolumn{1}{r}{} &  & 0.05\% &  & 0.20\% &  & 0.00\% &  & 0.00\% &   \\
	0, 10, 5 & 29.194 & 29.219 & 17.492 & 17.521 & 1.951 & 1.951 & 0.1691 & 0.1691 &  \\
	\multicolumn{1}{r}{} &  & 0.09\% &  & 0.17\% &  & 0.00\% &  & 0.00\% &   \\
	1, 5, 5 & 25.386 & 25.389 & 20.878 & 20.878 & 5.262 & 5.277 & 4.932 & 4.932 &   \\
	\multicolumn{1}{r}{} &  & 0.01\% &  & 0.00\% &  & 0.27\% &  & 0.00\% &   \\
	1, 5, 10 & 28.934 & 28.938 & 22.686 & 22.686 & 5.523 & 5.523 & 4.933 & 4.933 &   \\
	\multicolumn{1}{r}{} &  & 0.01\% &  & 0.00\% &  & 0.00\% &  & 0.00\% &   \\
	1, 5, 20 & 32.810 & 32.811 & 25.025 & 25.028 & 5.876 & 5.876 & 4.936 & 4.936 &   \\
	\multicolumn{1}{r}{} &  & 0.00\% &  & 0.01\% &  & 0.00\% &  & 0.00\% &   \\
	1, 8, 7 & 36.513 & 36.519 & 28.384 & 28.389 & 6.355 & 6.355 & 5.681 & 5.681 &   \\
	\multicolumn{1}{r}{} &  & 0.02\% &  & 0.02\% &  & 0.00\% &  & 0.00\% &   \\
	1, 10, 5 & 38.246 & 38.253 & 30.237 & 30.248 & 6.634 & 6.634 & 6.052 & 6.052 &  \\
	\multicolumn{1}{r}{} &  & 0.02\% &  & 0.04\% &  & 0.00\% &  & 0.00\% &   \\ \hline
	\multicolumn{2}{l}{Average $\Delta$}  & 0.033\% &  & 0.088\% &  & 0.060\% &  & 0.027\% &   \\
	\multicolumn{2}{l}{Maximum $\Delta$}  & 0.09\% &  & 0.34\% &  & 0.27\% &  & 0.27\% &   \\ \hline
\end{tabular}
\label{table:experiments1}
\\Note: Results are obtained using $10^6$-period Monte Carlo simulation with $10^4$ burn-in periods.
\OneAndAHalfSpacedXI
\end{table}

\OneAndAHalfSpacedXI
\subsubsection{Comparison of Individual Order Amounts.}
\label{sec: order amount}
We next examine the accuracy of $q_h^{\ast}$ with respect to individual order amounts in Figs.~\ref{fig:ExponentialDemand} (exponential demand case) and \ref{fig:PoissonDemand} (Poisson demand case)---a comparison missing from other papers in this area. In each plot, we separate recurrent and non-recurrent initial inventory regions by a threshold $\tau$, which satisfies $\tau=q_h^{\ast}(\mathbf{0})$; this is because the initial inventory level ($x_{m-1}$ on the horizontal axis) cannot exceed the maximum order at $\mathbf{x}=0$. Figs.~\ref{fig:ExponentialDemand} and \ref{fig:PoissonDemand} show that $q_h^{\ast}$ closely matches the optimal DP policy in recurrent regions. There is a discrepancy in non-recurrent regions, but this discrepancy does not impact average costs.
\begin{figure}
    \centering
    \begin{subfigure}[]{0.48\textwidth}
     \centering
        \includegraphics[scale=0.55]{./figExp00105m2Exp.pdf}
        \caption{$h=0, m=2$, $\tau=17.2$, $\eta=-0.68$,\\ $n_w=2.70$}
        \label{fig:expo00105m2}
   \end{subfigure}
   \begin{subfigure}[]{0.48\textwidth}
     \centering
        \includegraphics[scale=0.55]{./figExp10105m2Exp.pdf}
        \caption{$h=1, m=2$, $\tau=14.7$, $\eta=-0.73$,\\ $n_w=1.88$}
        \label{fig:expo10105m2}
    \end{subfigure}
     \begin{subfigure}[]{0.48\textwidth}
     \centering
        \includegraphics[scale=0.55]{./figExp00105m3Exp.pdf}
        \caption{$h=0, m=3$, $\tau=21.7$, $\eta=-0.76$,\\ $n_w=1.66$}
        \label{fig:expo00105m3}
    \end{subfigure}
    \begin{subfigure}[]{0.48\textwidth}
     \centering
        \includegraphics[scale=0.55]{./figExp10105m3Exp.pdf}
        \caption{$h=1, m=3$, $\tau=17.6$, $\eta=-0.82$,\\ $n_w=0.91$}
        \label{fig:expo10105m3}
    \end{subfigure}
    \caption{Order Amounts for Exponential Demand Case; $r=10, \theta =5$.}
    \label{fig:ExponentialDemand}
\end{figure}
\begin{figure}
    \centering
    \begin{subfigure}[]{0.48\textwidth}
     \centering
        \includegraphics[scale=0.55]{./figExp00105m2Poi.pdf}
        \caption{$h=0, m=2$, $\tau=15$, $\eta=-0.67$\\ $n_w=0.21$}
        \label{fig:Poi00105m2}
   \end{subfigure}
   \begin{subfigure}[]{0.48\textwidth}
     \centering
        \includegraphics[scale=0.55]{./figExp10105m2Poi.pdf}
        \caption{$h=1, m=2$, $\tau=14$, $\eta=-0.93$\\ $n_w=0.12$}
        \label{fig:Poi10105m2}
    \end{subfigure}
     \begin{subfigure}[]{0.48\textwidth}
     \centering
        \includegraphics[scale=0.55]{./figExp00105m3Poi.pdf}
        \caption{$h=0, m=3$, $\tau=19$, $\eta=-0.84$\\ $n_w=0.02$}
        \label{fig:Poi00105m3}
    \end{subfigure}
    \begin{subfigure}[]{0.48\textwidth}
     \centering
        \includegraphics[scale=0.55]{./figExp10105m3Poi.pdf}
        \caption{$h=1, m=3$, $\tau=14$, $\eta=-1.00$\\ $n_w=0.00$}
        \label{fig:Poi10105m3}
    \end{subfigure}
    \caption{Order Amounts for Poisson Demand Case; $r=10, \theta =5$.}
    \label{fig:PoissonDemand}
\end{figure}

To examine how the properties of each instance respond to various parameters, we include two indices $\eta=(x_m(\tau)-x_m(0))/\tau$ and $n_w=n_w(q_h^{\ast})$ in the caption of each plot, corresponding to the average slope of order amounts in the recurrent region following $q_h^{\ast}$ and the average wastage defined in Eq.~\eqref{eq:expected total cost2}, respectively. For example, Fig.~\ref{fig:Poi10105m3} has $\eta=-1$ (the CBS policy) and $n_w=0$ (no wastage). Our experiments indicate $\eta \to -1$ and $n_w \to 0$ as $h$ increases (e.g., Fig.~\ref{fig:Poi00105m3} vs. Fig.~\ref{fig:Poi10105m3}), $m$ increases (e.g., Fig.~\ref{fig:expo10105m2} vs. Fig.~\ref{fig:expo10105m3}) and/or the demand distribution shifts from exponential to Poisson (e.g., Fig.~\ref{fig:expo10105m3} vs. Fig.~\ref{fig:Poi10105m3}). These patterns are explained by marginal analysis in the next section.

\subsection{Analytical Properties of the Perishable Inventory Model}
\label{sec:analysis}
In this section we discuss the properties of the approximate policy $q_h^{\ast}$ satisfying Eq.~\eqref{eq:optimality3}. We assume $f_D (d)$ is finite for all positive $d$ and has unbounded support, which guarantee that $F_D (d)$ is continuous for $d \in [0,+\infty)$ and $\mathbf{x}=0$ is always recurrent.

\subsubsection{Existence of the Unique Approximate Optimal Policy.}
Our optimality condition \eqref{eq:optimality3} is a simple equation since the externality term $w_{ex}$ is constant: The right hand side (MB) monotonically decreases while the left hand side (MC) monotonically increases with respect to $q$. We can easily verify if the unique optimal solution exists by comparing MB and MC at $q=0$ and $q \to \infty$. For this purpose, the following proposition is useful.
\begin{proposition}
\label{lem:external cost}
$-1 < w_{ex}(q_c) \leq 0, \forall q_c \geq 0.$
\end{proposition}
Proposition~\ref{lem:external cost} implies that the inventory system exhibits marginal external \emph{benefit} for ordering perishable products and the impact of externality is bounded. We can now prove
\begin{proposition}
\label{thm:existence}
There exists a unique finite order-up-to level (approximate optimal policy) $q_h^\ast(\mathbf{x})$ satisfying the optimality condition \eqref{eq:optimality3} for any initial inventory vector $\mathbf{x} \in \Omega$.
\end{proposition}

\subsubsection{State-Dependent Policy V.S. CBS Policy.}
We now explore the conditions for model parameters that make $q_h^{\ast}$ approach CBS (as in Fig.~\ref{fig:Poi10105m3}). To do so, we first bound $q_h^{\ast}(\mathbf{x}), \forall \mathbf{x} \in \Omega$, in Proposition~\ref{bound} by letting $q^{\dagger}=q_h^{\ast}(\mathbf{0})$ and $q^{\ddagger}=\lim_{v \to \infty} q_h^{\ast}(\mathbf{y})$, where $v$ is the smallest component in the initial inventory vector $\mathbf{y}$. Also, let $D^m=D^m(\mathbf{0})$ (see Definition \ref{def:effective demand}).
\begin{proposition}
\label{bound}
$q^{\dagger} \leq q_h^{\ast}(\mathbf{x}) \leq q^{\ddagger}$ and $F_{D^m}(q^{\dagger}) \geq F_{D^m(\mathbf{x})}(q_h^{\ast}(\mathbf{x}))$, $\forall \mathbf{x} \in \Omega$.
\end{proposition}
Note that the lower bound $q^{\dagger}$ is always finite and tight because $\mathbf{x}=\mathbf{0}$ is recurrent, while the upper bound $q^{\ddagger}$ is not necessarily finite nor tight because an arbitrarily large initial inventory may not be recurrent. Let the set of recurrent $\mathbf{x}$ be $\Omega_{r} =\{\mathbf{x} \in \Omega|f^{q_h^{\ast}}_{\mathbf{X}}(\mathbf{x})>0\}.$ Proposition~\ref{thm:CBS condition} establishes the conditions for $q_h^{\ast}$ to approach CBS:
\begin{proposition}
\label{thm:CBS condition}

The following three equivalent conditions are necessary and sufficient for $q_h^{\ast}$ to approach CBS:

$F_{D^m}(q^{\dagger}) \to 0 \iff |q^{\ddagger} - q^{\dagger}| \to 0 \iff q_h^{\ast}(\mathbf{x}) \to q_c^{\ast}, \forall \mathbf{x} \in \Omega_r.$
\end{proposition}
When $q_h^{\ast}$ approaches CBS, the corresponding system exhibits the following properties. A \emph{critical ratio} $\gamma^{\ast}={(r-c)}/{(h+r-c)}$ plays an important role here.
\begin{corollary}
\label{cor:cor2}
When $q_h^{\ast}$ approaches CBS (Proposition \ref{thm:CBS condition}), we obtain:

$F_{D^m}(q^{\dagger}) \to 0 \implies n_{w}(q_h^{\ast}) \to 0, w_{ex}(q_c^{\ast}) \to 0, q_h^{\ast} \to q_c^{\ast}~=~F^{-1}_D(\gamma^{\ast})$, and $h>0$.
\end{corollary}
According to Corollary~\ref{cor:cor2}, when $q_h^{\ast} \to q_c^{\ast}$, the system observes no wastage, no externality, and $q_c^{\ast}$ becomes a simple function of the critical ratio $\gamma^{\ast}$, which represents a trade-off between shortage cost $r-c(>0)$ and holding cost $h(>0)$ in the absence of wastage and externality. The contraposition of Corollary~\ref{cor:cor2} implies that if $n_w \neq 0$, $w_{ex} \neq 0$, or $h=0$, then $q_h^{\ast}$ must be state-dependent. Lastly, we can modify Corollary~\ref{cor:cor2} and derive the following easy-to-calculate rule of thumb: Let $\alpha$ be a predetermined threshold based on the tolerance for numerical errors (such as $\alpha = 1\%$). We can determine the minimum product lifetime $m_\alpha$ to make the policy CBS using Corollary \ref{minimum lifetime}. In this corollary, the exact CDF $F_{D^m}(\cdot)$ may be approximated by the Normal CDF $\Phi^m(\cdot)$, which represents the CDF of the sum of $m$ demands, based on the Central Limit Theorem, if appropriate.
\begin{corollary}
\label{minimum lifetime}
$q_h^{\ast}$ becomes CBS if $m \ge m_\alpha$, where $m_\alpha$ denotes the least positive integer to ensure $F_{D^m}(F^{-1}_D(\gamma^{\ast})) \le \alpha$, or approximately, $\Phi^m(F^{-1}_D(\gamma^{\ast})) \le \alpha$.
\end{corollary}

\subsection{Analytical Implications}
To illustrate the intuition behind Proposition~\ref{thm:CBS condition}, we compare two contrasting experiments from \S\ref{sec: order amount}: Figs.~\ref{fig:expo00105m2} ($h=0$, $m=2$, exponential demand) and \ref{fig:Poi10105m3} ($h=1$, $m=3$, Poisson demand), for which we show the marginal analysis plots in Figs.~\ref{fig:CBExp} and \ref{fig:CBPoi}, respectively.
\begin{figure}
    \centering
    \begin{subfigure}[]{0.49\textwidth}
     \centering
        \includegraphics[scale=0.6]{./figCBExp.pdf}
        \caption{Exponential Demand, $h=0, m=2$.}
        \label{fig:CBExp}
   \end{subfigure}
   \begin{subfigure}[]{0.49\textwidth}
     \centering
        \includegraphics[scale=0.6]{./figCBPoi.pdf}
        \caption{Poisson Demand, $h=1, m=3$.}
        \label{fig:CBPoi}
    \end{subfigure}
    \caption{Marginal Analysis for State-Dependent and CBS Policies; $r=10, \theta =5$.}
    \label{fig:MCB}
\end{figure}
Fig.~\ref{fig:CBExp} is a typical plot for the marginal analysis of a \emph{state-dependent} ordering policy, whereas Fig.~\ref{fig:CBPoi} is a typical plot for the marginal analysis of the CBS policy. Each figure contains three plots based on Eq.~\eqref{eq:optimality3}: The two non-decreasing lines represent MC (the left side of Eq.~\eqref{eq:optimality3} representing the marginal wastage cost) with two different initial inventory levels, while the non-increasing line represents MB (the right side of Eq.~\eqref{eq:optimality3}). The \emph{key} is the position of the intersection: $q_h^{\ast}(\mathbf{x})$ (the horizontal axis) and $(\theta+c)F_{D^m(\mathbf{x})}(q_h^{\ast}(\mathbf{x}))$ (the vertical axis). Proposition~\ref{thm:CBS condition} tells us that, in an asymptotic manner, the intersecting point for the $\mathbf{x}=\mathbf{0}$ case should lie on the horizontal axis to make the policy CBS. We confirm that both Proposition~\ref{thm:CBS condition} and Corollary~\ref{cor:cor2} hold in our results: If MC and MB intersect \emph{above} the horizontal axis, then the ``optimal'' marginal wastage depends on $\mathbf{x}$, making the policy state-dependent (Fig.~\ref{fig:CBExp}), while if they intersect \emph{on} the horizontal axis, then the marginal wastage becomes negligible, making the policy CBS (Fig.~\ref{fig:CBPoi}).

We now know when the policy $q_h^\ast$ becomes CBS, but when does this occur in practice? Although a quantitative analysis is required to make a precise statement, the comparison of the marginal analysis between Figs.~\ref{fig:CBExp} and \ref{fig:CBPoi} provides some insight on such conditions: If (i) MC is flat (on the horizontal axis) up to a larger $q$ and (ii) MB crosses the horizontal axis at a smaller $q$, then $q_h^{\ast}$ approaches CBS. These two conditions are satisfied, for example, by the changes of parameters observed in \S\ref{sec: order amount}: (a) Demand variability decreases (contributing to both conditions (i) and (ii)); (b) $m$ increases (contributing to condition (i)); and (c) $h$ increases (contributing to condition (ii)). Of course, how large $m$ or $h$ should be depends on the parameters and the demand $D$. Corollary~\ref{minimum lifetime} is useful to determine the minimum lifetime $m_\alpha$ to make the policy CBS (within a margin of error $\alpha$). Consider the $(h,r,\theta)=(1,10,5)$ case and use $\alpha=0.01$. If $D$ is Poisson, we obtain a relatively small lifetime $m_\alpha=3$ (using either the Poisson $F_{D^m}(\cdot)$ or the Normal $\Phi^m(\cdot)$ in Corollary~\ref{minimum lifetime}) to have a CBS policy ($q^\ast_c=14$). In contrast, if $D$ is exponential, we require a much larger lifetime, either  $m_\alpha=8$ (using the Erlang $F_{D^m}(\cdot)$) or $m_\alpha=10$ (using the Normal $\Phi^m(\cdot)$), to have a CBS policy ($q^\ast_c=24$); we confirm that when $m=10$, the policy is CBS (Fig.~\ref{fig:figNew2}) and the intersecting point of MC and MB lies on the horizontal axis (Fig.~\ref{fig:figNew1}).
\begin{figure}
    \centering
    \begin{subfigure}[]{0.49\textwidth}
     \centering
        \includegraphics[scale=0.6]{./figNew2.pdf}
        \caption{Order Amounts when $m=2, 3, 10$.}
        \label{fig:figNew2}
   \end{subfigure}
   \begin{subfigure}[]{0.49\textwidth}
     \centering
        \includegraphics[scale=0.6]{./figNew1.pdf}
        \caption{Marginal Analysis when $m=10$.}
        \label{fig:figNew1}
    \end{subfigure}
    \caption{Order Amounts and Marginal Analysis for Exponential Demand Case; $h=1, r=10, \theta =5$.}
    \label{fig:ExpToCBS}
\end{figure}

\section{Concluding Remarks}
We present a marginal analysis framework with externality for solving perishable inventory systems. Our approach builds upon the general idea of dimensionality reduction, and is in the same spirit as mean-field theory, density-functional theory, and congestion pricing, which have been proven effective for various hard problems. The key idea underlying all of these techniques is to encapsulate all complexities in a single term, capturing meaningful structures in a simpler model. Specifically, for our model, we convert a perishable inventory model that involves many ordering decisions into a single-decision inventory model with an externality term ($V_{ex}$ defined in Eq.~\eqref{eq: externality term}), which is easy to solve, for example, in a spreadsheet. We demonstrate that our approximation provides a near-optimal policy for the Nahmias model with Poisson and exponential demand distributions, yielding an average of $0.05\%$ (and at maximum $0.34\%$) total cost deviation from the optimal DP policy. In fact, our externality-based approximation results in state-dependent ordering amounts that are almost identical to the ones suggested by the optimal DP policy.

There are various extensions to the Nahmias model that we do not discuss in this paper; some of them are relatively straightforward to incorporate into our framework. For example, demands are not necessarily identically distributed and may depend on the day of the week, or systems often have positive lead times (see Appendix~\ref{sec: positiveLeadTime}). We believe that our approach is applicable to inventory models that are more general than the Nahmias model we examine here, and that it has the potential to find well-performing inventory policies for many real-world inventory systems whose exact analysis and computations are not possible.

Future work includes several possible directions: First, we plan to extend the Nahmias model (e.g., allowing demands to depend on the day of the week and lead time to be positive) and investigate how the resulting approximation performs compared to other possible approximations; to our knowledge, the optimal policy is not known for the positive lead time case with lost sales and there is no approximation method specific to that model in the literature. Another interesting extension is to use our externality approach to analyze more complex perishable inventory problems such as systems with multiple substitutable products \citep[e.g.,][]{deniz2010managing}, for which again the literature lacks the optimal policy as well as a well-performing approximation.

\bibliography{perishable_Bib}
\bibliographystyle{ormsv080}

\ECSwitch

\ECHead{Appendix}

\section{Proof of Lemma~\ref{prop:convolution formula}}
We can rewrite Eq.~\eqref{eq: Ri} as
\begin{align*}
R_{i}= \max\{{x}^{i}-D^{i}(\mathbf{x}^{i-1}),0\}, \quad i \geq 1,
\end{align*}
which is equivalent to
\begin{align*}
D^{i}(\mathbf{x}^{i-1})+R_{i}= \max\{D^{i}(\mathbf{x}^{i-1}),{x}^{i}\}, \quad i \geq 1.
\end{align*}
Therefore, for $i \ge 1$,
\begin{align}
F_{D^{i}(\mathbf{x}^{i-1})+R_{i}}(\zeta) =
  \begin{cases}
   F_{D^{i}(\mathbf{x}^{i-1})}(\zeta) & \quad \text{if } \zeta \geq x^i, \nonumber \\
   0  & \quad \text{if } \zeta < x^i.
  \end{cases}
\end{align}
Combining this result with Eq.~\eqref{eq: Di}, we obtain
\begin{align*}
F_{D^{i+1} (\mathbf{x}^{i})}(z) &=Pr\{D^{i+1}(\mathbf{x}^{i})\leq z \}=Pr\{D^{i}(\mathbf{x}^{i-1})+R_{i}+D_{i+1} \leq z \}\\
&=Pr\{D^{i}(\mathbf{x}^{i-1})+R_{i} \leq z-D_{i+1} \}= \int_{\xi=-\infty}^{\infty}  F_{D^{i}(\mathbf{x}^{i-1})+R_i} (z-\xi) f_{D_{i+1}}(\xi) d \xi\\
&=\int_{\xi=0}^{z-x^i}  F_{D^{i} (\mathbf{x}^{i-1})} (z-\xi) f_{D_{i+1}}(\xi) d \xi, \quad \text{if } z > x^i, i \geq 1,
\end{align*}
and $F_{D^{i+1} (\mathbf{x}^{i})}(z) =0$, {} if $z \le x^i, i \geq 1.$ \hfill $\square$

\section{Algorithm to Obtain the Approximate Optimal Policy}
\label{sec: algorithm}
We describe our algorithm to find the approximate optimal (heuristic) policy $q_h^{\ast}$. The outline of the algorithm includes two main steps: a pre-processing step, which finds $w_{ex}(q_c)$ and $F_{D^m(\mathbf{x})}(\cdot)$, followed by a marginal analysis step, which finds $q_h^{\ast}(\mathbf{x})$ and $x_m$. Specifically, each step includes the following procedures:
\begin{enumerate}
  \item Pre-processing: We require this step only once for each combination of product lifetime $m$ and demand distribution; this step is independent from cost parameters $c$, $h$, $r$, and $\theta$.
    \begin{enumerate}
  		\item Evaluate $n_{h}(q_c)$,  $n_{s}(q_c)$,  $n_{w}(q_c)$, and $w_{ex}(q_c)$ at various $q_c$.
  		\item Obtain $F_{D^m(\mathbf{x})}(\cdot)$.
  \end{enumerate}
  \item Marginal analysis: We perform this step for given cost parameters $c$, $h$, $r$, and $\theta$.
  \begin{enumerate}
  	  \item Evaluate $w_{ex}(q_c^{\ast})$ at $q_c^{\ast}=\argmin_{q_c} L(q_c)$ using $n_h(q_c)$, $n_s(q_c)$, and $n_w(q_c)$.
  	  \item Conduct marginal analysis and determine $q_h^{\ast}(\mathbf{x})$ using $w_{ex}(q_c^{\ast})$ and $F_{D^m(\mathbf{x})}(\cdot)$.
	  \item Determine $x_m=[q_h^{\ast}(\mathbf{x})-x]^+$.
   \end{enumerate}
\end{enumerate}
Step 1(a) requires the analysis of the stationary model under the CBS policy $q_c$, which is much simpler than analyzing the stationary model under the policy $q(\mathbf{x})$ because the CBS policy does not depend on $\mathbf{x}$. We perform a Monte Carlo simulation to find $n_{h}(q_c)$,  $n_{s}(q_c)$,  $n_{w}(q_c)$, and $w_{ex}(q_c)$ for various values of $q_c$. In our experiments, we confirm that a simulation of 1,000 periods for each $q_c$ value is sufficient to evaluate these four indices. The results are used to find the optimal $q_c^{\ast}$ for given cost parameters in Step 2. In Step 1(b) we use a modified convolution formula \eqref{eq:convolution formula} to obtain the CDF of the $m$-period effective demand, $F_{D^m(\mathbf{x})}$, which can help us estimate the marginal wastage when the initial inventory is $\mathbf{x}$.

In Step 2(a) we evaluate the externality term $w_{ex}(q_c^{\ast})$ at the optimal CBS level $q_c^{\ast}=\argmin_{q_c} L(q_c)$, where $L(q_c)$ is evaluated using Eq.~\eqref{eq:expected total cost2} and the results from Step 1(a). Note that, as is the case with $L(q)$, $L(q_c)$ is a convex function of $q_c$. In Step 2(b) we solve our optimality condition \eqref{eq:optimality3} to obtain the approximate optimal policy $q_h^{\ast}$. Step 2(c) finds the order amount $x_m$, which can be directly compared with the optimal DP order amount.

\section{Proof of Proposition~\ref{lem:external cost}}
We assume (as in \S\ref{sec:analysis}) $h \geq 0$, $r-c>0$, $\theta+c>0$, and continuous $F_D (d)$ for $d \in [0,+\infty)$. Since we discuss the properties of random initial inventory vectors, it is convenient to use the concept of the first-order stochastic dominance (FSD), which is defined as follows:
\begin{definition}
\emph{A random variable $X$ first-order stochastically dominates another random variable $Y$ ($X \succeq_{FSD} Y$) if and only if $F_{X}(x) \leq F_{Y}(x)$, $\forall x \in \mathbb{R}$.}
\label{def:def2}
\end{definition}
For notational convenience, we write $\mathbf{X} \succeq_{FSD} \mathbf{Y}$ for random vectors $\mathbf{X}$ and $\mathbf{Y}$ if
the FSD property holds componentwise: $X_i \succeq_{FSD} Y_i$ for all $i^{th}$ elements of $\mathbf{X}$ and $\mathbf{Y}$.
To prove the FSD property for random variables, the following property is convenient and well-known (see, for example, \citealt{wolfstetter1993stochastic}).
\begin{property}
\label{prop:fsd}
$X \succeq_{FSD} Y \iff \mathbb{E}_{X}[f(X)] \geq \mathbb{E}_{Y}[f(Y)]$ for any non-decreasing function $f(\cdot)$.
\end{property}

Next, we present two useful FSD relationships for $D^m(\cdot)$. Let $\mathbf{x}$ and $\mathbf{y}$ be initial inventory vectors in $\Omega=\mathbb{R}_{\geq0}^{m-1}$, and $\mathbf{X}$ and $\mathbf{Y}$ be the corresponding random vectors.
\begin{lemma}
\label{prop:effective demand1}
$\mathbf{x} \ge \mathbf{y}$ componentwise $\implies D^m (\mathbf{x}) \succeq_{FSD} D^m (\mathbf{y})$.
\end{lemma}
\noindent Proof of Lemma~\ref{prop:effective demand1}: The proof follows from Lemma~\ref{prop:convolution formula} and Definition \ref{def:def2}. \hfill $\square$
\begin{lemma}
\label{prop:effective demand2}
$\mathbf{X} \succeq_{FSD} \mathbf{Y}$ componentwise $\implies D^m (\mathbf{X}) \succeq_{FSD} D^m (\mathbf{Y})$.
\end{lemma}
\noindent Proof of Lemma~\ref{prop:effective demand2}: Combining Property~\ref{prop:fsd} and Lemma~\ref{prop:effective demand1}, we have $\mathbf{x} \ge \mathbf{y}$ componentwise $\Longrightarrow \mathbb{E}_{D^m (\mathbf{x})}[f(D^m (\mathbf{x}))] \geq \mathbb{E}_{D^m (\mathbf{y})}[f(D^m (\mathbf{y}))]$ for any non-decreasing function $f(\cdot)$. This result indicates that $g(\mathbf{x}) \doteq \mathbb{E}_{D^m (\mathbf{x})}[f(D^m (\mathbf{x}))]=\mathbb{E}_{D^m(\mathbf{X})|\mathbf{X}=\mathbf{x}}[f(D^m (\mathbf{X}))|\mathbf{X}=\mathbf{x}]$ is a non-decreasing function in $\mathbf{x}$ componentwise (because $g(\mathbf{x}) \ge g(\mathbf{y})$ whenever $\mathbf{x} \ge \mathbf{y}$ componentwise). Using Property~\ref{prop:fsd} once again this time with $g(\mathbf{x})$ we define above and the law of total expectation, $\mathbf{X} \succeq_{FSD} \mathbf{Y}$ componentwise $\Longrightarrow \mathbb{E}_{\mathbf{X}}[g(\mathbf{X})] \geq \mathbb{E}_{\mathbf{Y}}[g(\mathbf{Y})] \Longleftrightarrow \mathbb{E}_{D^m (\mathbf{X})}[f(D^m (\mathbf{X})] \geq \mathbb{E}_{D^m (\mathbf{Y})}[f(D^m (\mathbf{Y})]$ for any non-decreasing function $f(\cdot)$, which indicates $D^m (\mathbf{X}) \succeq_{FSD} D^m (\mathbf{Y})$. \hfill $\square$

Let $\mathbf{X}^{q_c}$ and $X_m^{q_c}$ be the initial inventory random vector and the new order under the CBS policy $q_c$, respectively. Let $\tilde{\mathbf{X}}^{q_c}=(\mathbf{X}^{q_c}, X_m^{q_c}) \in \mathbb{R}^m_{\ge0}$. Since the entire inventory follows the CBS policy $q_c$, $\sum_{i=1}^{m}X_i^{q_c}=q_c$ must hold. Consider increasing the order-up-to level $q_c$ by a positive infinitesimal $\delta_{q_c}$. Then the stationary distribution of the entire inventory (including the new order) shifts from $\tilde{\mathbf{X}}^{q_c}$ to $\tilde{\mathbf{X}}^{q_c+\delta_{q_c}}$. The following relationship holds:
\begin{lemma}
\label{prop:initial inventory}
$\mathbf{X}^{q_c+\delta q_c} \succeq_{FSD} \mathbf{X}^{q_c}$ componentwise.
\end{lemma}
\noindent Proof of Lemma~\ref{prop:initial inventory}: Define a discrete time stochastic process $\{{\mathbf{\tilde X}}^{q_c}(t), t=0,1,2,...\}$ to represent the entire inventory at time period $t \in \mathbb{Z}_{\ge0}$. Consider a sample path ${\mathbf{\tilde X}}^{q_c}(t;\omega)$. Without loss of generality, we assume $\mathbf{X}^{q_c}(0;\omega) = \mathbf{0}$ and $X_m^{q_c}(0;\omega)=q_c$, which repeatedly appear one period after we encounter a shortage of inventory (note: $\mathbf{x}=\mathbf{0}$ is recurrent). Suppose the CBS policy is modified from $q_c$ to $q_c+\delta_{q_c}$, where $\delta_{q_c}$ is a positive infinitesimal that is non-divisible. Then the sample path at $t=0$ shifts from ${\mathbf{\tilde X}}^{q_c}(0;\omega)=(\mathbf{0},q_c)$ to ${\mathbf{\tilde X}}^{q_c+\delta_{q_c}}(0;\omega)=(\mathbf{0},q_c+\delta_{q_c})$. Assuming that this $\delta_{q_c}$ is used last in each age category, either one of the two occurs every period: (1) $\delta_{q_c}$ is not used, in which case $\delta_{q_c}$ becomes older (or wasted) and shows up in the older age category (or the new order category) in the next period, or (2) $\delta_{q_c}$ is used, in which case $\delta_{q_c}$ shows up in the same or newer age category in the next period. Hence, the revised sample path is represented as ${\mathbf{\tilde X}}^{q_c+\delta_{q_c}}(t;\omega)={\mathbf{\tilde X}}^{q_c}(t;\omega)+\delta_{q_c}\mathbf{I}(t;\omega),$ where $\mathbf{I}$ is a random unit vector (one of the age category is 1 and all others are 0) and $\mathbf{I}(t;\omega)$ is its sample path. It follows that, for each age category $i$, $F_{X_i^{q_c+\delta_{q_c}}}(x)=Pr\{X_i^{q_c+\delta_{q_c}} \le x\}=Pr\{X_i^{q_c} +\delta_{q_c}I_i \le x\} \le Pr\{X_i^{q_c} \le x\}=F_{X_i^{q_c}}(x)$, $\forall x \in [0,\infty)$. Hence, from Definition \ref{def:def2}, we obtain $\mathbf{\tilde X}^{q_c+\delta q_c} \succeq_{FSD} \mathbf{\tilde X}^{q_c}$ componentwise, and therefore, $\mathbf{X}^{q_c+\delta q_c} \succeq_{FSD} \mathbf{X}^{q_c}$ componentwise. (Note: $\mathbf{\tilde X}$ and $\mathbf{I}$ are not independent, but the dependency does not affect the conclusion.) \hfill $\square$
\begin{lemma}
\label{prop:effective demand3}
$D^m (\mathbf{X}^{q_c+\delta q_c}) \succeq_{FSD} D^m (\mathbf{X}^{q_c})$.
\end{lemma}
\noindent Proof of Lemma~\ref{prop:effective demand3}: The result is immediately obtained from Lemmas~\ref{prop:effective demand2} and \ref{prop:initial inventory}. \hfill $\square$

Using Property~\ref{prop:fsd} and Lemma~\ref{prop:effective demand3}, we can bound the externality term and obtain Proposition~\ref{lem:external cost}.

\noindent Proof of Proposition~\ref{lem:external cost}: To prove this property, we rewrite the partial derivative with the expression using a positive infinitesimal change $\delta_{q_c}$: $\partial f_{D^m(\mathbf{X}^{q_c})}(t)/\partial q_c=[f_{D^m(\mathbf{X}^{q_c+\delta_{q_c}})}(t) -f_{D^m(\mathbf{X}^{q_c})}(t)] /\delta_{q_c}$.

First part ($w_{ex}(q_c) \le 0$): Changing the order of two integrations and the partial derivative in Eq.~\eqref{eq:marginal external cost2}, we obtain
\begin{align*}
w_{ex}(q_c) &=\int_{0}^{q_c}(q_c -t) \dfrac{\partial \int_\Omega f_{D^m(\mathbf{k})}(t) f_{\mathbf{X}}^{q_c}(\mathbf{k})d\mathbf{k}}{\partial q_c} dt =\int_{0}^{q_c}(q_c -t) \dfrac{\partial f_{D^m(\mathbf{X}^{q_c})}(t)}{\partial q_c} dt \nonumber \\
&=\dfrac{\int_{0}^{q_c}(q_c -t)f_{D^m(\mathbf{X}^{q_c+\delta_{q_c}})}(t)dt - \int_{0}^{q_c}(q_c -t)f_{D^m(\mathbf{X}^{q_c})}(t)dt}{\delta_{q_c}} \nonumber \\
&=- \left( \dfrac{-\mathbb E[q_c-D^m(\mathbf{X}^{q_c+\delta_{q_c}})]^+ + \mathbb E[q_c-D^m(\mathbf{X}^{q_c})]^+}{\delta_{q_c}} \right)\le 0,
\end{align*}
where we apply Property~\ref{prop:fsd} and Lemma~\ref{prop:effective demand3} to $-[q_c-x]^+$, which is a non-decreasing function of $x$.

Second part ($w_{ex}(q_c) > -1$): Since $[q_c - D^m(\mathbf{x})]^+$ represents the amount of wastage, $\mathbb E[q_c-D^m(\mathbf{X}^{q_c})]^+ = \mathbb E[X_1^{q_c}-D]^+$ should hold. Also, under the assumption $f_D(d)>0,\forall d \ge0$, $F_{D^m(\mathbf{X}^{q_c})}(q_c) <1$ for a finite $q_c$. Using these properties, we obtain
\begin{align*}
w_{ex}(q_c) &=\int_{0}^{q_c}(q_c -t) \dfrac{\partial f_{D^m(\mathbf{X}^{q_c})}(t)}{\partial q_c} dt =\dfrac{\partial \int_{0}^{q_c}(q_c -t)f_{D^m(\mathbf{X}^{q_c})}(t)dt}{\partial q_c}-\int_{0}^{q_c} f_{D^m(\mathbf{X}^{q_c})}(t) dt\nonumber \\
&=\dfrac{\partial \mathbb E[q_c-D^m(\mathbf{X}^{q_c})]^+}{\partial {q_c}}-F_{D^m(\mathbf{X}^{q_c})}(q_c)=\dfrac{\partial \mathbb E[X_1^{q_c}-D]^+}{\partial {q_c}}-F_{D^m(\mathbf{X}^{q_c})}(q_c) \nonumber \\
&=\dfrac{\mathbb E[X_1^{q_c+\delta_{q_c}}-D]^+ - \mathbb E[X_1^{q_c}-D]^+}{\delta_{q_c}}-F_{D^m(\mathbf{X}^{q_c})}(q_c) >-1,
\end{align*}
where we apply Property~\ref{prop:fsd} and Lemma~\ref{prop:initial inventory} to $\mathbb E[x-D]^+$, which is a non-decreasing function of $x$. \hfill $\square$

\section{Proof of Proposition~\ref{thm:existence}}
We continue to assume (as in \S\ref{sec:analysis}) $h \geq 0$, $r-c>0$, $\theta+c>0$, and continuous $F_D (d)$ for $d \in [0,+\infty)$. Proposition~\ref{thm:existence} follows from Proposition~\ref{lem:external cost}.

\noindent Proof of Proposition~\ref{thm:existence}: Let $g_{\mathbf{x}}(q) \doteq (\theta+c) F_{D^m(\mathbf{x})}(q)-(h+r-c)\bar{F}_D(q)+h+(\theta+c) w_{ex}(q^{\ast}_c)$, where $q^{\ast}_c$ is independent of $q$. Observe that $g_{\mathbf{x}}(q)$ is an increasing function with respect to $q$ as ${\partial g_{\mathbf{x}}(q)}/{\partial q}=(\theta+c)f_{D^m(\mathbf{x})}(q)+(h+r-c)f_D(q) > 0$. Also, using Proposition~\ref{lem:external cost}, $g_{\mathbf{x}}(0) =-(r-c)+(\theta+c)w_{ex}(q^{\ast}_c)<0$. Finally there always exists a finite $\hat{q}$ satisfying $F_{D^m(\mathbf{x})}(\hat{q})~>~1-\hat{\delta}$, where $\hat{\delta} = {(\theta+c)(1+w_{ex}(q^{\ast}_c))}/{(h+r+\theta)} \in (0,1)$. Such $\hat{q}$ also satisfies $F_{D}(\hat{q})~>~1-\hat{\delta}$ (or equivalently, $\bar{F}_D(\hat{q})<\hat{\delta}$) since $D^m(\mathbf{x}) \succeq_{FSD} D$ (see Definitions \ref{def:effective demand} and \ref{def:def2}). Using Proposition~\ref{lem:external cost} and $\hat{\delta}$ defined above, this $\hat{q}$ satisfies
\begin{align*}
g_{\mathbf{x}}(\hat{q}) &=(\theta+c) F_{D^m(\mathbf{x})}(\hat{q})-(h+r-c)\bar{F}_D(\hat{q})+h+(\theta+c) w_{ex}(q^{\ast}_c)\\
&>(\theta+c)(1-\hat{\delta})-(h+r-c)\hat{\delta}+h+(\theta+c) w_{ex}(q^{\ast}_c) \\
&=(\theta+c)(1+w_{ex}(q^{\ast}_c))-(h+\theta+r)\hat{\delta}+h =h\ge 0.
\end{align*}
Since $g_{\mathbf{x}}(q)$ is monotonic, we can conclude that there exists a unique and finite solution $q_h^\ast(\mathbf{x}) \in (0,1)$ that satisfies $g_{\mathbf{x}}(q)=0$ (and hence the optimality condition \eqref{eq:optimality3}) for any initial inventory vector $\mathbf{x} \in \Omega$. \hfill $\square$

Finally, we present a corollary of Proposition~\ref{thm:existence}, which is necessary when we prove Proposition~\ref{thm:CBS condition}.
\begin{corollary}
\label{cor:same q same F}
Consider two initial inventory vectors $\mathbf{x_1},\mathbf{x_2} \in \Omega$, where $\mathbf{x_1} \ne \mathbf{x_2}$. Then $$|q_h^{\ast}(\mathbf{x_1}) - q_h^{\ast}(\mathbf{x_2})| \to 0 \iff |F_{D^m(\mathbf{x_1})}(q_h^{\ast}(\mathbf{x_1})) - F_{D^m(\mathbf{x_2})}(q_h^{\ast}(\mathbf{x_2}))| \to 0.$$
\end{corollary}
\noindent Proof of Corollary~\ref{cor:same q same F}: Since the solution to Eq.~\eqref{eq:optimality3} is unique and finite (Proposition~\ref{thm:existence}), we can write two optimality equations corresponding to initial inventory vectors $\mathbf{x_1}$ and $\mathbf{x_2}$. Note that $w_{ex}(q^{\ast}_c)$ in Eq.~\eqref{eq:optimality3} does not depend on $\mathbf{x}$. By subtracting one from the other, we obtain
$$(\theta+c) (F_{D^m(\mathbf{x_1})}(q_h^{\ast}(\mathbf{x_1})) - F_{D^m(\mathbf{x_2})}(q_h^{\ast}(\mathbf{x_2})))=(h+r-c) (\bar{F}_D(q_h^{\ast}(\mathbf{x_1})) - \bar{F}_D(q_h^{\ast}(\mathbf{x_2}))).$$
The result follows from the assumptions $\theta+c>0$, $h+r-c>0$, and continuous $F_D (d)$ for $d \in [0,+\infty)$. \hfill $\square$

\section{Proofs of Proposition~\ref{bound}, Proposition~\ref{thm:CBS condition}, and Corollaries \ref{cor:cor2} and \ref{minimum lifetime}}
We first show the relationship between two solutions with different initial inventory levels (Lemma~\ref{prop:prop2}), from which we can determine the upper and lower bounds of the solution (Proposition~\ref{bound}). If the gap between the upper and lower bounds shrinks, a state-dependent policy should approach CBS. The condition to make the gap shrink is provided in Proposition~\ref{thm:CBS condition}.
\begin{lemma}
\label{prop:prop2}
$q_h^{\ast}(\mathbf{x_1}) \geq q_h^{\ast}(\mathbf{x_2})$ and $F_{D^m(\mathbf{x_1})}(q_h^{\ast}(\mathbf{x_1})) \leq F_{D^m(\mathbf{x_2})}(q_h^{\ast}(\mathbf{x_2}))$ if $\mathbf{x_1} \ge \mathbf{x_2}$ componentwise.
\end{lemma}
\noindent Proof of Lemma~\ref{prop:prop2}: As in the proof of Proposition~\ref{thm:existence}, we define $g_{\mathbf{x}}(q) \doteq (\theta+c) F_{D^m(\mathbf{x})}(q)-(h+r-c)\bar{F}_D(q)+h+(\theta+c) w_{ex}(q^{\ast}_c)$.  This $g_{\mathbf{x}}(q)$ is an increasing function with respect to $q$. Now, let $q_h^{\ast}(\mathbf{x_1})$ and $q_h^{\ast}(\mathbf{x_2})$ be the unique, finite solutions to $g_{\mathbf{x_1}}(q)=0$ and $g_{\mathbf{x_2}}(q)=0$, respectively. Since $\mathbf{x_1} \ge \mathbf{x_2}$ componentwise $\Longrightarrow D^m (\mathbf{x_1}) \succeq_{FSD} D^m (\mathbf{x_2})$ (Lemma~\ref{prop:effective demand1}) $\iff F_{D^m (\mathbf{x_1})}(q) \leq F_{D^m (\mathbf{x_2})}(q)$, $\forall q \in \mathbb{R}$ (Definition \ref{def:def2}), it follows that $g_{\mathbf{x_1}}(q) \leq g_{\mathbf{x_2}}(q), \forall q \in \mathbb{R}$. In particular, at $q=q_h^{\ast}(\mathbf{x_2})$, we obtain $g_{\mathbf{x_1}}(q_h^{\ast}(\mathbf{x_2})) \leq g_{\mathbf{x_2}}(q_h^{\ast}(\mathbf{x_2})) =0$, which implies $q_h^{\ast}(\mathbf{x_1}) \geq q_h^{\ast}(\mathbf{x_2})$. Furthermore, $q_h^{\ast}(\mathbf{x_1}) \geq q_h^{\ast}(\mathbf{x_2})$ implies $\bar{F}_D(q_h^{\ast}(\mathbf{x_1})) \leq \bar{F}_D(q_h^{\ast}(\mathbf{x_2}))$ because $\bar{F}_D(q)$ is a decreasing function of $q$. Combining this result with Eq.~\eqref{eq:optimality3}, we obtain $F_{D^m(\mathbf{x_1})}(q_h^{\ast}(\mathbf{x_1})) \leq F_{D^m(\mathbf{x_2})}(q_h^{\ast}(\mathbf{x_2}))$. \hfill $\square$

\noindent Proof of Proposition~\ref{bound}: From Lemma~\ref{prop:prop2}, we have $q_h^{\ast}(\mathbf{0}) \leq q_h^{\ast}(\mathbf{x}) \leq q_h^{\ast}(\mathbf{y})$ and $F_{D^m(\mathbf{0})}(q_h^{\ast}(\mathbf{0})) \geq F_{D^m(\mathbf{x})}(q_h^{\ast}(\mathbf{x})), \forall \mathbf{y} \ge \mathbf{x} (\in \Omega)$ componentwise. We obtain the result by taking the limit of a large initial inventory $\mathbf{y}$ and denoting $D^m=D^m(\mathbf{0})$, $q^\dagger=q_h^{\ast}(\mathbf{0})$, and $q^{\ddagger}=\lim_{v \to \infty} q_h^{\ast}(\mathbf{y})$, where $v$ is the smallest component in the initial inventory vector $\mathbf{y}$.  \hfill $\square$

\noindent Proof of Proposition~\ref{thm:CBS condition}: We split the proof in three parts:

\noindent (First part: $F_{D^m}(q^{\dagger}) \to 0 \implies |q^{\ddagger} - q^{\dagger}| \to 0$) Using Proposition~\ref{bound}, $F_{D^m}(q^{\dagger}) \to 0 \implies F_{D^m(\mathbf{x})}(q_h^{\ast}(\mathbf{x})) \to 0, \forall \mathbf{x} \in \Omega$. Since $F_{D^m(\mathbf{x})}(q_h^{\ast}(\mathbf{x}))$ converges to the same value (0) for any initial inventory vector $\mathbf{x}$, using Corollary~\ref{cor:same q same F}, we can conclude $|q^{\ddagger} - q^{\dagger}| \to 0$.

\noindent (Second part: $|q^{\ddagger} - q^{\dagger}| \to 0 \implies q_h^{\ast}(\mathbf{x}) \to q_c^{\ast}, \forall \mathbf{x} \in \Omega_r$) This part is trivial because $\Omega_r \subseteq \Omega$.

\noindent (Third part: $q_h^{\ast}(\mathbf{x}) \to q_c^{\ast}, \forall \mathbf{x} \in \Omega_r \implies F_{D^m}(q^{\dagger}) \to 0$) Consider two initial inventory vectors: $\mathbf{x_1}=\mathbf{0}$ and $\mathbf{x_2}=(q^\dagger,0,\dots,0)$; $\mathbf{x_2}$ represents $q^\dagger (= q_h^{\ast}(\mathbf{0}) = q_h^{\ast}(\mathbf{x_1}))$ units of initial inventory with remaining life of $m-1$ periods. Note that $\mathbf{x_1} \ne \mathbf{x_2}$ and both $\mathbf{x_1},\mathbf{x_2} \in \Omega_r$ because we assume that $D$ can take 0 and any large amount. Note also that from Lemma~\ref{prop:convolution formula}, we know $F_{D^m(\mathbf{x_2})}(q^\dagger)=0$. (This is intuitively obvious: $D^m(\mathbf{x_2})$ is the total outflow (through demand and wastage) from periods 1 to $m$ (excluding the wastage in period $m$) when the initial inventory is $\mathbf{x_2}$. Hence, the support of its CDF is bounded below by $q^\dagger$.) Now, suppose $q_h^{\ast}(\mathbf{x}) \to q_c^{\ast}, \forall \mathbf{x} \in \Omega_r$, then $q_h^{\ast}(\mathbf{x_2}) \to q_h^{\ast}(\mathbf{x_1}) = q^\dagger$, from which we obtain $F_{D^m}(q^{\dagger})=F_{D^m(\mathbf{x_1})}(q_h^{\ast}(\mathbf{x_1})) \to F_{D^m(\mathbf{x_2})}(q_h^{\ast}(\mathbf{x_2})) \to F_{D^m(\mathbf{x_2})}(q^\dagger)=0$ with the help of Corollary~\ref{cor:same q same F}. \hfill $\square$

To prove Corollaries~\ref{cor:cor2} and \ref{minimum lifetime}, we define a critical ratio $\gamma^{\ast}=\dfrac{r-c}{h+r-c}$, which is used to determine the optimal service level when $q_h^{\ast}$ becomes CBS.

\noindent Proof of Corollary~\ref{cor:cor2}: Using Proposition~\ref{bound}, $F_{D^m}(q^{\dagger}) \to 0 \implies F_{D^m(\mathbf{x})}(q_h^{\ast}(\mathbf{x})) \to 0, \forall \mathbf{x} \in \Omega \implies f_{D^m(\mathbf{x})}(q) \to 0, \forall q \in[0,q_h^{\ast}(\mathbf{x})], \forall \mathbf{x} \in \Omega \implies n_{w}(q_h^{\ast})=E_{D^m(\mathbf{X})}[q_h^{\ast}-D^m(\mathbf{X})]^+ \to 0$, where $n_w(q)$ is defined in Eq.~\eqref{eq:expected total cost2}. Furthermore, Proposition~\ref{thm:CBS condition} implies $F_{D^m}(q^{\dagger}) \to 0 \implies f_{D^m(\mathbf{x})}(q) \to 0, \forall q \in[0,q_c^{\ast}], \forall \mathbf{x} \in \Omega_r \implies w_{ex}(q_c^{\ast}) \to 0$, where $w_{ex}(q_c)$ is defined in Eq.~\eqref{eq:marginal external cost2}. Lastly, in the limit of $F_{D^m(\mathbf{x})}(q_h^{\ast}(\mathbf{x})) \to 0$ and $w_{ex}(q_c^{\ast}) \to 0$ in Eq.~\eqref{eq:optimality3}, we obtain a revised optimality condition $(h+r-c)\bar{F}_{D}(q)=h$, which provides a solution $q_h^{\ast}=q_c^{\ast}=F^{-1}_D\Big(\dfrac{r-c}{h+r-c}\Big)=F^{-1}_D(\gamma^\ast)$. For the solution $q_c^{\ast}$ to be finite, we require $h>0$ (note: $r-c>0$ is assumed). \hfill $\square$

\noindent Proof of Corollary~\ref{minimum lifetime}: Corollary~\ref{cor:cor2} implies that the condition to make $q_h^{\ast}$ approach CBS is $F_{D^m}(F^{-1}_D(\gamma^{\ast})) \to 0$. Using a predetermined threshold $\alpha>0$, we can rewrite this condition as $F_{D^m}(F^{-1}_D(\gamma^{\ast})) \le \alpha$. The exact $F_{D^m}(\cdot)$ may be approximated by a much simpler function if we can apply the Central Limit Theorem: the Normal CDF $\Phi^m(\cdot)$ representing the CDF of the sum of $m$ demands. Then, the condition becomes $\Phi^m(F^{-1}_D(\gamma^{\ast})) \le \alpha$. \hfill $\square$

\section{Extension to the Positive Lead Time Case}
\label{sec: positiveLeadTime}
The model with positive lead time is a natural extension of the Nahmias model with zero lead time, but it is hard to analyze using the DP approach because of the large state space involved (\emph{curse of dimensionality}). As far as we know, no effective heuristic policy has been proposed for the lost-sales perishable inventory model with positive lead time.

\iffalse
\textcolor{red}{The extension of the Nahmias model to the positive lead time case makes the exact analysis of perishable models even more challenging, and the computations based on DP often become intractable, which is the problem known as \emph{curse of dimensionality}. \citet{chen2014coordinating} reveal the characteristics of the structure of the optimal policies for a general class of perishable inventory systems with positive lead time; however, very few heuristic methods have been proposed to analyze the positive lead time case except for a simple CBS policy and its variations. Among a few heuristic methods, \cite{sun2014quadratic} develop heuristic methods for lost sales non-perishable models and back-order perishable models based on Approximate Dynamic Programming via Linear Programming (ADP-LP); \citealt{chao2018approximation} develop a heuristic method based on the proportional-balancing policy to analyze perishable systems with positive lead time, finite ordering capacity, and backlogging. However, as far as we know, no effective heuristic policy for perishable systems with both lost sales and positive lead time has been proposed. As Karaesmen et al. (2011) note, the development of positive lead time heuristics, no matter what their genesis, would prove valuable both practically and theoretically. We think our heuristic method is the first to solve perishable systems with both lost sales and positive lead time. To show the effectiveness of our approach, we derive an approximate optimality condition for the positive lead time case, which is almost identical to the condition for the Nahmias model, obtain the order amounts using a spreadsheet, and compare the performance with the CBS policy.}
\fi

In this analysis, we assume a fixed integer lead time $\ell$, which could be zero (the Nahmias model) or positive. Other parameters and conditions remain the same as the Nahmias model, which assumes lost sales, fixed product lifetime ($m$), i.i.d. demand, FIFO policy, and fixed cost parameters: unit purchase cost ($c$), unit holding cost ($h$), unit shortage cost ($r$), and unit wastage cost ($\theta$). We continue to set the unit purchase cost $c=0$ by adjusting $r$ and $\theta$ appropriately as we did in the Nahmias model. Note that $m$ is the lifetime of the product when we make an order; hence, the life of the product right after the delivery is $m-\ell$ periods due to the $\ell$-period lead time. Since the remaining product life must be at least one period when delivered, we require a lead time $\ell$ to satisfy the condition $0 \le \ell \le m-1$.

To find the marginal analysis condition for the positive lead time case, we need to reevaluate the expected one-period cost $L(q,x)$. We follow the same argument made in \S\ref{sec: MIC} and revise Eq.~\eqref{eq:total cost given initial inventory} used in the Nahmias model. As before, we consider a single ordering decision at period 1 and evaluate the associated costs for the lifetime ($m$ periods) of this new order. For the $\ell$ lead time case, holding and shortage costs are incurred in period $\ell+1$ (rather than period 1 for the zero lead time case) and wastage cost is incurred in period $m$ (which is the same as the zero lead time case). Corresponding to this change, the number of units holding and in shortage in Eq.~\eqref{eq:total cost given initial inventory} are characterized by the $\ell+1$-period effective demand ($D^{\ell+1}(\mathbf{x}^{\ell})$) rather than the one-period effective demand ($D^1 =D$), while the number of units in wastage in Eq.~\eqref{eq:total cost given initial inventory} does not change its representation since the product lifetime does not change; thus we obtain the following approximate optimality condition for the positive lead time case.
\begin{align}
(\theta + c) F_{D^m (\mathbf{x})}(q) = (h+r-c) \bar{F}_{D^{\ell+1}(\mathbf{x}^{\ell})}(q) - h - V_{ex}(q^{\ast}_c),
\label{eq:positive lead time}
\end{align}
where $q^{\ast}_c$ is the optimal CBS policy for the model. (See Appendix~\ref{sec: positive lead time} for the derivation and additional assumptions.) Eq.~\eqref{eq:positive lead time} is reduced to Eq.~\eqref{eq:optimality3} by setting $\ell=0$; hence, Eq.~\eqref{eq:positive lead time} is the approximate optimality condition for a perishable inventory model with lost sales and lead time $\ell$, which can take either 0 (the Nahmias model) or a positive integer. The computational cost to solve Eq.~\eqref{eq:positive lead time} depends on the product lifetime $m$, not on the lead time $\ell$, because $F_{D^{\ell+1}}(\cdot)$ is obtained in the process of obtaining $F_{D^m}(\cdot)$ using Lemma~\ref{prop:convolution formula} (note that $\ell+1 \le m$).

\section{Derivation of the Marginal Analysis Condition \eqref{eq:positive lead time}}
\label{sec: positive lead time}
We use $x_i$, the same symbol as the Nahmias model, to represent the number of products with a remaining life of $i$. Since the product lifetime is $m$, in each period, there exist products with at most $m$ different remaining lives: $x_1, x_2, x_3, .., x_m$. (For example, $x_m$ represents the number of products which are just ordered and thus have full $m$ periods of life remaining.) However, not all of these are held on hand at the beginning of each period; only $m-\ell$ kinds of products $(x_1, x_2, …, x_{m-\ell})$ are on hand and the remaining $\ell$ kinds of products $(x_{m-\ell+1}, …, x_m)$ are pipeline inventory. As before, we define an ordering policy $q$ as the order-up-to level $q=\sum_{i=1}^m x_i$. The optimal order-up-to level $q^\ast$ that minimizes the average periodic operational cost is a nonlinear function of $\mathbf{x}=\mathbf{x}^{m-1}=(x_1,x_2,…,x_{m-1})$; hence, $q^\ast=q^\ast(\mathbf{x})$. Since we cannot derive the exact analytical expression for $q^\ast$, we start from an initial policy $q^\ast_c$ (the optimal CBS policy; our $0^{th}$ order approximation) and obtain an accurate heuristic state-dependent policy $q^\ast_h(\mathbf{x})$.

Now, consider ordering $x_m (\ge 0)$ new products following the policy $q$ based on all on-hand and pipeline inventories $\mathbf{x}=(x_1, …, x_{m-1})$ at the beginning of period 1. This new order arrives at the beginning of period $\ell+1$ due to the lead time $\ell$. The unused portion of this new order perishes at the end of period $m$. As in the Nahmias model, we evaluate the shortage and holding costs when the new order arrives (in period $\ell+1$) and evaluate the wastage cost when the unused portion of the new order perishes (in period $m$). To simplify the analysis of the positive lead time case, we assume that the shortage is small before the new order arrives (from periods 1 to $\ell$). Under this assumption, we can approximate that the total outflow (through demand and wastage) from periods 1 to $i$ (excluding the wastage in period $i$) is represented by the $i$-period effective demand $D^i(\mathbf{x}^{i-1})$ defined in Definition \ref{def:effective demand} as in the Nahmias model. This is an approximation and does not hold for small $\mathbf{x}$, but is justified because $\mathbf{x}$, which we observe under the optimal (or approximate optimal) policy for the positive lead time case, is large enough to make the shortage small. In other words, we can safely ignore the small $\mathbf{x}$ case without sacrificing the accuracy of our heuristic method because the small $\mathbf{x}$ case that incurs a large shortage seldom occurs under the optimal (or approximate optimal) policy. We confirmed this implication by observing the initial inventory distribution under our heuristic policy in our numerical experiments.

We summarize the major events throughout the product lifetime (from periods 1 to $m$) as follows.\\
\emph{Period 1}: At the beginning of this period, we receive $x_{m-\ell}$ products ordered $\ell$ periods ago and make a new order $x_m$ to satisfy the order-up-to level $q (=\sum_{i=1}^{m} x_i)$, based on the on-hand inventory $(x_1, …, x_{m-\ell})$ and the pipeline inventory $(x_{m-\ell+1}, …, x_{m-1})$. Throughout this period, we observe demand $D_1$. At the end of this period, $R_1$ (the unused portion of $x_1$) perishes.\\
\emph{Period 2}: At the beginning of this period, we receive $x_{m-\ell+1}$ products ordered $\ell$ periods ago. Throughout this period, we observe demand $D_2$. At the end of this period, $R_2$ (the unused portion of $x_2$) perishes.\\
$\vdots$\\
\emph{Period $\ell+1$}: At the beginning of this period, we receive $x_m$ products ordered in period 1. Throughout this period, we observe demand $D_{\ell+1}$. At the end of this period, $R_{\ell+1}$ (the unused portion of $x_{\ell+1}$) perishes. Now, we evaluate the number of units holding and in shortage for this period. Notice that the total number of products we hold at the beginning of period 1 and receive from periods 2 to $\ell+1$ is, by definition, the order-up-to level $q$. Notice also that the total outflow from periods 1 to $\ell+1$ (excluding the wastage in period $\ell+1$) is the effective demand $D^{\ell+1}(\mathbf{x}^{\ell}) = D_1+R_1+D_2+R_2+ … +R_{\ell}+D_{\ell+1}$, where we neglect the shortage from periods 1 to $\ell$ under the assumption that the shortage is small before the new order arrives. Therefore, at the end of period $\ell+1$, the expected number of units holding and in shortage are $\mathbb{E}[q - D^{\ell+1}(\mathbf{x}^{\ell})]^+$ and $\mathbb{E}[D^{\ell+1}(\mathbf{x}^{\ell}) - q]^+$, respectively.\\
$\vdots$\\
\emph{Period $m$}: Throughout this period, we observe demand $D_{m}$. At the end of this period, the unused portion of $x_m$, which is $[q-D^m(\mathbf{x})]^+$, perishes. Hence, the expected wastage is $\mathbb{E}[q - D^{m}(\mathbf{x})]^+$.\\
In summary, at the beginning of period 1, we make a new order of $x_m (= q-\sum_{i=1}^{m-1} x_i)$; at the end of period $\ell+1$, we hold on average $\mathbb{E}[q - D^{\ell+1}(\mathbf{x}^{\ell})]^+$ and have a shortage on average $\mathbb{E}[D^{\ell+1}(\mathbf{x}^{\ell}) - q]^+$; at the end of period $m$, we waste on average $\mathbb{E}[q - D^{m}(\mathbf{x}) ]^+$. Hence, the revised approximate optimality condition for the positive lead time case becomes $$(\theta + c) F_{D^m(\mathbf{x})}(q) = (h+r-c) \bar{F}_{D^{\ell+1}(\mathbf{x}^{\ell})}(q) - h - V_{ex}(q^{\ast}_c),$$ where $q^{\ast}_c$ is the optimal CBS policy.

\iffalse
\subsection{Numerical Experiments for the Positive Lead Time Case}
To assess the accuracy of the approximate policy with positive $\ell$ based on Eq.~\eqref{eq:positive lead time}, we conduct numerical experiments for perishable inventory models with $m=3$, $\ell=1$, and Poisson demand with mean 10. Model parameters are chosen from $h \in (0,1)$, $r \in (5,8,10)$, and $\theta \in (5,7,10,20)$. We compare the performance of our approximate ordering policies with the optimal CBS policy and summarize the results in Table \ref{table:experiments2}. The performance indicator is the percentage cost deviation: $\Delta'=({L_h^{\ast}-L_c^{\ast}})/{L_c^{\ast}},$ where $L_h^{\ast}$ and $L_c^{\ast}$ correspond to the average periodic cost $L(q)$ following our approximate policy $q_h^{\ast}$ and the optimal CBS policy, respectively. Here, a negative indicator ($\Delta'<0$) shows a reduction of the average cost and hence indicates a cost improvement of our approximate policy over the optimal CBS policy. Table \ref{table:experiments2} shows that the average performance improvement is 4.50\% when holding cost $h=0$, while 0.38\% when $h=1$; the average improvement is 2.44\% for all ten instances. The performance improvement is smaller for the $h=1$ case possibly due to the proximity of the optimal CBS policy to the optimal policy when $h$ is larger (which is true for the zero lead time case). However, we have not conducted such a comparison in this paper, and it will be a topic for the future work.
\OneAndAHalfSpacedXI
\begin{table}[]
\caption{Average Periodic Operational Costs Following CBS and the Approximate Policy.}
\centering
\small
\begin{tabular}{  l  c  c  c  c  l  c  c  c  c  }
\hline
	$h, r, \theta$ & CBS & Approx & $\Delta'$ &   &$h, r, \theta$ & CBS & Approx & $\Delta'$ &   \\\hline
	0, 5, 5 & 2.6977 & 2.5933 & -3.87\% &  & 1, 5, 5 & 6.9429 & 6.9501 & 0.10\% &  \\
	0, 5, 10 & 3.8592 & 3.7494 & -2.84\% &  & 1, 5, 10 & 7.4459 & 7.3520 & -1.26\% &   \\
	0, 5, 20 & 5.2551 & 4.9945 & -4.96\% &  & 1, 5, 20 & 8.1936 & 8.2210 & 0.33\% &   \\
	0, 8, 7 & 4.0280 & 3.8209 & -5.14\% &  & 1, 8, 7 & 8.7323 & 8.7357 & 0.04\% &   \\
	0, 10, 5 & 3.6735 & 3.4645 & -5.69\% &  & 1, 10, 5 & 9.0782 & 8.9757 & -1.13\% &  \\ \hline
	\multicolumn{2}{l}{Average $\Delta'$}  &  & -4.50\% &  &  &  &  & -0.38\% &   \\ \hline
\end{tabular}
\label{table:experiments2}
\\Note: Results are obtained using $10^6$-period Monte Carlo simulation with $10^4$ burn-in periods.
\end{table}
\fi

config: arxiv

file: 2006.06912/Margina Analysis of Perishable Inventory Models for arXiv June 11 2020/Marginal_Analysis_of_Perishable_Inventory_Models_for_arXiv_June_11_2020.tex


TITLE: Prove closed disc $D^n$ is homeomorphic to the cone $CS^{n-1}$
QUESTION [4 upvotes]: I need to find a continuous surjective map from $D^n$ to $CS^{n-1}$.

For 2 dimensions, we can use $$f: S^1 \times I /S^{1} \times \{1\} \rightarrow D^2$$ with $f(\theta,t) = (1-t)e^{i \theta}$ which is continuous and surjective.
But how can I generalise this to n dimensions.

REPLY [6 votes]: Let's fix some notations:
$$D^n = \{ (x_1, \dots, x_n) \in \mathbb{R}^n \mid x_1^2 + \dots + x_n^2 \le 1 \}$$
$$S^{n-1} = \partial D^n = \{ (x_1, \dots, x_n) \in \mathbb{R}^n \mid x_1^2 + \dots + x_n^2 = 1 \}$$
and the cone $CX$ of a space $X$ is given by $(X \times I) / (X \times \{1\})$.
So first let's define $f : S^{n-1} \times I \to D^n$; it will be exactly like your map $(1-t)e^{i\theta}$, except it will work for all dimensions. Let
\begin{align}
f : S^{n-1} \times I & \to D^n \\
(x_1, \dots, x_n, t) & \mapsto ((1-t)x_1, \dots, (1-t)x_n)
\end{align}
Now clearly if $\sum_i x_i^2 = 1$, then $\sum_i ((1-t)x_i)^2 = (1-t)^2 \sum_i x_i \le 1$ (because $0 \le (1-t)^2 \le 1$). Polynomials are continuous, so $f$ is continuous. And if $(y_1, \dots, y_n) \in D^n$, let $t = 1 - \sqrt{y_1^2 + \dots + y_n^2}$, and $x_i = y_i / \sqrt{(y_1^2 + \dots + y_n^2)}$. Then $f(x_1, \dots, x_n, t) = (y_1, \dots, y_n)$, so $f$ is surjective.
It is rather easy to check that
$$f(x_1, \dots, x_n, t) = f(y_1, \dots, y_n, s) \iff t = s = 1 \text{ or }(t = s \text{ and } (x_1, \dots, x_n) = (y_1, \dots, y_n))$$
So we have first that $f$ factors through the quotient $CS^{n-1} = (S^{n-1} \times I) / (S^{n-1} \times \{1\})$, because $f(x_1, \dots, x_n, 1) = f(y_1, \dots, y_n, 1)$ for all $x_i, y_i$. And secondly, the induced map $g : CS^{n-1} \to D^n$ is injective, because there were no other possibilities for two different elements of the domain to map to the same point in $D^n$.
So finally we get a bijective, continuous map $g : CS^{n-1} \to D^n$. Since $CS^{n-1}$ is compact and $D^n$ is Hausdorff, this is a homeomorphism.


TITLE: Real analysis reference for statistician
QUESTION [0 upvotes]: I'm a undergraduate statistics student, I think that learn Real Analysis can be useful to me in some points, can anyone suggest a introductory book for self-study ?
I'm already multivariate calculus, algebra linear, and others math courses.
Someone said to me to start with Analysis: With an Introduction to Proof  and then move to By Walter Rudin The Principles of Mathematical Analysis. Is that a good idea, or I shoud start directly with Rudin?

REPLY [1 votes]: The standard undergraduate text for real analysis is Rudin's Principles of Mathematical Analysis (affectionately referred to as "Baby Rudin" since he wrote it when he was quite young).
Another text I enjoyed was Serge Lang's Undergraduate Analysis.
I think they're both have their pros and cons but are ultimately both fine books for first learning some rudimentary real analysis.


TITLE: $\sum\limits_{n=0}^{1000000}\binom{2000000}{2n}\cdot{p}^{2n}\cdot(1-p)^{2000000-2n}$
QUESTION [0 upvotes]: $\sum\limits_{n=0}^{1000000}\binom{2000000}{2n}\cdot{p}^{2n}\cdot(1-p)^{2000000-2n}$
How can I go about finding the above sum?
Thank you.

REPLY [1 votes]: $$2\sum_{n=0}^{[r/2]}\binom r{2n}a^{2n}b^{r-2n}=(a+b)^r+(a-b)^r$$


TITLE: Is this complex integral well solved?
QUESTION [0 upvotes]: I have this exercise:

$$\int_{|z|=1}\frac{\cos z}{z^3}dz$$

The way I tried to solve it was:

Since we have a singularity in $0$, and it is inside of the curve, lets consider the new curve: $|z|=1/2$, then by the deformation theorem and Cauchy's integral formulas, we get that:
  $$\int_{|z|=1}\frac{\cos z}{z^3}dz=\int_{|z|=\frac 12}\frac{\cos z}{z^3}dz=2\pi i(-\cos (0))=-2\pi i$$

Is this correct? I think I followed all the hypothesis correctly, but this puzzles me, since $0$ is still inside the circle.

REPLY [0 votes]: Theorem.$^1$ If $f$ is analytic inside and on the simple closed positively oriented contour $\Gamma$ and if $z$ is any point inside $\Gamma$, then
  $$
f^{(n)}(z)=\frac{n!}{2\pi i}\int_{\Gamma}\frac{f(\zeta)}{(\zeta-z)^{n+1}}d\zeta\quad(n=1,2,3,\dots).
$$

By the theorem stated above, we get
$$
\int_{|z|=1}\frac{\cos z}{z^3}dz = \frac{2\pi i}{2!}(-\cos 0)=-\pi i.
$$
Also, the deformation theorem is not needed as Daniel Fischer commented.

$^1$ Fundamentals of Complex Analysis: with Applications to Engineering and Science, page 211


TITLE: $\deg(fg) \leq \deg(f)+\deg(g)$
QUESTION [0 upvotes]: I'm trying to give a formal proof for the fact that given a commutative ring with one $R$, any pair of elements of the polynomial ring in $n>1$ variables $f, g \in R[X_1,\ldots,X_n]=\{ f :
\mathbb{N}^n \to R \mid f(s_1,\ldots,s_n) \neq 0 \text{ only for a finite number of $n$-tuples }  (s_1,\ldots,s_n) \in \mathbb{N}^n\}$ satisfies that $\deg(fg) \leq \deg(f)+\deg(g)$ where $\deg(f) = \max(\{ s_1+\cdots+s_n \in \mathbb{N} \mid f(s_1,\ldots,s_n) \neq 0 \})$
The main problem that I find to generalize the idea in one variable is that the degree is natural number but $f$ and $g$ take a $n$-tuple as argument so this makes a lot harder to calculate $fg$. I would appreciate any help

REPLY [1 votes]: Show the claim for monomials
Show that $\deg(f+g)\le \max\{\deg f,\deg g\}$
Conclude


TITLE: Show $|f(0)| \le e$ for holomorphic function satisfying $ |f(e^{i\pi t})|\leq e^{t}$
QUESTION [4 upvotes]: Let f be a holomorphic function on the closed unit disk such that :
$$ | f(e^{i\pi t})| \leq e^{t}, \forall t \in [0,2] \, .$$
Show that $$ | f(0)| \leq e \, .$$
I tried to use this relation to use the average value of $f$ in $0$
$$ f(0)=\frac{1}{2\pi}\int_{0}^{2\pi}f(e^{it})dt= \frac{1}{2}\int_{0}^{2}f(e^{i\pi t})dt$$
so $$ | f(0)| \leq \frac{e^2-1}{2}$$ which is far from the desired inequality.

REPLY [5 votes]: The function
$$
 g(z) = f(z) \cdot \overline{f(\bar z)}
$$
is holomorphic in the closed unit disk and satisfies
$$
|g(e^{i\pi t})| =  |f(e^{i\pi t})| \cdot |f(e^{i\pi (2-t)})| \le e^t \cdot e^{2-t} = e^2 \, .
$$
for $0 \le t \le 2$. The maximum modulus principle then gives
$$
 |f(0)|^2 = |g(0)| \le e^2 \, .
$$
Alternatively one can use that $\log|f(z)|$ is subharmonic and therefore satisfies the mean-value inequality
$$
 \log |f(0)| \le \frac 12 \int_0^2 \log |f(e^{i\pi t})| \, dt
\le \frac 12 \int_0^2 t \, dt = 1 \, .
$$
The same estimate also follows from Jensen's formula.


TITLE: Can the spectral theorem from linear algebra be proved easily using the SVD?
QUESTION [3 upvotes]: Suppose we already know that any real $m \times n$ matrix has a singular value decomposition.  Can this fact be used to give an easy, quick proof of the spectral theorem from finite dimensional linear algebra?
To be concrete, here is the version of the spectral theorem I have in mind: if $A$ is a real symmetric $n \times n$ matrix, then there exists an orthonormal basis of eigenvectors for $A$.

REPLY [3 votes]: It immediately follows from SVD that for $A$ symmetric, $A^2$ is orthonormally diagonalisable. We need to show that we can find an orthonormal basis consisting of eigenvectors of $A$.
For this, let $v$ be an eigenvector of $A^2$ and $w:=Av$. If $w$ is a multiple of $v$, then we can add $v$ into the collection and continue in $v^\perp$ (which is $A$-invariant). Otherwise we have that $Av=w$, $Aw=\lambda v$. This means that $A$ sends $\sqrt{\lambda} v\pm w$ to the $\pm\sqrt{\lambda}$-multiple of itself. These are eigenvectors of $A$ and, moreover, they are orthogonal to each other due to
$$
\langle \sqrt\lambda v + w, \sqrt{\lambda} v - w\rangle
=\lambda \langle v,v\rangle - \langle w,w\rangle
=\lambda \langle v,v\rangle - \langle Av, Av\rangle
=\lambda \langle v,v\rangle - \langle A^2v, v\rangle=0.
$$
Again, you can continue inductively in $v^\perp\cap w^\perp$.
This looks very awkward indeed. Usually you do it the other way around, first prove the spectral theorem and then SVD.