Functional Equations and the Cauchy Mean Value Theorem

Abstract: The aim of this note is to characterize all pairs of sufficiently smooth functions for which the mean value in the Cauchy Mean Value Theorem is taken at a point which has a well-determined position in the interval. As an application of this result, a partial answer is given to a question posed by Sahoo and Riedel.

\section{Introduction}
Given two differentiable functions $F,G:\R \to \R$, the Cauchy Mean Value Theorem (MVT) states that for any interval $[a,b]\subset \R$, where $a<b$, there exists a point $c$ in $(a,b)$ such that
\begin{equation} \label{Cauchy}
[F(b)-F(a)]\,g(c) = [G(b)-G(a)]\,f(c),
\end{equation}
where $f= F'$ and $g=G'$. A particular situation is the Lagrange MVT when $G(x)=x$ is the identity function,
in which case \eqref{Cauchy} reads as
\begin{equation} \label{Lagrange}
F(b)-F(a) = f(c)(b-a).
\end{equation}

The problem to be investigated in this note can be formulated as follows.
\begin{problem}
\label{the-problem}
Find all pairs $(F,G)$ of differentiable functions $F, G :\R\to\R$ satisfying the following equation
\begin{equation}
\label{eqn:cauchy.gen}
[F(b)-F(a)] \, g(\alpha a+\beta b) = [G(b)-G(a)] \, f(\alpha a+\beta b)
\end{equation}
for all $a,b \in \R$, $a<b$, where $f=F'$, $g=G'$, $\alpha, \beta\in (0,1)$ are fixed and $\alpha+\beta=1$.
\end{problem}

For the case of the Lagrange MVT with $c=\frac{a+b}{2}$, this problem was considered first by Haruki \cite{Haruki} and independently by Acz\'el \cite{Aczel}, proving that the quadratic functions are the only solutions to \eqref{Lagrange}. This problem can serve as a starting point for various functional equations \cite{Sahoo-Riedel}. More general functional equations have been considered
even in the abstract setting of groups by several authors including Kannappan \cite{Kannappan}, Ebanks \cite{Ebanks}, Fechner-Gselmann \cite{Fechner-Gselmann}. On the other hand, the result of Acz\'el and Haruki has been generalized for higher order Taylor expansion by Sablik \cite{Sablik}.

For the more general case of the Cauchy MVT much less is known. We mention Aumann \cite{Aumann} illustrating the geometrical significance of this equation and the recent contribution of P\'ales \cite{Pales} providing the solution of a related equation under additional assumptions. In this note we provide a different approach to the Cauchy MVT.
 As it will turn out, the most challenging situation corresponds to $c=\frac{a+b}{2}$ in which case our main result is the following:

\begin{theorem}
\label{thm:sym.cauchy.main}
Assume that $F,G: \R \to \R$ are three times differentiable functions with derivatives $F'=f$, $G'=g$ such that
\begin{equation}
\label{eqn:cauchy.sym1}
[F(b)-F(a)]\,g\bigl(\frac{a+b}{2}\bigr) = [G(b)-G(a)]\,f\bigl(\frac{a+b}{2}\bigr)
\end{equation}
for all $a,b\in\R$. Then one of the following possibilities holds:

\begin{enumerate}[(a)]

\item $\{1, F, G\}$ are linearly dependent on $\R$;

\item $F,G \in \mathrm{span} \{1,x,x^2\}$, $x\in\R$;

\item there exists a non-zero real number $\mu$ such that
\[
F,G \in \mathrm{span} \{1,e^{\mu x}, e^{-\mu x}\}, \quad x\in\R;
\]

\item there exists a non-zero real number $\mu$ such that
\[
F,G \in \mathrm{span} \{1,\sin(\mu x), \cos(\mu x)\}, \quad x\in\R.
\]
\end{enumerate}
\end{theorem}

The paper is organized as follows. In Section 2 we consider the problem first for the known case of the Lagrange mean value theorem  as an illustration of our method. In Section 3 we provide a preliminary result that will allow to pass local information to a global one about the pairs of differentiable functions $(F,G)$
satisfying \eqref{eqn:cauchy.gen}. In Sections 4, 5 we consider the asymmetric ($\alpha\neq\beta$) and symmetric ($\alpha=\beta=1/2$) cases, respectively. Section 6 is for final remarks. Here we also provide a partial result to an open problem by Sahoo and Riedel which corresponds to a more general version of \eqref{eqn:cauchy.gen}.

\section{The Lagrange MVT with fixed mean value}

Note that every $c \in (a,b)$ can be written uniquely as $c=\alpha a+\beta b$ for some $\alpha,\beta\in (0,1)$ with $\alpha+\beta=1$. It is easy to check that \eqref{Lagrange} holds for all $a,b\in\R$ with fixed $\alpha \neq 1/2$ if $F$ is a linear function, and with  $\alpha = 1/2$ if $F$ is a quadratic function. We claim that the converse of this statement is also true. As mentioned earlier, there are various proofs of the latter in the literature, see for example \cite{Aczel}, \cite{Haruki} , \cite{Sahoo-Riedel}. Nevertheless, we give here  a short and self-contained argument mainly to illustrate our approach to the more general case of the Cauchy MVT.

\begin{proposition}\label{lagrange}
Let $\alpha \in (0,1)$ be fixed and $\beta= 1-\alpha$.
Assume that $F:\R \to \R$ is a continuously differentiable function with $F\rq{}=f$  such that
\begin{equation} \label{convex-comb}
F(b)-F(a)= f(\alpha b+ \beta a) (b-a) \quad \text{for all} \quad a,b\in \R \quad \text{with} \quad a<b.
\end{equation}
Then the following statements hold:
\begin{enumerate}
\item if $\alpha \neq 1/2$ then $F$ is a linear function;
\item if $\alpha = 1/2$ then $F$ is a quadratic function.
\end{enumerate}
\end{proposition}

\begin{proof}
Let us denote by $\alpha b+ \beta a= x$ and $b-a= h$. Then \eqref{convex-comb} reads as
\begin{equation} \label{new-lagrange}
F(x+\beta h) -F(x-\alpha h)= f(x)\,h \quad \text{for all} \quad x \in \R, h>0.
\end{equation}
From this equation it is apparent that $f=F'$ is differentiable as a linear combination of two differentiable functions and thus $F$ is twice differentiable. By induction, it follows that $F$ is
infinitely differentiable.

Differentiating \eqref{new-lagrange} with respect to $h$, we obtain the relation
\begin{equation} \label{diff-lagrange}
\beta f(x+\beta h) + \alpha f(x-\alpha h) = f(x), \quad
x \in \R, h>0.
 \end{equation}
Again, we differentiate \eqref{diff-lagrange} with respect to $h$ and find that
\begin{equation*}
\beta^2 f'(x+\beta h) -\alpha^2 f'(x-\alpha h) =0, \quad
x \in \R, h>0.
\end{equation*}
Since $f'$ is continuous, letting $h \searrow 0$, we obtain
$$ (\beta^2-\alpha^2) f'(x)=(1-2\alpha)f'(x)=0 \quad \text{for all} \quad x\in \R.$$
If $\alpha \neq 1/2$, this implies that $f'=0$ identically. Therefore $f$ is constant and thus $F$ is a linear function, proving the first statement.

If $\alpha = 1/2$, then the equation \eqref{diff-lagrange} reads as
\begin{equation*}
f\bigl(x+\frac{h}{2}\bigr) +f\bigl(x-\frac{h}{2}\bigr)= 2 f(x), \quad
x \in \R, h>0,
\end{equation*}
and twice differentiation with respect to $h$ leads to
\begin{equation*}
f''\bigl(x+\frac{h}{2}\bigr) + f''\bigl(x-\frac{h}{2}\bigr) = 0, \quad
x \in \R, h>0.
\end{equation*}
Now letting $h \searrow 0$, we get $f''(x)=0$ for all $x\in\R$, so $f$ is linear and $F$ is a quadratic function, proving the second statement.
\end{proof}

\section{The Cauchy MVT with fixed mean value}

Let us introduce the sets
\begin{align}\label{U_f,U_g}
U_f := \{ x \in \R: f(x) \ne 0 \}, \quad U_g := \{ x \in \R: g(x) \ne 0 \},
\end{align}
and also their complements $Z_f := \R \setminus U_g$ and $Z_g := \R \setminus U_f$. Observe that if $U_g$ is empty, i.e. $G$ is constant on $\R$, then \eqref{eqn:cauchy.gen} holds for trivial reasons (both sides are identically zero) for arbitrary differentiable function $F$. Of course, we can change the roles of $G$ and $F$ and claim: if $F$ is constant then \eqref{eqn:cauchy.gen} holds for any differentiable function $G$. Assume therefore that $U_g\neq\emptyset$. Then there is a sequence of mutually disjoint open intervals $\{I_\sigma\}_{\sigma\in\Sigma}$, $\Sigma\subset\mathbb{N}$, such that
\begin{align}
\label{rep:U_g=sum.of.itvs}
\displaystyle U_g=\bigcup_{\sigma\in\Sigma}I_{\sigma}.
\end{align}
\begin{proposition}
\label{prop:cauchy.gen.U_g<>empty}
If $U_g\neq\emptyset$ but $U_f\cap U_g = \emptyset$, then $U_f=\emptyset$, i.e. $f\equiv 0$ on $\R$ and thus $F$ is constant.
\end{proposition}
\begin{proof}
By assumption, there is a non-empty interval $(p,q)\subset U_g$ such that $g(x)\neq 0$ on $(p,q)$, but $f(x)=0$ for all $x\in[p,q]$. Then with the change of variables $h=b-a$, $x=\alpha a+\beta b$, \eqref{eqn:cauchy.gen} yields
\begin{equation} \label{constancy}
F(x+\alpha h) - F(x-\beta h) = 0 \quad \text{for all} \quad  x\in (p,q), \, h>0.
\end{equation}

Denoting by $y=x+\alpha h$ for $x\in[p,q]$ and $h>0$, we get $F(y)-F(y-h) = 0$ if $(h,y)$ lies within the semi--strip $L := \bigl\{(h,y):\, h>0, \, p+\alpha h<y<q+\alpha h\bigr\}$.
\begin{figure}[h!]
  \caption{}
  \centering
    \includegraphics[width=0.5\textwidth]{Plot3.jpeg}
\end{figure}

\smallskip
\noindent
Then, for $y>p$ choosing $h>0$ such that $(h,y)\in L$, we have
\begin{align*}
\frac{\partial}{\partial y}F(y) = \frac{\partial}{\partial y}F(y-h) &= -\frac{\partial}{\partial h}F(y-h)\\
                                                                   &= -\frac{\partial}{\partial h}F(y) =0,

\end{align*}
so $F(y)$ is a constant, say $F(y)=F\bigl(\frac{p+q}{2}\bigr)$ for $y>p$. However, by \eqref{constancy}, we have $F(q+\alpha h) = F(q-\beta h)$ and thus $F(y)$ is the same constant for all $y<q$. Therefore, $f(y)=F'(y)=0$ for all $y\in\R$.
\end{proof}

Proposition \ref{prop:cauchy.gen.U_g<>empty} shows that the condition $U_f\cap U_g=\emptyset$ holds only if at least one of the sets $U_f$ and $U_g$ is empty. Then we have the simple cases described as in the beginning of the section.

\begin{proposition}
\label{prop:X}
Let $(F,G)$ be a solution of the Problem~\ref{the-problem} satisfying
\begin{align}
\label{Uf_disj_Ug}
U_f\cap U_g \neq \emptyset,
\end{align}
and consider the representation \eqref{rep:U_g=sum.of.itvs}. If $\{F, G, 1\}$ are linearly dependent as functions on $I_{\sigma}$ for every $\sigma\in\Sigma$, then $\{F, G, 1\}$ are linearly dependent on $\R$.
\end{proposition}
\begin{proof}
For $\sigma_1, \sigma_2 \in \Sigma$ with $\sigma_1 \neq \sigma_2$, consider the intervals $I_{\sigma_1} := (p_1,q_1)$, $I_{\sigma_2}:=(p_2,q_2)$ with
\begin{align}\label{pqpq}
p_1<q_1\leq p_2<q_2,
\end{align}
and assume that $\{F, G, 1\}$ are linearly dependent on $I_{\sigma_1}$ and $I_{\sigma_2}$. Then it follows that there are constants $A_1$, $A_2$, $B_1$, $B_2 \in\R$ such that
\begin{align}\label{FA_1B_1}
F(x) &= A_1G(x)+B_1, \, x\in I_{\sigma_1},\\ \label{FA_2B_2}
     &= A_2G(x)+B_2, \, x\in I_{\sigma_2}.
\end{align}
With the change of variables $h=b-a$, $x=\alpha a+\beta b$, \eqref{eqn:cauchy.gen} yields
\begin{equation*}
[F(x+\alpha h)-F(x-\beta h)]\, g(x) = [G(x+\alpha h)-G(x-\beta h)]\, f(x)
\end{equation*}
for all $x\in\R$ and $h>0$. Since $f(x)=A_2g(x)$ if $x\in I_{\sigma_2}$ by \eqref{FA_2B_2} and $g(x)\neq 0$ for $x\in I_{\sigma_2}$, we have
\begin{align}\label{FFA_2}
F(x+\alpha h)-F(x-\beta h) = A_2[G(x+\alpha h)-G(x-\beta h)],
\quad x\in I_{\sigma_2}, h>0.
\end{align}
If at the same time $x-\beta h\in I_{\sigma_1}$, then $F(x-\beta h)=A_1G(x-\beta h)+B_1$ by \eqref{FA_1B_1}. Inserting this value into \eqref{FFA_2}, we obtain
\begin{align}\label{FA_2B_1}
F(x+\alpha h) = A_2G(x+\alpha h)+(A_1-A_2)G(x-\beta h)+B_1
\end{align}
for
\begin{align}\label{I^2I^1h}
x\in I_{\sigma_2}, \, x-\beta h\in I_{\sigma_1}, \, h>0.
\end{align}
Put $y=x+\alpha h$, then $x-\beta h=y-h$, and \eqref{I^2I^1h} means that $(h,y)$ lies within the parallelogram $
\Pi := \bigl\{(h,y): \, p_2+\alpha h<y<q_2+\alpha h, \, p_1+h<y<q_1+h\bigr\}$.

\begin{figure}[h!]
  \caption{}
  \centering
    \includegraphics[width=0.5\textwidth]{Plot1.jpeg}
\end{figure}

\smallskip
\noindent
Since $\beta\in(0,1)$, \eqref{pqpq} guarantees that $\Pi\neq\emptyset$,
and \eqref{FA_2B_1} implies
\begin{equation*}
F(y)= A_2G(y)+(A_1-A_2)G(y-h)+B_1 \quad \text{for all} \quad (h,y)\in\Pi.
\end{equation*}
Therefore, at any point of $\Pi$, we have
\begin{align*}
0=\frac{\partial}{\partial h}F(y) = -(A_1-A_2)G'(y-h) = (A_2-A_1)g(y-h).
\end{align*}
But $y-h\in I_{\sigma_1}$ by \eqref{I^2I^1h}, so $g(y-h)\neq 0$ and thus
\begin{align}\label{A_1=A_2}
A_2-A_1=0.
\end{align}
So far our analysis says nothing about $B_1$, $B_2$ in \eqref{FA_1B_1}, \eqref{FA_2B_2} but since $\sigma_1, \sigma_2\in\Sigma$ were arbitrary, \eqref{A_1=A_2} together with \eqref{FA_1B_1}, \eqref{FA_2B_2} imply
\begin{align}\label{fAg}
f(x)=Ag(x) \quad \text{for some constant} \quad A\in\R \quad \text{and all} \quad x\in U_g.
\end{align}
On the other hand, by changing the roles of $F$ and $G$ in the above analysis, we come to the conclusion that
\begin{align}\label{gKf}
g(x)=Kf(x) \quad \text{for some constant} \quad K\in\R \quad \text{and all} \quad x\in U_f.
\end{align}
By \eqref{Uf_disj_Ug} there is a point $x_0\in U_g\cap U_f$ so $AK=1$ and these coefficients are not zero. But then \eqref{fAg} implies  $U_g\subset U_f$ and \eqref{gKf} implies $U_f\subset U_g$; therefore, $U_g=U_f$ and $Z_g=Z_f$. The latter means that
\[
f(x)=Ag(x), \, g(x)=Kf(x) \quad \text{if} \quad x\in Z_g=Z_f
\]
by trivial reasons (all these values are zeros) so with \eqref{fAg} and \eqref{gKf} these identities are valid on the entire $\R=U_f\cup Z_f=U_g\cup Z_g$.
In particular, it follows that $\{F, G, 1\}$ are linearly dependent on $\R$.
\end{proof}

\section{The Cauchy MVT with fixed asymmetric mean value}

In this section we consider the asymmetric case, i.e., in \eqref{eqn:cauchy.gen}
we take
\begin{align}\label{c}
\alpha, \, \beta \in (0,1) \quad \text{with } \quad \alpha\neq 1/2 \quad \text{and} \quad \beta=1-\alpha.
\end{align}

The following proposition describes all pairs $(F,G)$ of two times continuously differentiable functions satisfying \eqref{eqn:cauchy.gen} under the assumption \eqref{c} on $\alpha,\beta$ in the intervals where $g=G'$ does not vanish.

\begin{proposition}
\label{cauchy1}
Let $(F,G)$ be a solution of the Problem~\ref{the-problem} with $\alpha,\beta$ satisfying \eqref{c} and $I=(p,q)$, $-\infty\leq p<q \leq +\infty$, be an interval where the derivative $g(x)$ does not vanish. If $F,G$ are two times continuously differentiable on $I$, then $\{F, G, 1\}$ are linearly dependent on $I$.
\end{proposition}
\begin{proof}
With the change of variables $h=b-a$, $x=\alpha a+\beta b$, \eqref{eqn:cauchy.gen} yields
\begin{equation}\label{eqn_asym1}
[F(x+\alpha h)-F(x-\beta h)]\, g(x) = [G(x+\alpha h)-G(x-\beta h)]\, f(x)
\end{equation}
if $x\in I$ and $h>0$ such that $x+\alpha h$, $x-\beta h\in I$. The latter condition tells that \eqref{eqn_asym1} holds if $(h,x)$ lies within the open triangle
\begin{align}\label{triangleT}
T := \bigl\{(h,x): \,0<h<q-p, p+\beta h<x<q-\alpha h \bigr\}.
\end{align}

\begin{figure}[h!]
  \caption{}
  \centering
    \includegraphics[width=0.5\textwidth]{Plot2.jpeg}
\end{figure}

By differentiating both sides of \eqref{eqn_asym1} with respect to $h$ twice, we obtain the following relation in $T$
\begin{align}\label{eqn_asym2}
[\alpha^2 f'(x+\alpha h) - \beta^2 f'(x-\beta h)]\,g(x)= [\alpha^2 g(x+\alpha h)-\beta^2 g'(x-\beta h)]\,f(x).
\end{align}
All the functions are continiuous so \eqref{eqn_asym2} holds on the closure $\overline{T}$ as well, in particular, on the interval $\{h=0, p<x<q\}$. Therefore, with $\beta^2-\alpha^2=1-2\alpha\neq 0$ by \eqref{c}, we get $f'(x)g(x)=g'(x)f(x)$ for all $x\in I=(p,q)$. We can divide both sides by $g^2(x)$ and conclude that $(f/g)'=0$ on $I$. This implies that $f/g = A$ for some constant $A\in \R$, and $F'(x)=f(x)=Ag(x)=AG'(x)$, $x\in I$. After integration we get $F(x)=AG(x)+B(x)$, $x\in I$.
\end{proof}

The following theorem is the main result of this section.
\begin{theorem}
\label{thcauchy1}
Let $(F,G)$ be a solution of the Problem~\ref{the-problem} with $\alpha,\beta$ satisfying \eqref{c}. If $F,G$ are two times continuously differentiable on $\R$, then $\{F, G, 1\}$ are linearly dependent on $\R$, i.e. there exist constants $A,B,C\in\R$ such that not all of them zeroes and
\begin{equation}\label{lin.dep.1}
AF(x)+BG(x)+C=0 \quad \text{for all} \quad x\in\R.
\end{equation}
\end{theorem}
\begin{proof}
Consider the following cases:

\smallskip
\noindent
Case 1: $U_g = \emptyset$.

In this case $G$ is a constant on $\R$ and \eqref{eqn:cauchy.gen} holds for any differentiable function $F$. Hence \eqref{lin.dep.1} holds, for example, with $A=0$, $B=1$, $C=-G$ and thus $\{F, G, 1\}$ are linearly dependent on $\R$.

\smallskip
\noindent
Case 2: $U_g \neq \emptyset$ but $U_g \cap U_f=\emptyset$.

In this case Proposition \ref{prop:cauchy.gen.U_g<>empty} yields that $F$ is a constant on $\R$ and \eqref{eqn:cauchy.gen} holds for any differentiable function $G$. Hence \eqref{lin.dep.1} holds, for example, with $A=1$, $B=0$, $C=-F$ and thus $\{F, G, 1\}$ are again linearly dependent on $\R$.

\smallskip
\noindent
Case 3: $U_g \cap U_f \neq \emptyset$.

In this case Propositions \ref{cauchy1} and \ref{prop:X} immediately imply that $\{F, G, 1\}$ are linearly dependent on ~$\R$.
\end{proof}
\section{The Cauchy MVT with symmetric mean value}

In this section we consider the problem of describing all pairs $(F,G)$ of smooth functions for which the mean value in \eqref{eqn:cauchy.gen} is taken at the midpoint of the interval. Our first result gives a necessary (and also sufficient in case $\{1,F,G\}$ are not linearly dependent) condition on such pairs in the intervals where $g=G'$ does not vanish.

\begin{proposition}
\label{cauchy2}
Assume that $F,G: \R \to \R$ are three times differentiable functions with derivatives $F'=f$, $G'=g$. Let $I\subset \R$ be such an interval that $g\neq 0$ for all $x\in I$ and \eqref{eqn:cauchy.sym1} holds
for all $a,b \in I$. Then there exist constants $A, K\in\R$ and $x_{0}\in I$ such that
\begin{equation} \label{f,g}
f(x) = \bigg(A + K \int_{x_{0}}^{x}\frac{dt}{g^{2}(t)}\bigg) \, g(x) \quad \text{for all} \quad x \in I.
\end{equation}
Moreover, if \eqref{f,g} holds with $K\neq0$, then \eqref{eqn:cauchy.sym1} holds if and only if
\begin{equation} \label{integralcondition}
\int_{x-h}^{x+h} g(t)\, \Bigg(\int_{x_{0}}^{t}\frac{du}{g^{2}(u)} \Bigg) \,dt = \Bigg(\int_{x-h}^{x+h} g(t) dt\Bigg) \Bigg(\int_{x_{0}}^{x}\frac{du}{g^{2}(u)} \Bigg)  \end{equation}
for all $  x,h \in \R$ such that $x, x+h, x-h\in I$.
\end{proposition}
\begin{proof}
With the change of variables $x=\frac{a+b}{2}$, $h=\frac{b-a}{2}$, we can rewrite
\eqref{eqn:cauchy.sym1} as
\begin{equation}
\label{modifcauchy}
[F(x+h)-F(x-h)]g(x)= [G(x+h)-G(x-h)]f(x)
\end{equation}
for all $x,h\in \R$ with the property that $x,x+h,x-h \in I$. By differentiating this equality three times with respect to $h$, we get
\begin{equation*}
[f''(x+h)+f''(x-h)]\,g(x) = [g''(x+h)+g''(x-h)]\,f(x).
\end{equation*}
Setting $h=0$, we obtain
\[
0=f''(x)g(x)-f(x)g''(x) = \bigl(f'(x)g(x)-f(x)g'(x)\bigr)' \quad \text{for all} \quad x\in I,
\]
and thus $f'(x)g(x)-f(x)g'(x)=K$ for some constant $K$. Then $\bigl(\frac{f}{g}(x)\bigr)'= \frac{K}{g^2(x)}$, $x \in I$,
and integration over $(x_0,x)$ with any $x_0\in I$ yields \eqref{f,g}.

Now assume \eqref{f,g} holds with a nonzero constant $K$. Then we have
\begin{align}
\nonumber
F(x+h) - F(x-h) &= \int_{x-h}^{x+h}f(t) dt \\ \nonumber
                &= \int_{x-h}^{x+h} \bigg(A + K\int_{x_0}^t \frac{du}{g^2(u)} \bigg)\,g(t) dt\\ \label{FCT_comp1}
                &= A\int_{x-h}^{x+h} g(t) dt + K\int_{x-h}^{x+h} g(t)\bigg(\int_{x_0}^t \frac{du}{g^2(u)} \bigg) dt
\end{align}
and
\begin{align}
\nonumber
[G(x+h)-G(x-h)]\frac{f(x)}{g(x)} =& \Bigg(\int_{x-h}^{x+h} g(t) dt\Bigg) \Bigg(A + K\int_{x_0}^x \frac{du}{g^2(u)}\Bigg)\\\label{FCT_comp2}
                                 =& A\int_{x-h}^{x+h} g(t) dt + K\Bigg(\int_{x-h}^{x+h} g(t) dt\Bigg) \Bigg(\int_{x_{0}}^{x}\frac{du}{g^{2}(u)} \Bigg).
\end{align}
By comparing \eqref{FCT_comp1} and \eqref{FCT_comp2}, it is easy to see that \eqref{integralcondition} is equivalent to \eqref{eqn:cauchy.sym1}.
\end{proof}
The following example illustrates that there are non-trivial functions satisfying \eqref{integralcondition} (and hence \eqref{eqn:cauchy.sym1}) on $\R$.
\begin{example}
Consider $g(t)= e^t$ on $I=\R$ and let $A=0, K=1, x_0=0$. The integral condition \eqref{integralcondition} reads as the following identity
\begin{equation*}
\int_{x-h}^{x+h} e^t \, \Bigg(\int_{0}^te^{-2u} du\Bigg) \,dt= \Bigg(\int_{x-h}^{x+h}e^t dt\Bigg)\Bigg(\int_{0}^x e^{-2u}du\Bigg).
\end{equation*}
A direct computation gives $f(x) = \sinh(x)=\frac{e^x-e^{-x}}{2}$, and consequently,
\begin{align}\label{F=cosh}
F(x) = \cosh(x) = \frac{e^x+e^{-x}}{2}, \quad G(x) = e^x, \, x\in\R.
\end{align}
\end{example}

We invite the interested reader to verify directly that the pair $(F,G)$ in \eqref{F=cosh} satisfies the relation \eqref{eqn:cauchy.sym1},  giving a non--trivial example of such pairs.

Now we assume that $K\neq 0$ and analyze the property \eqref{integralcondition} for all $x,h\in\R$ such that $x,x+h,x-h\in I$. Differentiating it with respect to $h$, we obtain
\[
g(x+h)\int_{x_0}^{x+h}\frac{du}{g^2(u)} + g(x-h)\int_{x_0}^{x-h}\frac{du}{g^2(u)} = [g(x+h)+g(x-h)]\int_{x_0}^x\frac{du}{g^2(u)}.
\]
Differentiation two more times with respect to $h$ gives
\[
g''(x+h)\int_{x_0}^{x+h}\frac{du}{g^2(u)} + g''(x-h)\int_{x_0}^{x-h}\frac{du}{g^2(u)} = [g''(x+h)+g''(x-h)]\int_{x_0}^x\frac{du}{g^2(u)},
\]
for all $x\in I$ and $h\in\R$ such that $x,x+h,x-h\in I$. Setting $h=x-x_0$ in these two equations, we obtain
\begin{align} \label{eqn_for_g}
g(2x-x_0)\int_{x_0}^{2x-x_0}\frac{du}{g^2(u)}  = [g(2x-x_0)+g(x_0)]\int_{x_0}^x\frac{du}{g^2(u)},
\end{align}
and
\begin{align} \label{eqn_for_g''}
g''(2x-x_0)\int_{x_0}^{2x-x_0}\frac{du}{g^2(u)} = [g''(2x-x_0)+g''(x_0)]\int_{x_0}^x\frac{du}{g^2(u)},
\end{align}
for all $x\in I$ with $2x-x_0 \in I$. Since $2x-x_0\in I$ and $g$ has no zeros in $I$, both sides of \eqref{eqn_for_g} do not vanish. By comparing \eqref{eqn_for_g''} and \eqref{eqn_for_g}, we get
\begin{align}\label{frac_eq_g''}
\frac{g''(2x-x_0)}{g(2x-x_0)} = \frac{g''(2x-x_0)+g''(x_0)}{g(2x-x_0)+g(x_0)}
\end{align}
for all $x\in I$ such that $2x-x_0 \in I$. Denoting by $y(x) := g(2x-x_0)$ and $\lambda := \frac{4g''(x_0)}{g(x_0)}$, \eqref{frac_eq_g''} yields the second order differential equation $y''-\lambda y=0$, whose general real-valued solution (depending on the sign of $\lambda$), has the following form
\begin{align*}
g(x) &= Px+Q, \quad &&\text{if} \quad \lambda=0;\\
g(x) &= Pe^{\sqrt{\lambda} x}+Qe^{-\sqrt{\lambda} x} \quad &&\text{if} \quad \lambda=\mu^2, \mu>0;\\
g(x) &= P\sin(\sqrt{-\lambda} x)+Q\cos(\sqrt{-\lambda} x) \quad &&\text{if} \quad \lambda=-\mu^2, \mu>0,
\end{align*}
where $P$, $Q$ are real constants. Hence $G$ has one of the following forms
\begin{align}\label{G_quad}
G(x)&=Ax^2+Bx+C,\\\label{G_exp}
G(x)&=Ae^{\mu x}+Be^{-\mu x}+C, \quad \mu>0,\\\label{G_trig}
G(x)&=A\sin(\mu x)+B\cos(\mu x)+C, \quad \mu>0,
\end{align}
where $A,B,C$ are real constants.

\begin{remark}
\label{rem:cauchy.sym}
Altogether, we come to the following conclusion:
on every interval $I\subset\R$ on which $G'\neq 0$, either $\{F, G, 1\}$ are linearly dependent, or $G$ and thus also $F$, cf. \eqref{f,g}, has one of the forms described in \eqref{G_quad}--\eqref{G_trig}.
\end{remark}
In the sequel, we call a function $G$ (resp. the pair $(F,G)$) to be of \textit{quadratic, exponential} or \textit{trigonometric type on $I$} if $G$ has (resp. both of $F$ and $G$ have) the form \eqref{G_quad}, \eqref{G_exp} or \eqref{G_trig}, respectively.

Consider the set $U_g$ and its representation, cf. \eqref{U_f,U_g}, \eqref{rep:U_g=sum.of.itvs}. The following lemma plays a crucial role in the analysis of the equation \eqref{eqn:cauchy.sym1}.

\begin{lemma}
\label{lem:cauchy.sym.f(q)=0}
Let $(p,q)\in\{I_{\sigma}\}_{\sigma\in\Sigma}$ be such that $p>-\infty$ and $f(p)=0$.
Then $\{F, G, 1\}$ are linearly dependent on $[p,q)$.
\end{lemma}
\begin{proof}
$g(p)=0$ by Definition \eqref{rep:U_g=sum.of.itvs} so by Remark \ref{rem:cauchy.sym}, it is sufficient to consider the following cases.

\smallskip
\noindent
Case 1: $G$ is of quadratic type on $(p,q)$.

Then $F$ is also of quadratic type on $(p,q)$, and since $f(p)=g(p)=0$, we have $F,G\in\text{span}\bigl\{1, (x-p)^2\bigr\}$. Thus $\{F, G, 1\}$ are linearly dependent on $(p,q)$.

\smallskip
\noindent
Case 2: $G$ is of either exponential or trigonometric type on $(p,q)$.

First suppose that $G$ is of exponential type on $(p,q)$. Then so is $F$ and since the set of functions satisfying \eqref{eqn:cauchy.sym1} is invariant with respect to the addition of constant functions, we can assume, without loss of generality, that $F,G \in \text{span} \bigl\{e^{\,\mu (x-p)}, e^{-\mu (x-p)}\bigr\}$ for some $\mu \neq 0$. Hence there are real constants $u$, $v$ such that $F(x) = ue^{\mu(x-p)} + ve^{-\mu(x-p)}$, $x\in (p,q)$. Since $F'(p)=f(p)=0$, we get $u=v$ and thus $F(x)=2u\cosh(\mu(x-p))$. The same argument for $G$ explains that $G(x)=2w\cosh(\mu(x-p))$ for some real $w$, and consequently $F$ and $G$ are multiples of the same function $\cosh(\mu(x-p))$.

If $G$ is of trigonometric type, then by the same way as above, we can conclude that $F$ and $G$ are multiples of the same function $\cos(\mu(x-p))$, implying that $\{F, G, 1\}$ are linearly dependent on $[p,q)$.
\end{proof}

\paragraph{Proof of Theorem~\ref{thm:sym.cauchy.main}} Consider the set $U_g$ defined in \eqref{U_f,U_g}.
If
$U_g=\emptyset$, then $g\equiv 0$ on $\R$, and thus $G$ is identically constant on $\R$. In this case $F$ can be an arbitrary differentiable function on $\R$ and thus $\{1, F, G\}$ are linearly dependent on $\R$. If $U_g=\R$, then it follows (cf. Remark \ref{rem:cauchy.sym}) that either $\{1, F, G\}$ are linearly dependent
or $G$ has one of the forms \eqref{G_quad}--\eqref{G_trig} on the whole of $\R$. Moreover, we get the same conclusion if $U_g\cap U_f=\emptyset$ (cf. Proposition \ref{prop:cauchy.gen.U_g<>empty}).

Next, let us assume that $U_g\cap U_f \neq \emptyset$ and $U_g$ is a proper subset of $\R$. Consider the representation ~\eqref{rep:U_g=sum.of.itvs}. It is clear (cf. Remark \ref{rem:cauchy.sym}) that the index set $\Sigma$ can be split into disjoint subsets as $\Sigma = \Sigma_{\textrm{lr}} \cup \Sigma_{\textrm{q}} \cup \Sigma_{\textrm{t}} \cup \Sigma_{\textrm{e}}$, where
\begin{align*}
\Sigma_{\textrm{lr}} :=& \, \bigl\{ \sigma\in\Sigma: \, \{F, G, 1\} \quad \text{are in linear relationship on} \; I_{\sigma} \bigr\},\\
\Sigma_{\textrm{q}} :=& \, \bigl\{\sigma\in\Sigma: \, (F, G) \quad \text{are of quadratic type on } \,I_{\sigma} \bigr\},\\
\Sigma_{\textrm{t}} :=& \, \bigl\{\sigma\in\Sigma: \, (F, G) \quad \text{are of trigonometric type on } \, I_{\sigma} \bigr\},\\
\Sigma_{\textrm{e}} :=& \, \bigl\{\sigma\in\Sigma: \, (F, G) \quad \text{are of exponential type on } \, I_{\sigma}\bigr\}.
\end{align*}

\smallskip
\noindent
\textit{Claim 1}. If $\Sigma_{\textrm{lr}} \neq \emptyset$, then $\Sigma_{\textrm{lr}} = \Sigma$.

\smallskip
\noindent
Proof. Assume $\Sigma_{\textrm{lr}}$ is a proper subest of $\Sigma$. Then there exists $\sigma_2\in\Sigma$ such that $\sigma_2\notin\Sigma_{\textrm{lr}}$. Since $\Sigma_{\textrm{lr}} \neq \emptyset$, there is $\sigma_1 \in \Sigma_{\textrm{lr}}$ and $A_1\in\R$ such that $f(x)=A_1g(x)$ on $x\in I_{\sigma_1}$. Consider all $x,h\in\R$ such that $x+h \in I_{\sigma_2}$ and $x\in I_{\sigma_1}$. Using \eqref{eqn:cauchy.sym1} for $a=x-h$ and $b=x+h$, and recalling that $g\neq 0$ on $I_{\sigma_1}$, we get
\begin{align}
F(x+h)-A_1G(x+h) = F(x-h) - A_1G(x-h).
\end{align}
Therefore,
\begin{align*}
f(x+h) - A_1g(x+h) &= \frac{1}{2}\bigg(\frac{\partial}{\partial x} + \frac{\partial}{\partial h}\bigg) \, F(x+h) - \frac{A_1}{2}\bigg(\frac{\partial}{\partial x} + \frac{\partial}{\partial h}\bigg) \, G(x+h)\\
                   &= \frac{1}{2}\bigg(\frac{\partial}{\partial x} + \frac{\partial}{\partial h}\bigg) \bigl(F(x-h) - A_1G(x-h)\bigr) \\
                   &= 0,
\end{align*}
and thus $f(x+h) = A_1g(x+h)$ for all $x,h\in\R$ such that $x+h \in I_{\sigma_2}$ and $x\in I_{\sigma_1}$. From this it follows that $F$ and $G$ are in linear relationship on $I_{\sigma_2}$, that is, $\sigma_2 \in \Sigma_{\textrm{lr}}$, which leads to a contradiction. \qed

\smallskip
\noindent
\textit{Claim 2}. If $\Sigma_{\textrm{lr}} = \emptyset$, then only one of the index sets  $\Sigma_{\textrm{q}}$, $\Sigma_{\textrm{t}}$, $\Sigma_{\textrm{e}}$ is non-empty.

\smallskip
\noindent
Proof. Let $\sigma\in \Sigma$ and $I_{\sigma} = (p,q)$. Since $U_g$ is proper subset of $\R$, one of $p,q$ is finite. We can assume $p>-\infty$. Then $g(p)=0$, and Lemma \ref{lem:cauchy.sym.f(q)=0} yields $f(p)\neq 0$. Hence using \eqref{eqn:cauchy.sym1} for $a=p-h$ and $b=p+h$ we get
\begin{align}
\label{eqn:G(p+h)=G(p-h)}
G(p+h)=G(p-h) \quad \text{for all} \quad h\in\R,
\end{align}
so the graph of $G$ is symmetric with respect to the vertical line $y=p$.

If $\sigma\in\Sigma_{\textrm{q}}$ or $\sigma\in\Sigma_{\textrm{e}}$, then $q=+\infty$ since the functions of quadratic type has exactly one and the functions of exponential type has at most one critical point. Therefore, if $\sigma\in\Sigma_{\textrm{q}}$, then
$G \in \text{span} \{1, (x-p)^2\}$, $x\in\R$ and $\Sigma = \Sigma_{\textrm{q}}$. Similarly, it follows from \eqref{eqn:G(p+h)=G(p-h)} that if $\sigma\in\Sigma_{\textrm{e}}$, then $\Sigma = \Sigma_{\textrm{e}}$.

Next, assume $\Sigma_{\textrm{lr}} = \Sigma_{\textrm{q}} = \Sigma_{\textrm{e}} = \emptyset$. Then $\Sigma = \Sigma_{\textrm{t}}$ and let $\sigma\in\Sigma_{\textrm{t}}$. Since $G$ is of trigonometric type on $I_{\sigma}=(p,q)$, we must have $q<+\infty$. So $g(p)=g(q)=0$ and it follows as in the proof of Lemma \ref{lem:cauchy.sym.f(q)=0} that there are real constants $u$, $v$ such that
\begin{equation}\label{G_in_(p,q)}
G(x) = u+v\cos\bigl(\pi\frac{x-p}{q-p}\bigr), \quad x\in (p,q).
\end{equation}
Using \eqref{eqn:G(p+h)=G(p-h)} we obtain that \eqref{G_in_(p,q)} holds on the whole of $\R$. \qed

Since $U_g\neq\emptyset$, at least one of $\Sigma_{\textrm{lr}}$, $\Sigma_{\textrm{q}}$, $\Sigma_{\textrm{t}}$, $\Sigma_{\textrm{e}}$ is non-empty. If $\Sigma_{\textrm{lr}} \neq \emptyset$, then Claim 1 and Proposition \ref{prop:X} imply that $\{F, G, 1\}$ are linearly dependent on $\R$. If $\Sigma_{\textrm{lr}} = \emptyset$, then Claim 2 yields that one of the possibilities $(b)$ -- $(d)$ holds. \qed

\section{Final Remarks}

As a consequence of our main result we can give a partial answer to following  still open question of Sahoo and Riedel (cf. \cite[Section 2.7]{Sahoo-Riedel} for an equivalent formulation).

\smallskip

\paragraph{Problem} \textit{Find all functions $F,G,\phi,\psi:\R \to \R$ satisfying
\begin{equation}
\label{op:Sahoo-Riedel}
[F(x)-F(y)]\,\phi\bigl(\frac{x+y}{2}\bigr) = [G(x)-G(y)]\,\psi\bigl(\frac{x+y}{2}\bigr)
\end{equation}
for all $x,y\in\R$.}

We provide a partial result to this problem under certain assumptions on the unknown functions. First let us make the change of variables $s=\frac{x+y}{2}$, $t=\frac{x-y}{2}$ and write \eqref{op:Sahoo-Riedel} equivalently as
\begin{equation}
\label{op:Sahoo-Riedel1}
[F(s+t)-F(s-t)]\,\phi(s) = [G(s+t)-G(s-t)]\,\psi(s), \quad s,t\in\R.
\end{equation}

\begin{theorem}
Let $F,G:\R\to\R$ be three times differentiable and $\phi,\psi:\R\to\R$ be an arbitrary functions satisfying \eqref{op:Sahoo-Riedel1} on $\R$. If either $\phi\neq0$ or $\psi\neq0$ on $\R$, then one of the following possibilities holds:
\begin{enumerate}[(a)]
\item there exist constants $A_0,A_1,A_2\in\R$ such that for all $s\in\R$, we have $A_0+A_1F(s)+A_2G(s)=0$ and $G'(s)\,[A_1\psi(s)+A_2\phi(s)]=0$;
\item there exist constants $A_0,A_1,A_2,B_0,B_1,B_2\in\R$ such that for all $s\in\R$, we have $F(s)=A_0+A_1s^2+A_2s^2$, $G(s)=B_0+B_1s+B_2s^2$ and
\[
(A_1+2A_2s)\phi(s)=(B_1+2B_2s)\psi(s);
\]
\item there exists $\mu\neq0$ and constants $A_0,A_1,A_2,B_0,B_1,B_2\in\R$ such that for all $s\in\R$, we have $F(s)=A_0+A_1e^{\mu s}+A_2e^{-\mu s}$, $G(s)=B_0+B_1e^{\mu s}+B_2e^{-\mu s}$ and
\[
(A_1e^{\mu s}-A_2e^{-\mu s})\phi(s) = (B_1e^{\mu s}-B_2e^{-\mu s})\psi(s);
\]
\item there exists $\mu\neq0$ and constants $A_0,A_1,A_2,B_0,B_1,B_2\in\R$ such that for all $s\in\R$, we have $F(s)=A_0+A_1\sin(\mu s)+A_2\cos(\mu s)$, $G(s)=B_0+B_1\sin(\mu s)+B_2\cos(\mu s)$ and
\[
[A_1\cos(\mu s)-A_2\sin(\mu s)]\,\phi(s) = [B_1\cos(\mu s)-B_2\sin(\mu s)]\,\psi(s).
\]
\end{enumerate}
\end{theorem}
\begin{proof}
Let $f,g$ be the derivatives of $F,G$, respectively and the sets $U_g$, $U_f$ (resp. $Z_g$, $Z_f$) be defined as in Section 3. Without loss of generality, assume that $\phi$ does not vanish on $\R$. By differentiating \eqref{op:Sahoo-Riedel1} with respect to $t$ and setting $t=0$ in the resulting equation, we get
\begin{equation}
\label{op1}
f(s)\phi(s) = g(s)\psi(s), \quad s\in\R.
\end{equation}
For any $s\in U_g$ and $t\in\R$, by \eqref{op:Sahoo-Riedel1} and \eqref{op1}, we have
\begin{align*}
F(s+t)-F(s-t) &= [G(s+t)-G(s-t)]\,\frac{\psi(s)}{\phi(s)}\\
              &= [G(s+t)-G(s-t)]\,\frac{f(s)}{g(s)},
\end{align*}
and thus
\begin{equation}
\label{op2}
[F(s+t)-F(s-t)]\, g(s) = [G(s+t)-G(s-t)]\,f(s), \quad s\in U_g, t\in\R.
\end{equation}
On the other hand, observe that we have $Z_g\subset Z_f$ by \eqref{op1} since $\phi\neq0$ on $\R$. So \eqref{op2} holds for all $s\in U_g\cup Z_g=\R$. Therefore, Theorem~\eqref{thm:sym.cauchy.main} can be applied to \eqref{op2} and the four characterizations follows immediately.
\end{proof}

\medskip

It is likely that the methods of this paper work for related equations when we replace the linear mean $\alpha a + (1-\alpha) b$ by the $p$-mean $M^p_\alpha(a,b) = (\alpha a^p + (1-\alpha) b)^{\frac{1}{p}}$, for $a,b \geq 0$. Here $M^p_\alpha(a,b)$ is defined for all
values of $ p \neq 0$. For $p=0$ the corresponding mean is defined by $M^0_\alpha(a,b) = a^\alpha b^{1-\alpha}$. Moreover, for $p \in \{ -\infty, \infty \}$ we can define $M^{-\infty}_\alpha(a,b)= \min \{ a, b \}$ and  $M^{\infty}_\alpha(a,b)= \max \{ a, b \}$. We intend to investigate this issue in a subsequent paper.

\medskip

The essence of our approach is to reduce a functional equation to an ODE. For this strategy we need certain smoothness assumptions. It would be interesting to provide an alternative way that will not require this additional smoothness assumptions.

\subsection*{Acknowledgment}
We would like to thank Professor J\"urg R\"atz for helpful conversations on the subject of this work.


Team Diagonalization

Abstract: Ten years ago, Glaßer, Pavan, Selman, and Zhang [GPSZ08] proved that if P $\neq$ NP, then all NP-complete sets can be simply split into two NP-complete sets.That advance might naturally make one wonder about a quite different potential consequence of NP-completeness: Can the union of easy NP sets ever be hard? In particular, can the union of two non-NP-complete NP sets ever be NP-complete?Amazingly, Ladner [Lad75] resolved this more than forty years ago: If P $\neq$ NP, then all NP-complete sets can be simply split into two non-NP-complete NP sets. Indeed, this holds even when one requires the two non-NP-complete NP sets to be disjoint.We present this result as a mini-tutorial. We give a relatively detailed proof of this result, using the same technique and idea Ladner [Lad75] invented and used in proving a rich collection of results that include many that are more general than this result: delayed diagonalization. In particular, the proof presented is based on what one can call team diagonalization (or if one is being playful, perhaps even tag-team diagonalization): Multiple sets are formed separately by delayed diagonalization, yet those diagonalizations are mutually aware and delay some of their actions until their partner(s) have also succeeded in some coordinated action.We relatedly note that, as a consequence of Ladner's result, if P $\neq$ NP, there exist OptP functions f and g whose composition is NP-hard yet neither f nor g is NP-hard.

\section{Introduction}

This paper is about the fact
that if $\mbox{\rm P} \not= \mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$, then NP-hardness can be
built by in a simple way by composing/combining non-NP-hard subparts.

Our initial interest in this came from a question not about
sets but about functions.
At a computational biology talk one of us attended, two actions were
sequentially taken on the input and the overall transformation was
clearly NP-hard.  During a discussion of the talk, the question came
up of whether that meant that at least one of the two composed
transformations must itself be NP-hard.  Although for the example of
that talk it probably was the case that one of the constituent
transformations could be directly proved NP-hard,
what we eventually realized (not nearly as quickly as we should have)
is that (assuming $\mbox{\rm P} \not= \mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$) this is
not a general behavior.  In particular,
if $\mbox{\rm P} \not=
\mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$, then  there exist NP optimization functions (i.e., $\mbox{\rm OptP}$ functions)
$f$ and $g$
such that
neither $f$ nor $g$
is even NP-Turing-hard, yet $g(f(x))$ is (functional) NP-many-one-hard.
That is, non-NP-hard functions can via composition achieve NP-hardness.

The natural way to show this is simply to observe that the function
case follows immediately from the language case, \emph{and the
  language case already put to bed in the 1970s by Ladner
  \cite{lad:j:np-incomplete}!}  So this paper presents, as a
mini-tutorial on delayed diagonalization, and in honor of Professor
Ladner's career on the occasion of his retirement, a proof
of the language-case result, which is
in fact a special case of one of his 1975 results.
(The paper  also provides the observation
that the (OptP) function case follows immediately from that.)

\subparagraph{Credit Where Credit Is Due and Blame Where Blame Is Due}
It is important to mention up front that, as this is a tutorial, the
credit for the results here belongs not to the authors of this
tutorial, but to the author of the underlying paper, namely Richard
Ladner.  All of the results of this paper are either explicitly in his
seminal paper on delayed diagonalization or are implicit from
or (for the case of
Section~\ref{sect:functions}) follow easily from
its
results and techniques.  Similarly, though the particular proof write-up of
Theorem~\ref{thm:main} and the framing of
the theorem are our attempts to frame a clear yet very accessible
proof for a tutorial article, it is very important to stress that
all we are doing is employing Ladner's breakthrough technique,
delayed diagonalization, that he developed to prove results of this
sort and of many related sorts, and indeed the proof is
his in every sense other than that any errors our version might have,
which of course are ours.
In fact, in some sense we are
giving a rather long proof to get a result
weaker than ones that his original paper gets;
the reason for this is that our goal here is to be
an expository paper, and to make as clear as possible, a particular
flavor of delayed diagonalization.  So in brief,
all the ideas here and much of the detail is
due to the seminal paper of Ladner---except for
any errors here, as those will
be due to flaws on our part in writing this tutorial.\footnote{Some Fine Print
and Disclaimers: Ladner's
article is in part focused on Turing reductions, as was common
back then.  Yet it also weaves in explicitly, and implies,
a wide range of results about many-one reductions.
In particular, the reader wanting to
see Ladner's
far more general treatment of
the type of thing we cover here is enthusiastically pointed to
Ladner's seminal paper~\cite{lad:j:np-incomplete}, and
in particular to, on his page~160, his Theorem~2
which is a quite general version of the
central result that we are presenting in this article, i.e.,
his
Theorem~2 for the case of $A$ being any P set
and $B$ being an NP-complete (i.e., NP-many-one-complete)
set is, in effect, the special case being presented
in Section~\ref{sect:sets} as
Theorem~\ref{thm:main},
give or take the fact that
in Theorem~\ref{thm:main} here we have put right into the
theorem statement some details of the simple splitting's framework,
namely,
the polynomial-time function $r$ and how it controls the splitting.
Ladner's Corollary~2.1 on page~160
of his paper gives the many-one analogue of
his Theorem~2.}

\subparagraph{Organization} The rest of this article is organized as follows.
Section~\ref{s:lit} mentions some related or contrasting
results.
Section~\ref{s:defs} provides some preliminaries and definitions.
Section~\ref{sect:sets} contains our write-up, but using Ladner's
delayed diagonalization, proving the result, due to Ladner,
that if P and NP differ, then there exists a pair of disjoint, non-NP-complete
sets in $\mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP} - \mbox{\rm P}$ whose union is NP-complete.
The
case of function composition described above will then follow easily,
and is covered in Section~\ref{sect:functions}, and
Section~\ref{s:gen} provides a brief teaser for some of the
rest of the world of results that Ladner's work provides and/or
underpins.

\section{Related and Contrasting
Work}\label{s:lit}

The fascinating related work of Gla{\ss}er et
al.~\cite{gla-sel-tra-wag:j:union-disjoint} has a different focus.
That paper on the complexity of unions of disjoint sets primarily
focuses on whether unions of disjoint NP-complete sets remain hard.
That paper does have a section---Section 4.2 in that paper's
numbering---where the union of two disjoint sets is harder than its
components, but the results of that section do not overlap at all with
Ladner's~\cite{lad:j:np-incomplete}
 work, due to Gla{\ss}er et al.'s focus on
 \emph{equivalent} (to each other) constituent sets.

Another related paper by Gla{\ss}er et al.~\cite{gla-pav-sel-zha:j:splitting}
shows that every nontrivial
(in the sense of the set and its complement each
containing at least two elements)
NP-complete set is (so-called)
m-mitotic.  This
result is interesting for us here because it implies that every nontrivial
NP-complete set can be partitioned into two P-separable sets that are
NP-complete.  However, while Ladner's work splits NP-complete sets
into
NP-\emph{non}complete NP sets,
Gla{\ss}er et al.\ are interested in
splitting NP-complete sets into NP-{\em complete} sets.

We also mention the work of Hemaspaandra et
al.~\cite{hem-jia-rot-wat:j:join-lowers} that shows that the join
operator (the marked union operator) can yield a set of lower
complexity (in the extended low hierarchy) than either of its
constituents.  This regards a focus \emph{opposite that of
Ladner's work presented in this paper}.
In particular,
that work is about using
combinations to lower complexity; the
focus of the Ladner work that we are presenting
is on using combinations to rise from
non-NP-completeness to NP-completeness.

We prove Ladner's key result using {\em team
  diagonalization}.  Delayed diagonalization is the powerful technique
first used by Ladner~\cite{lad:j:np-incomplete} (see also,
e.g.,~\cite{koz:j:subrecursive,sch:j:uni,reg:j:diag-unif-fixed-point,for:j:diagonalization,reg-vol:j:gap})
to show that if $\mbox{\rm P} \not= \mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$, then there are incomplete
sets in $\mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP} - \mbox{\rm P}$.
Many
people, rather naturally given which example one
tends to see in courses and textbooks, think of delayed diagonalization
as
the technique of having one set handle
a list (actually two lists) of requirements by looking deeply into its
own history.  But in fact, delayed diagonalization is far more
flexible and powerful than merely being able to do that.
In (what we here will call)
team diagonalization, though, Ladner in effect has two
sets, each with its own list of requirements to
satisfy, but the two sets will take long turns as to which of
them is working on its requirements, and while one is doing that,
the other will politely remain simple and boring.  Loosely put, the
sets will each respect the goals of the other set, and
will take on burdens in a completely coordinated ``lock-step''
fashion.

\section{Preliminaries}\label{s:defs}
For each string $x$, the number of characters in $x$ will be
denoted $|x|$.
For each set $A$ and each natural number $k$, $A^{=k}$ will
denote $\{ x ~|~ x \in A \land |x| = k\}$.
We take all sets and classes to be with respect to
the
alphabet $\Sigma = \{0,1\}$.
The symmetric difference
operation for sets,
$(A-B)  \cup  (B-A)$,
will be denoted
$A\bigtriangleup B$.

All logarithms in this paper are base two, e.g., $\log\log i$ means
$\log_2(\log_2(i))$.

We say $A \le^p_m B$ exactly if $A$ is polynomial-time many-one
   reducible to $B$ (i.e., there is a polynomial-time function
$f$ such that, for each $x$, it holds
that $x\in A \iff f(x)\in B$).
A set $B$ is NP-hard (with respect to $\le^p_m$
  reductions) exactly if for all $A \in \mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$, $A \le^p_m B$.
A set $B$ is NP-complete (with respect to $\le^p_m$
  reductions) exactly if $B\in\mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$ and $B$ is NP-hard.
We say $A \le^p_T B$ if $A \in \mbox{\rm P}^B$.
A set $B$ is NP-hard with respect to $\le^p_T$
  reductions exactly if for all $A \in \mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$, $A \le^p_T B$.
A set $B$ is NP-complete with respect to $\le^p_T$
  reductions exactly if $B\in\mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$ and $B$ is NP-hard with
respect to $\le^p_T$ reductions.

Sets $A$ and $B$ are said to be P-separable exactly if
there exists a set $L \in \mbox{\rm P}$ such that $A \subseteq L \subseteq
\overline{B}$, i.e., there is a polynomial-time set that is a
(possibly nonstrict) superset
of $A$ yet has no intersection with $B$.

 Given functions $f$ and $g$, we say that $f \le ^p_m g$ ($f$
 functional many-one reduces to $g$) if there are polynomial-time functions
 $h_1$ and $h_2$ such that, for all $x$,
it holds that
$f(x) = h_2(g(h_1(x)))$~\cite{zan:j:sharp-p}.
Functional many-one reductions are even more restrictive  than
metric reductions~\cite{kre:j:optimization}
(which have almost the same definition except they
allow $h_2$ to have direct access to $x$, i.e., the definition's key
part is
$f(x) = h_2(x,g(h_1(x)))$)
and are most commonly studied in the context of
$\mbox{\rm \#P}$-completeness in order to prove stronger completeness results
than mere $\mbox{\rm \#P}$-metric-completeness or $\mbox{\rm \#P}$-Turing
completeness.
For example, Valiant's
notion of $\mbox{\rm \#P}$-completeness
in his seminal
paper~\cite{val:j:permanent}
is the Turing-reduction notion, and for the permanent of $(0,1)$ matrices
the reduction he builds is not a many-one reduction
(although for the permanent of $(-1,0,1,2,3)$ matrices
Valiant
does establish
$\mbox{\rm \#P}$-many-one-completeness);
$\mbox{\rm \#P}$-many-one-completeness for the permanent of $(0,1)$-matrices
was obtained only more than a decade later,
by
Zank{\'{o}}~\cite{zan:j:sharp-p}.
As another example,
Deng and Papadimitriou's~\cite{den-pap:j:solution-concepts}
proof that the Shapley--Shubik power index
is $\mbox{\rm \#P}$-metric-complete was later
strengthened to a $\mbox{\rm \#P}$-many-one-completeness
result~\cite{fal-hem:j:power-compare}.

Let $\chi_A$ denote the characteristic function of $A$, that is,
$\chi_A(x)$ equals 0 if $x\not\in A$ and equals 1 if $x\in A$.
We say a function $g$ is NP-hard exactly if, for every
$A\in\mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$, $\chi_A \le^p_m g$.  (Note that this is equivalent to
$\chi_{SAT} \le^p_m g$.) We say that a function $g$ is NP-Turing-hard
exactly if, for all $A\in\mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$, $A \in \mbox{\rm P}^g$ (equivalently, $\mbox{\rm SAT} \in \mbox{\rm P}^g$).

We remark that in the literature when ``NP-hard functions'' are
mentioned, the term often means what we here call NP-Turing-hard.
However, for clarity, in this paper we always use, for both sets and
functions, the terms NP-hard (for the many-one case) and
NP-Turing-hard (for the Turing case).
The key theorems statements here---in particular,
Theorems~\ref{thm:main},
\ref{t:optp},
and
\ref{thm:exp}---are
stated for the most demanding choices regarding many-one versus
Turing reductions (even when this requires mixing and
matching within the theorem statements, as indeed happens in
each of these three theorem statements),
and so they imply the weaker choices.

\section{Splitting NP-Complete Sets into NP-Incomplete Sets}  \label{sect:sets}

The following captures Ladner's
beautiful insight that
if $\mbox{\rm P} \not= \mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$, then each NP-complete set
can be built from (or looked at from the
other direction, partitioned into)
two non-NP-complete NP sets, in a very simple way.

\begin{theorem}%
\label{thm:main}
If
$\mbox{\rm P} \not= \mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$ and
$S$ is an
$\mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$-complete set,
then there is a function $r: \mathbb{N} \rightarrow \mathbb{N}$
such that, for all $n$, $r(n)$ can be computed in time polynomial in
$n$ and the following disjoint sets $A$ and $B$
belong to $\mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP} - \mbox{\rm P}$, satisfy
$A \cup B = S$,
 and
are not $\mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$-hard even under
polynomial-time Turing reductions:
\begin{equation} \label{eq:def-of-A}
  A = \left\{ x ~|~ x \in S \mbox{ and } r(|x|) \mbox{ is even} \right\}
\end{equation}
and
\begin{equation}  \label{eq:def-of-B}
  B = \left\{ x ~|~ x \in S \mbox{ and } r(|x|) \mbox{ is odd} \right\}.
\end{equation}
\end{theorem}
\begin{proof}
Suppose $\mbox{\rm P} \not= \mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$.  Let
$M_1, M_2, \ldots $ be a standard enumeration of deterministic
oracle Turing machines, each of which is explicitly polynomially
clocked (upper-bounded) independently of its oracle.
We assume, w.l.o.g., that the enumeration and the clocking are such
that there is a universal oracle Turing machine
$\mathcal{U}$ such that the following is true:
\begin{enumerate}
\item For each $j \geq 1$, each $x$, and each
$A$,   $\mathcal{U}^A(x,j)$ simulates
$M^A_j(x)$ (in the sense that $x \in L(M_j^A) \iff
x \in L(\mathcal{U}^A(x,j))$), and
\item For each $j \geq 1$,
  each $x$, and each $A$, $\mathcal{U}^A(x,j)$ runs in time at
most $|x|^j + j$.\footnote{Technical aside (that we suggest ignoring
during a first reading): The w.l.o.g.s~in that
sentence and a few lines above are the kind of somewhat painful
groundwork that is often skipped over---as we also will mostly do
here.  But, to touch for those interested on what is
under the hood:  The natural way to build a nice clocked enumeration is
to pair each machine (from a truly standard enumeration of all Turing
machines) together with every possible clock drawn from some nice family of
polynomials that for every polynomial has at least one member that
majorizes that polynomial over all natural numbers.  The typical
family used for that is $n^k + k$.  One needs to then interlace and
assign numbers in the enumeration so that even the earliest members of
the enumeration meet their own claimed time bounds (such as
that the $k$th machine will run in time $n^k + k$), and doing that
often involves delaying (not at all in the same sense
of the word as in delayed diagonalization)
when machines come in (i.e., making sure their location in
the enumeration has a high enough number) or even making some
machines in our list dummy machines that ignore everything and in one
step halt.  And in doing what was just described, one has to account
for the fact that clocking the time of a machine itself has overhead,
since one puts a supervisor on top of the machine; but the overhead is
mild---certainly at most polynomial.  Beyond that, here we want to be
able to uniformly simulate any given machine on the fly, and so one
also has to take into account the cost of the universal machine's own
simulation of machines---itself also incurring a mild overhead---so
that whatever claim one wants to make
about the universal machine's running times is correct.
Despite that, all the w.l.o.g.~claims above indeed can be routinely
achieved.  Important in that is that each (deeply) underlying machine is
paired with polynomials (infinitely many)
greater than particular given polynomial $p$, and so
basically each machine appears infinitely often on the listing, and indeed
occurs with any particular needed polynomial ``headroom for
simulation'' even on top of the underlying time cost.  So if an
(deeply) underlying machine with a given oracle $A$ does happen to run in some
polynomial time, one of the machines in our enumeration will capture
that in such a way that even its simulation within the universal
machine will duplicate, under oracle $A$, the action of the underlying
machine in terms of acceptance and rejection, and will do so
relative to our time claims without
being cut off by time issues.}
\end{enumerate}

Let $S$ be an an arbitrary NP-complete set.  Let $c\ge 1$ be a constant such that $S
\in \mbox{\rm DTIME}(2^{n^c})$.
Let $A$ and $B$ be defined by Eqns.~(\ref{eq:def-of-A}) and (\ref{eq:def-of-B});
of course, for those definitions to be meaningful, we will
need to define $r$.
In particular, we
will now define $r$ such that $r$ is nondecreasing, and
$r(n)$ can be computed in time polynomial in $n$.
It follows, keeping in mind
that $S\in \mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$, that $A \in \mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$ and
$B \in \mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$.  It also follows, from the definition of
$A$ and $B$, that $A$ and $B$ are disjoint and satisfy
$A \cup B = S$.
In addition, our definition of $r$ will be such that
the other claims in the conclusion of Theorem~\ref{thm:main}
hold, namely, that neither $A$ nor $B$ belongs to $\mbox{\rm P}$,
and neither $A$ nor $B$ is NP-hard even under
polynomial-time Turing reductions.

Let $r(0) = r(1) = r(2) = 2$.
To define $r$, we describe a procedure that, for any $i \ge 2$, computes the value
$r(i+1)$ in time polynomial in $i$ based on the values the
values $r(0), r(1), \ldots , r(i)$.

\medskip

\noindent {\bf Computation of  $\boldsymbol{r(i+1)}$ based
  on $\boldsymbol{r(0), r(1), \ldots , r(i) \; (i \ge 2):}$}

When we determine $r(i+1)$, we try to diagonalize against machine
$M_{\lfloor   r(i)/2\rfloor}$. If $r(i)$ is odd then we try to make sure that
$M_{\lfloor   r(i)/2\rfloor}$ does not decide SAT with the help of
oracle $A$ and if $r(i)$ is even then we try to make sure that
$M_{\lfloor   r(i)/2\rfloor}$ does not decide SAT with the help of
oracle $B$.
If we succeed then we set $r(i+1) = r(i)+1$.
Otherwise, we set $r(i+1) = r(i)$.  (Then
the same machine and oracle will be tried to diagonalize against
when $r(i+2)$ is determined.)

If
\begin{equation} \label{eq:1}
  2^{{\left( (\log\log i)^{\lfloor r(i)/2 \rfloor } +  \lfloor r(i)/2 \rfloor  \right)}^c}  \ge i
\end{equation}
then the diagonalization fails, and we set $r(i+1) = r(i)$.
Otherwise there are two cases, as follows.
(As one reads the cases, the fact that $A$ and $B$ are being used
 in text that in part is also creating them may seem circular.  But why
 this is not
fatally  naughty is explained in the discussion justifying
 the correctness of the construction.)
\begin{description}
\item[Case 1: $\boldsymbol{r(i)} $ is odd.]

We try to diagonalize against $M_{\lfloor r(i)/2\rfloor}$ with oracle $A$.
Determine if there exists
a string $y$ of length at most $\log\log i$ satisfying
\begin{equation} \label{eq:diag-against-A}
  y \in \mbox{\rm SAT} \Longleftrightarrow y \notin L(M_{\lfloor r(i)/2\rfloor}^A).
\end{equation}
If such a $y$ exists then
$\mbox{\rm SAT}$ is not polynomial-time Turing reducible to
$A$ via oracle machine $M_{\lfloor r(i)/2\rfloor}$.
Hence the diagonalization is successful, and so we set $r(i+1) = r(i)+1$.
Otherwise, we set $r(i+1) = r(i)$.
\item[Case 2: $\boldsymbol{r(i)}$ is even.]

We try to diagonalize against $M_{\lfloor r(i)/2 \rfloor}$ with oracle $B$.
Determine if there exists
a string $y$ of length at most $\log\log i$ satisfying
\begin{equation} \label{eq:diag-against-B}
  y \in \mbox{\rm SAT} \Longleftrightarrow y \notin L(M_{\lfloor r(i)/2\rfloor}^B).
\end{equation}
If such a $y$ exists then
$\mbox{\rm SAT}$ is not polynomial-time Turing reducible to
$B$ via oracle machine $M_{\lfloor r(i)/2\rfloor }$.
Hence the diagonalization is successful, and so
we set $r(i+1) = r(i)+1$.
Otherwise, we set $r(i+1) = r(i)$.
\end{description}
For any given $n$, we compute $r(n)$ as follows:
For $i = 2, 3, \ldots , n-1$, we successively compute $r(i+1)$
as described above
based on the values $r(0), r(1), \ldots , r(i-1), r(i)$.
Note that if for each $i \in \{ 2, 3, \ldots , n-1\}$ this is possible in
time polynomial in $i$, then $r(n)$ can be computed in time
polynomial in~$n$.

\bigskip

It remains to show that this construction is correct.

\begin{enumerate}
\item The construction of $r(i+1)$ in cases 1 and 2 above obviously depends on
  the oracle sets $A$ and $B$, which according to Eqn.~(\ref{eq:def-of-A}) and
  Eqn.~(\ref{eq:def-of-B}) depend on $r$ being odd or even.  However,
  the construction is not circular: To determine whether
  $y \notin L(M_{\lfloor r(i)/2\rfloor}^{(\cdot)})$, we only need to
  know the oracle up to length
  $(\log\log i)^{\lfloor r(i)/2 \rfloor } + \lfloor r(i)/2 \rfloor$, which is smaller than $i$ by Eqn.~(\ref{eq:1}).
Hence the only $r(k)$ values that $r(i+1)$ may depend on
are values $r(k)$ for $k$ less than than $i$.
\item\label{correct-time}
 We
argue---and recall that, as noted above, showing this
establishes
that
$r(n)$ can be computed (from scratch) in time polynomial in~$n$---that
for each $i\ge 2$,
the procedure
  that determines $r(i+1)$ based on $r(0), r(1), \ldots , r(i-1), r(i)$
  runs in time polynomial in $i$.
  To this end, we have to show that
  the conditions in
  Eqns.~(\ref{eq:diag-against-A}) and~(\ref{eq:diag-against-B}) can be
  checked for all $y$ with $|y| \le \log\log i$ in time polynomial in
  $i$.

  First, for each $y$, checking whether $y \in \mbox{\rm SAT}$ can be done by brute
  force in time polynomial in
  $i$ since $y$ is of length at most $\log \log i$.

  Second, the running time of $M_{\lfloor r(i)/2\rfloor}^{(\cdot)}$ on inputs
  of length $\log \log i$ is at most
  $t = (\log\log i)^{\lfloor r(i)/2 \rfloor } + \lfloor r(i)/2 \rfloor$.
  Hence the length of each oracle query $q$ is at most
  $t$.
  %
  Since $S \in \mbox{\rm DTIME}(2^{n^c})$, there exists a constant
$s > 0$ such that
we can determine
in time
  \[
  s\cdot 2^{t^c} \leq s \cdot 2^{{\left( (\log\log i)^{\lfloor r(i)/2 \rfloor } + \lfloor r(i)/2 \rfloor  \right)}^c}
  \]
whether $q \in S$.
And since we got past the test of Eqn.~(\ref{eq:1}),
we thus know that the time used is at most $s \cdot i$.

  Finally, note that no more than $(2\log i) -1 $
different strings
  %
  %
  %
  %
  %
  %
  $y$ have to be checked in whichever one of
  Eqns.~(\ref{eq:diag-against-A}) or~(\ref{eq:diag-against-B}) applies.
  Hence
  the whole procedure of determining $r(i+1)$ based on
  $r(0), r(1), \ldots , r(i)$
  takes time polynomial in $i$.
\item
  In the above construction, we try to diagonalize against machine
$M_{\lfloor   r(i)/2\rfloor}$ when we determine $r(i+1)$.
  Hence to check that we eventually
  diagonalize
  against all deterministic polynomial-time oracle Turing machines
  $M_j^{(\cdot)}$, we only have to show that $r(i)$---which, recall,
is nondecreasing---grows indefinitely.

  Suppose that there exist $k$ and $n_0$ such that $r(n) = k$ for all $n \ge
  n_0$.  Then there are two cases:
  \begin{description}
   \item[Case 1: $\boldsymbol{k}$ is odd.]\ \\
     Then for all $i \ge n_0$ it holds that, for all $y$ with $|y| \le \log\log i$:
     \begin{align*}
         y \in \mbox{\rm SAT} & \Longleftrightarrow y \in L(M_{\lfloor
           r(i)/2\rfloor}^A), \mbox{ and}
     \end{align*}
     \begin{align*}
          y \in L(M_{\lfloor
           r(i)/2\rfloor}^A) &
                    \Longleftrightarrow y \in L(M_{\lfloor
           k/2\rfloor}^A).
\end{align*}
So for every string $y$, it holds that
$         y \in \mbox{\rm SAT} \Longleftrightarrow
y \in L(M_{\lfloor
           k/2\rfloor}^A)$.
     Furthermore, by construction, $A$ contains in this case only finitely many strings.
     It follows that SAT can be decided in polynomial time, which
     contradicts our assumption that $\mbox{\rm P} \not= \mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$.
  \item[Case 2: $\boldsymbol{k}$ is even.]\ \\
     Then for all $i \ge n_0$ it holds that,
for all $y$ with $|y| \le \log\log i$:
     \begin{align*}
         y \in \mbox{\rm SAT} &\Longleftrightarrow y \in L(M_{\lfloor
           r(i)/2\rfloor}^B) \mbox{ and}
     \end{align*}
     \begin{align*}
 y \in L(M_{\lfloor
           r(i)/2\rfloor}^B)
                    &\Longleftrightarrow y \in L(M_{\lfloor
           k/2\rfloor}^B).
     \end{align*}
So  for every string $y$, it holds that
$         y \in \mbox{\rm SAT} \iff
y \in L(M_{\lfloor
           k/2\rfloor}^B)$.
     Furthermore, by construction, $B$ contains in this case only finitely many strings.
     It follows that SAT can be decided in polynomial time, which
     contradicts our assumption that $\mbox{\rm P} \not= \mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$.

\end{description}

\item  Finally, we must argue that $A \not\in\mbox{\rm P}$ and $B\not\in\mbox{\rm P}$.
(Recall that, at the start of the proof, we
pointed out that both $A$ and $B$ belong to NP, that $A$ and $B$ are
disjoint, and that $A\cup B = S$.
So we do not need to re-argue those points here.)
Suppose for example that
$A \in \mbox{\rm P}$.   That implies, since $S = A \cup B$, that
$\mbox{\rm P}^S \subseteq \mbox{\rm P}^B$.  So the fact that $S$ is NP-complete
certainly yields that $B$ is NP-Turing-hard.  But that
contradicts the fact that, as argued above, $B$ is not
NP-Turing-hard.  So $A\not\in \mbox{\rm P}$.

By the analogous
argument, it also holds that $B \not\in \mbox{\rm P}$.~\qedhere
\end{enumerate}
\end{proof}

One has the following easy corollaries.
(For disjoint sets $A_1$ and $A_2$, note that
$A_1\cup A_2 = A_1 \bigtriangleup A_2$, so one could equally well
in the theorems below make the theorems be stated not about a union
($A_1\cup A_2$)
but about
a symmetric difference
($A_1 \bigtriangleup A_2$).)
\begin{corollary} \label{coroll:1}
$\mbox{\rm P} \not= \mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$ if and only if for each $\mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$-complete set $S$ there
exist disjoint $\mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$ sets $A_1 \subseteq S$ and $A_2 \subseteq S$ such
that $S =
A_1 \cup A_2
$ and neither $A_1$ nor $A_2$ is $\mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$-complete.
\end{corollary}
\begin{proof}
The direction from left to right follows
directly from
Theorem~\ref{thm:main}.

Now suppose that $\mbox{\rm P} = \mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$.  Let $S$ be any set such that $S \not=
\Sigma^*$ and $S \not=\emptyset$.  Then $S$ is NP-complete.  The only
subset of $S$ that is not NP-complete is the empty set.  Hence there
are no NP-incomplete sets $A_1 \subseteq S$ and $A_2 \subseteq S$ such that $A_1
\cup A_2 = S$.~\end{proof}
If $\mbox{\rm P} \not= \mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$ then the sets $A_1$ and $A_2$ in
Corollary~\ref{coroll:1} are both not in P\@.

\begin{corollary} \label{coroll:2}
If $\mbox{\rm P} \not= \mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$, then every $\NP$-complete set $S$ has the property that
there is a $\mbox{\rm P}$ set $D$ such that both $S \cap D$ and $S \cap
\overline{D}$ are $\NP$-incomplete (i.e., are in $\NP$ yet are not $\NP$-complete).

That is, for every $\NP$-complete set $S$ there exist $\mbox{\rm P}$-separable sets
$A_1$ and $A_2$ such that $S = A_1 \cup A_2
$ and neither $A_1$ nor
$A_2$ is $\NP$-hard.
\end{corollary}

\begin{proof}
Let
\[
  D = \left \{ x \in
\Sigma^*  ~|~ r(|x|) \mbox{ is even} \right\}.
\]
Note that
$A = S \cap D$ and $B = S \cap \overline{D}$ are the sets $A$ and $B$
in Theorem~\ref{thm:main}.~\end{proof}

We
mention a result by
Gla{\ss}er et
al.~\cite{gla-pav-sel-zha:j:splitting} that is similar in spirit to
Corollary~\ref{coroll:2} even though it is trying to achieve the opposite.
Gla{\ss}er et
al.~\cite{gla-pav-sel-zha:j:splitting} call a set
$A$ nontrivial exactly if
both $A$ and $\overline{A}$ contain at least two elements.
Gla{\ss}er et al. showed (among other things) that every
nontrivial set $A$ that is NP-complete is also m-mitotic. This easily
implies the following theorem.

\begin{theorem}[\cite{gla-pav-sel-zha:j:splitting}] \label{thm:glasser-splitting}
If $\mbox{\rm P} \not= \mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$, then every $\NP$-complete set $S$ has the property that
there is a $\mbox{\rm P}$ set $D$ such that both $S \cap D$ and $S \cap
\overline{D}$ are $\NP$-complete.
\end{theorem}

While Corollary~\ref{coroll:2} shows (if $\mbox{\rm P} \not= \mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$)
that every NP-complete set $S$ can be split into P-separable sets that
are {\em not} $\mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$-complete, Gla{\ss}er et al.'s theorem implies
that
(regardless of whether or not
$\mbox{\rm P} \not= \mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$)
every nontrivial
NP-complete set $S$ can be split into P-separable sets such that
both sets {\em are} indeed NP-complete.

Note that regarding $\mbox{\rm P} = \mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$ we have the following.

\begin{theorem} \label{thm-was-coroll:3}%
If $\mbox{\rm P} = \mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$, then no $\NP$-complete set $S$ has the property that
there is a $\mbox{\rm P}$ set $D$ such that both $S \cap D$ and $S \cap
\overline{D}$ are $\NP$-incomplete (i.e., are in
$\NP$ yet are not $\NP$-complete).
\end{theorem}

\begin{proof}
Suppose $\mbox{\rm P} = \mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$.  Then the only NP-incomplete sets are $\emptyset$
and
$\Sigma^*$.
But the only sets that can be formed by the union of two sets
chosen from $\{\emptyset,\Sigma^*\}$ are $\emptyset$ and $\Sigma^*$,
which as just mentioned are NP-incomplete, yet the theorem's
claim is that $S$ is NP-complete.~\end{proof}
Note that Corollary~\ref{coroll:2} and Theorem~\ref{thm-was-coroll:3} are not
converses of each other.  They are actually stronger than just giving
an ``if and only'' statement.

The following notes that the sets being used are not merely
disjoint in the sense that no string participates in both of the sets,
but also differ so strongly that no length participates in both of
the sets.

\begin{definition}
  Two sets $A_1$ and $A_2$ are \emph{strongly disjoint} exactly if, for every
  $k$,  $A_1^{=k} = \emptyset$ or $A_2^{=k} = \emptyset$.
\end{definition}

\begin{corollary} \label{coroll:4}
$\mbox{\rm P} \not= \mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$ if and only if for each $\NP$-complete set $S$ there
exist strongly disjoint, $\mbox{\rm P}$-separable, $\NP$ sets $A_1 \subseteq S$ and $A_2 \subseteq S$ such
that $A_1 \cup A_2 = S$ and neither $A_1$ nor $A_2$ is $\NP$-complete.
\end{corollary}
\begin{proof}
The direction from left to right follows easily from
Theorem~\ref{thm:main} because it is easy to see that the sets $A$ and
$B$ in that theorem are strongly disjoint P-separable NP-sets.

The direction from right to left follows directly from Corollary~\ref{coroll:1}.~\end{proof}

\section{Composition of Functions: Hard Functions Composed from
  Nonhard Ones} \label{sect:functions}

Consider NPTMs where each nondeterministic path outputs one value
(say, a string over the alphabet $
\Sigma^*
$).  Paths that do not
explicitly output a value are by convention viewed as outputting
$\epsilon$, the empty string.  A function $f$ is said to be in
$\mbox{\rm OptP}$~\cite{kre:j:optimization}
exactly if  there is a thus-viewed NPTM $N$ such that, for
each $x$, $f(x)$ is the lexicographically maximum value among all values
output by paths of $N$ on input $x$.
(By lexicographical order, we mean as is standard the order in which
$\epsilon < 0 < 1 < 00 < 01 < 10 < 11 < 111 < \dots$.
$\mbox{\rm OptP}$ is often viewed as having codomain $\mathbb{N}$ rather than
$\Sigma^*$,
but by the natural bijection, the views are the same.)

We now observe, as an easy consequence of the main result of
the previous section, that the composition of non-NP-hard
NP optimization functions can achieve
NP-hardness.  Let $g \circ f$ denote the composition of
the functions, i.e., the function defined by, for
each $x$, $(g \circ f)(x) = g(f(x))$.

\begin{theorem}\label{t:optp}
If $\mbox{\rm P} \not= \mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$, then there exist $\mbox{\rm OptP}$ functions $f$ and $g$
such that
neither $f$ nor $g$ is $\NP$-hard (or
even $\NP$-Turing-hard), yet $g \circ f$ is an $\NP$-hard $\mbox{\rm OptP}$ function.
\end{theorem}
\begin{proof}
  Let $S = \mbox{\rm SAT}$ and let $A$ and $B$ be disjoint NP sets such that neither $A$ nor $B$ is
  %
  %
  NP-Turing-complete and $A \cup B=S$.  Such sets exist according to
  Theorem~\ref{thm:main}.

  We define $f$ and $g$ as follows: \medskip

  \noindent For each $x \in
\Sigma^*,$ \medskip

  $
     f(x) =
      \begin{cases}
         1^{|x|+1}  & \mbox{if } x \in A\\
         0x & \mbox{otherwise,}
      \end{cases}$ \medskip

  \noindent  and for each $z \in
  %
  %
\Sigma^*$,\medskip

  $  g(z) =
      \begin{cases}
         1  & \mbox{if } (z\mbox{'s first bit is a 1})\mbox{ or } (z = 0x \mbox{ and } x \in B) \\
         0 & \mbox{otherwise.}
      \end{cases}
  $ \medskip

  \noindent It is easy to see that for each $x \in
\Sigma^*$,\medskip

  $
     g(f(x)) =
      \begin{cases}
         1  & \mbox{if } x \in A\cup B \\
         0 & \mbox{otherwise.}
      \end{cases}
  $\medskip

  Hence $\chi_{SAT} \le^p_m g\circ f$, and therefore $g\circ f$
is NP-hard under
  polynomial-time many-one reductions.  Furthermore, $f$, $g$, and $g\circ f$
  are easily seen to be $\mbox{\rm OptP}$ functions.

  It remains to show that $f$ and $g$ are not NP-Turing-hard.

  Suppose $f$ is
  NP-Turing-hard.  Then there exists a polynomial-time oracle machine $M$
  such that $\mbox{\rm SAT} = L(M^f)$. Since given $A$ as an oracle it is easy to compute
  $f$, it follows that there is a polynomial-time oracle Turing
  machine $M'$ such that $\mbox{\rm SAT} = L(M'^A)$.  But this is a
  contradiction because we assumed that $A$ is not NP-Turing-hard.

  In the same way, we can show that $g$ is not NP-Turing-hard.~\end{proof}

\section{Generalizations and Variants}\label{s:gen}

Theorem~\ref{thm:main} can be generalized/varied in many ways.
Please see Ladner's original paper~\cite{lad:j:np-incomplete} for
results
in such
a general form that this can be done very
broadly.  But for
now let us mention a few examples.
First, the theorem holds for many classes other than $\mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$
(because Ladner proves it in a very general setting, see
especially p.~160
of his paper), for
instance for PSPACE, EXP, EXPSPACE, EEXP, $\Sigma_i^p$, $\Pi_i^p$, etc.
Second, Theorem~\ref{thm:main} says that we can split $S$ into two
sets that are NP-incomplete.  Clearly, a
straightforward adaptation of the proof
shows that for any integer $k>1$, $S$ can be split into $k$
incomplete sets.  As an example, we mention a variation of
Theorem~\ref{thm:main} for the case of EEXP, with things split into three
incomplete sets.  Of course, here one does
not need any assumption of the form $\mbox{\rm P}
\not= \mbox{\rm NP}}\newcommand{\NP}{\mbox{\rm NP}$.
\begin{theorem} \label{thm:exp}
Let $S$ be any
{\rm{}EEXP}-complete set.
Then there is a function $r: \mathbb{N} \rightarrow \mathbb{N}$
such that for all $n$, $r(n)$ can be computed in time polynomial in
$n$ and the following pairwise-disjoint
$\rm EEXP$ sets $A$, $B$, and $C$
satisfy $S = A\cup B \cup C$
and are not {\rm{}EEXP}-hard under
polynomial-time Turing reductions:
\[
  A = \left\{ x ~|~ x \in S \land (  \congruence{r(|x|)}{0}{3} ) \right\},
\]
\[
  B = \left\{ x ~|~ x \in S \land (  \congruence{r(|x|)}{1}{3} ) \right\},
\]
and
\[
  C = \left\{ x ~|~ x \in S \land (  \congruence{r(|x|)}{2}{3} ) \right\}.
\]
\end{theorem}
The proof differs from the proof of Theorem~\ref{thm:main} in that
one now has to consider three different cases: $r(|x|) \equiv 0
\pmod{3}$, $r(|x|) \equiv 1 \pmod{3}$, and $r(|x|) \equiv 2 \pmod{3}$,
and further, the length of the string $y$ that one uses in one's
diagonalization
must be of length
roughly triple-logarithmic in $i$, that is, computations have to
look even more deeply back within the history.

\subparagraph*{Acknowledgments.}  We thank Max Alekseyev and Daniel
\v{S}tefankovi\v{c} for helpful conversations.  We are
grateful to Richard
Ladner for his work that this paper is presenting, and for his
lifetime's rich range of central contributions
to computer science,
which have
inspired us and so many others.

\bibliographystyle{alpha}

Team Diagonalization