\section{Introduction} \label{sec:intro}

We consider a one-dimensional semilinear hyperbolic system of the form
\begin{align}
            \partial_t p(x,t) + \partial_x u(x,t) &= 0, \qquad x \in (0,1), \ t>0, \label{eq:sys1} \\
\partial_t u(x,t) + \partial_x p(x,t) + a(u(x,t)) &= 0, \qquad x \in (0,1), \ t>0, \label{eq:sys2}
\end{align}
which models, for instance, the damped vibration of a string or the propagation of pressure waves in a gas pipeline.
In this latter application, which we consider as our model problem in the sequel,
$p$ denotes the pressure, $u$ the velocity or mass flux, and
the nonlinear damping term $a(u)$ accounts for the friction at the pipe walls.
The two equations describe the conservation of mass and the balance of momentum
and they can be obtained under some simplifying assumptions from the one dimensional Euler equations with friction; see e.g. \cite{BrouwerGasserHerty11,Guinot08,LandauLifshitz6}.
Similar problems also arise as models for the vibrations of elastic multistructures \cite{LagneseLeugeringSchmidt}
or in the propagation of heat waves on microscopic scales \cite{JosephPreziosi89}.

The system \eqref{eq:sys1}--\eqref{eq:sys2} is complemented by boundary conditions
\begin{align}
   u(0,t) = g_0(t), \quad u(1,t) = g_1(t), \qquad  t>0, \label{eq:sys3}
\end{align}
and we assume the initial values to be known and given by
\begin{align}
  p(x,0) = p_0(x), \quad u(x,0) = u_0(x), \qquad x \in (0,1). \label{eq:sys4}
\end{align}
Motivated by well-known friction laws in fluid dynamics for pipes \cite{LandauLifshitz6},
we will assume here that there exist positive constants $a_1,a_2$ such that
\begin{align} \label{eq:a1}
0 < a_1 \le a'(\xi) \le a_2 \qquad \text{for all } \xi \in \mathbb{R}.
\end{align}
In particular, friction forces are monotonically increasing with velocity.
This condition allows us to establish well-posedness of the system \eqref{eq:sys1}--\eqref{eq:sys4}.
It is also reasonable to assume that $a(-\xi)=-a(\xi)$, i.e.,
the magnitude of the friction force does not depend on the flow direction,
and consequently we will additionally assume that $a(0)=0$.

\medskip

In this paper, we are interested in the inverse problem of determining an unknown
friction law $a(u)$ in \eqref{eq:sys1}--\eqref{eq:sys4} from additional observation
of the pressure drop
\begin{align}
  h(t)=\triangle p(t):= p(0,t) - p(1,t) , \qquad t > 0 \label{eq:sys5}
\end{align}
along the pipe. Such data are readily available in applications, e.g., gas pipeline networks.

\medskip

Before proceeding, let us comment on previous work for related coefficient inverse problems.
By combination of the two equations \eqref{eq:sys1}--\eqref{eq:sys2}, one obtains
the second order form
\begin{align} \label{eq:second}
\partial_{tt} u - \partial_{xx} u + a'(u) \partial_t u = 0, \qquad x \in (0,1), \ t>0,
\end{align}
of a wave equation with nonlinear damping.
The corresponding linear problem with coefficent $a'(u)$ replaced by $c(x)$ has been considered in \cite{Baudouin13,Bukgheim01,ImanuvilovYamamoto01};
uniqueness and Lipschitz stability for the inverse coefficient problem
have been established in one and multiple space dimensions.
A one-dimensional wave equation with nonlinear source term $c(u)$ instead of $a'(u) \partial_t u$
has been investigated in \cite{CannonDuChateau83};
numerical procedures for the identification and some comments on the identifiability
have been provided there.
In \cite{Kaltenbacher07}, the identification of the parameter function $c(\partial_x u)$
in the quasilinear wave equation $\partial_{tt} u - \partial_x ( c(\partial_x u) \partial_x u) = 0$
has been addressed in the context of piezo-electricity;
uniqueness and stability has been established for this inverse problem.
Several results are available for related coefficient inverse problems for
nonlinear parabolic equations; see e.g.
\cite{CannonDuChateau73,DuChateau81,EggerEnglKlibanov05,EggerPietschmannSchlottbom15,Isakov93,Lorenzi86}.
Let us also refer to \cite{Isakov06,KlibanovTimonov} for an overview of available results and further references.

To the best of our knowledge, the uniqueness and stability for the nonlinear coefficient problem
\eqref{eq:sys1}--\eqref{eq:sys5} considered in this paper are still open.
Following arguments proposed in \cite{EggerPietschmannSchlottbom15} for the analysis of
a nonlinear inverse problem in heat conduction, we will derive \emph{approximate stability
results} for the inverse problem stated above, which can be obtained by comparison with
the linear inverse problem for the corresponding stationary problem.
This allows us to obtain quantitative estimates for the reconstruction errors in dependence of the experimental setup,
and provides a theoretical basis for the hypothesis that uniqueness holds,
if the boundary fluxes $g_i(t)$ are chosen appropriately.

For the stable numerical solution in the presence of measurement errors,
we consider a variational regularization defined by
\begin{align}
J(a;p,u) &= \int_0^T |\triangle p(t) - h^\delta(t)|^2 dt + \alpha \|a-a^*\|^2 \to \min    \label{eq:min1}\\
         & \text{subject to } \quad \eqref{eq:sys1}-\eqref{eq:sys4} \quad \text{and} \quad \eqref{eq:a1}. \label{eq:min2}
\end{align}
This allows us to appropriately address the ill-posedness of the inverse coefficient problem \eqref{eq:sys1}--\eqref{eq:sys5}.
Here $\alpha>0$ is the regularization parameter,
$a^*\in \mathbb{R}$ is an a-priori guess for the damping law, and $h^\delta$ denotes the measurements of the pressure drop
across the pipe for the time interval $[0,T]$. The precise form of regularization term will be specified below.

\medskip

As a first step, we establish the well-posedness  of the system \eqref{eq:sys1}--\eqref{eq:sys4}
and prove uniform a-priori estimates for the solution. Semigroup theory for semilinear evolution
problems will be used for that.
In addition, we also show the continuous dependence and differentiability of the states $(u,p)$ with respect to the parameter $a(\cdot)$.

We then study the optimal control problem \eqref{eq:min1}--\eqref{eq:min2}.
Elimination of $(p,u)$ via solution of \eqref{eq:sys1}--\eqref{eq:sys4}
leads to  reduced minimization problem corresponding to Tikhonov regularization for
the nonlinear inverse problem $F(a)=h^\delta$ where $F$ is the parameter-to-measurment mapping
defined implicitly via the differential equations.
Continuity, compactness, and differentiability of the forward operator $F$ are investigated,
providing a guidline for the appropriate functional analytic setting for the inverse problem.
The existence and stability of minimizers for \eqref{eq:min1}--\eqref{eq:min2} then follows with standard arguments.
In addition, we derive quantitative estimates for the error between the reconstructed
and the true damping parameter using an \emph{approximate source condition},
which is reasonable for the problem under consideration.
Such conditions have been used successfully for the analysis of Tikhonov regularization
and iterative regularization methods in \cite{EggerSchlottbom11,HeinHofmann05}.

As a third step of our analysis, we discuss in detail the meaning and the plausibility of this approximate source condition.
We do this by showing that the nonlinear inverse problem is actually close to a linear inverse
problem, provided that the experimental setup is chosen appropriately.
This allows us to derive an approximate stability estimate for the inverse problem,
and to justify the validity of the approximate source condition.
These results suggest the hypothesis of uniqueness for the inverse problem under investigation,
and they allow us to make predictions about the results that can be expected in practice and that are actually observed in our numerical tests.

\medskip

The remainder of the manuscript is organized as follows:
In Section~\ref{sec:prelim} we fix our notation and briefly discuss the underlying linear wave equation without damping.
The well-posedness of the state system \eqref{eq:sys1}--\eqref{eq:sys4} is established in Section~\ref{sec:state}
via semigroup theory. For convenience of the reader, some auxiliary results are summarized in an appendix.
In Section~\ref{sec:forward}, we then investigate the basic properties of the parameter-to-measurement mapping $F$.
Section~\ref{sec:min} is devoted to the analysis of the regularization method \eqref{eq:min1}--\eqref{eq:min2}
and provides a quantitative estimate for the reconstruction error.
The required approximate source condition and the approximate stability of the inverse problem are discussed in Section~\ref{sec:hyp}
in detail.
Section~\ref{sec:num} presents the setup and the results of our numerical tests.
We close with a short summary of our results and a discussion of possible directions for future research.

\section{Preliminaries} \label{sec:prelim}

Throughout the manuscript, we use standard notation for Lebesgue and Sobolev spaces and for classical functions spaces, see e.g. \cite{Evans98}. For the analysis of problem \eqref{eq:sys1}--\eqref{eq:sys4},
we will employ semigroup theory.
The evolution of this semilinear hyperbolic system is driven by the linear wave equation
\begin{align}
\partial_t p(x,t) + \partial_x u(x,t) &= 0, \quad x \in (0,1), \ t>0, \\
\partial_t u(x,t) + \partial_x p(x,t) &= 0, \quad x \in (0,1), \ t>0,
\end{align}
with homogeneous boundary values
\begin{align}
u(0,t)=u(1,t)=0, \quad t>0,
\end{align}
and initial conditions given by $p(\cdot,0)=p_0$ and $u(\cdot,0)=u_0$ on $(0,1)$.
This problem can be written in compact form as an abstract evolution equation
\begin{align} \label{eq:abstract}
y'(t) + A y(t) = 0, \ t>0, \qquad y(0)=y_0,
\end{align}
with state vector $y=(p,u)$, initial value $y_0=(p_0,u_0)$, and operator $A=\begin{pmatrix} 0 & \partial_x \\ \partial_x & 0\end{pmatrix}$. \\[-1ex]
The starting point for our analysis is the following
\begin{lemma}[Generator] \label{lem:generator}
Let $X=L^2(0,1) \times L^2(0,1)$ and $D(A)=H^1(0,1) \times H_0^1(0,1)$. \\
Then the operator $A : D(A) \subset X \to X$ generates a $C^0$-semigroup of contractions on $X$.
\end{lemma}
\begin{proof}
One easily verifies that $A$ is a densly defined and closed linear operator on $X$.
Moreover, $(A y, y)_X = 0$ for all $y \in D(A)$; therefore, $A$ is dissipative.
By direct calculations, one can see that for any $\bar f, \bar g \in L^2(0,1)$, the boundary value problem\begin{align*}
\bar p(x) + \partial_x \bar u(x) &= \bar f(x), \quad x \in (0,1),\\
\bar u(x) + \partial_x \bar p(x) &= \bar g(x), \quad x \in (0,1),
\end{align*}
with $\bar u(0)=\bar u(1)=0$ is uniquely solvable with solution $(\bar p,\bar u) \in H^1(0,1) \times H_0^1(0,1)$.
The assertion hence follows by the Lumer-Phillips theorem \cite[Ch~1, Thm~4.3]{Pazy83}.
\end{proof}
The analysis of the model problem \eqref{eq:sys1}--\eqref{eq:sys4} can now be done in the framework of semigroups.
For convenience, we collect some of the required results in the appendix.

\section{The state system} \label{sec:state}

Let us return to the semilinear wave equation under consideration.
For proving well-posedness of the system \eqref{eq:sys1}--\eqref{eq:sys4},
and in order to establish some additional regularity of the solution, we will assume that
\begin{itemize}\setlength\itemsep{1ex}
 \item[(A1)] $a \in W_{loc}^{3,\infty}(\mathbb{R})$ with $a(0)=0$, $a_0 \le a'(\cdot) \le a_1$, $|a''(\cdot)| \le a_2$, and $|a'''(\cdot)| \le a_3$
\end{itemize}
for some positive constants $a_0,a_1,a_2,a_3>0$.
Since the damping law comes from a modelling process involving several approximation steps,
these assumptions are not very restrictive in practice.
In addition, we require the initial and boundary data to satisfy
\begin{itemize}\setlength\itemsep{1ex}
 \item[(A2)] $u_0=0$ and $p_0=c$ with $c \in \mathbb{R}$;
 \item[(A3)] $g_0,g_1 \in C^4([0,T])$ for some $T>0$, $g_0(0)=g_1(0)=0$, and $g_0'(0)=g_1'(0)=0$.
\end{itemize}
The system thus describes the smooth departure from a system at rest.
As will be clear from our proofs,
the assumptions on the initial conditions and the regularity requirements for the parameter and the initial and boundary data
could be relaxed without much difficulty.
Existence of a unique solution can now be established as follows.

\begin{theorem}[Classical solution] \label{thm:classical} $ $\\
Let (A1)--(A3) hold.
Then there exists a unique classical solution
\begin{align*}
(p,u) \in C^1([0,T];L^2(0,1) \times L^2(0,1)) \cap C([0,T]; H^1(0,1) \times H^1(0,1))
\end{align*}
for the initial boundary value problem \eqref{eq:sys1}--\eqref{eq:sys4} and its norm can be bounded by
\begin{align*}
\|(p,u)\|_{C([0,T];H^1\times H^1)} + \|(p,u)\|_{C^1([0,T];L^2 \times L^2)}
\le C'
\end{align*}
with constant $C'$ only depending on the bounds for the coefficients and the data and the time horizon $T$.
Moreover, $\triangle p := p(0,\cdot)-p(1,\cdot) \in C^\gamma([0,T])$, for any $0 \le \gamma < 1/2$, and
\begin{align*}
\|\triangle p\|_{C^{\gamma}([0,T])} \le C'(\gamma).
\end{align*}
\end{theorem}
\begin{proof}
The proof follows via semigroup theory for semilinear problems \cite{Pazy83}.
For convenience of the reader and to keep track of the constants, we sketch the basics steps:

{\em Step 1:}
We define $\hat u(x,t) = (1-x) g_0(t) + x g_1(t)$ and set
$\hat p(x,t) = \int_0^x \hat p_x(s,t) dx$ with $\hat p_x(x,t) = (x-1) (a(g_0(t))+g_0'(t))  -x (a(g_1(t))+g_1'(t))$.
Then we decompose the solution into $(p,u)=(\hat p,\hat u) + (\tilde p,\tilde u)$
and note that $(\hat p,\hat u) \in C^1([0,T];H^1 \times H^1)$ by construction and assumption (A3).
The second part $(\tilde p, \tilde u)$ solves
\begin{align*}
&&&&\partial_t \tilde p + \partial_x \tilde u &= f_1, && \tilde p(\cdot,0) = \tilde p_0,&&&&\\
&&&&\partial_t \tilde u + \partial_x \tilde p &= f_2, && \tilde u(\cdot,0) = \tilde u_0,&&&&
\end{align*}
with $f_1(t)=-\partial_t \hat p(t) - \partial_x \hat u(t)$, $f_2(t,\tilde u(t))=-\partial_t \hat u(t)-\partial_x \hat p(t)- a(\hat u(t) + \tilde u(t))$
and initial values $\tilde p_0 = p_0 - \hat p(0)$, $\tilde u_0 = u_0 - \hat u(0)$.
In addition, we have $\tilde u(0,t)=\tilde u(1,t)=0$ for $t>0$.
This problem can be written as
abstract evolution
\begin{align*}
y'(t) + A y(t) = f(t,y(t)), \qquad y(0)=y_0,
\end{align*}
on $X=L^2 \times L^2$ with $y=(\tilde p,\tilde u)$, $f(t,y)=(f_1(t),f_2(t,y_2))$, and $D(A)=H^1 \times H_0^1$.

{\em Step 2:}
We now verify the conditions of Lemma~\ref{lem:classical2} stated in the appendix.
By assumptions (A2) and (A3) one can see that $y_0 = (\tilde p_0,\tilde u_0) \in H^1(0,1) \times H_0^1(0,1)$.
For every $y \in H^1(0,1) \times H_0^1(0,1)$, we further have $f(t,y) = (f_1(t),f_2(t,y_2)) \in H^1(0,1) \times H_0^1(0,1)$ by construction of $\hat u$ and $\hat p$. Moreover, $f$ is continuous w.r.t. time.
Denote by $|u|_{H^1}=\|\partial_x u\|_{L^2}$ the seminorm of $H^1$. Then
\begin{align*}
|f_2(t,v) - f_2(t,w)|_{H^1}
&= |a(\hat u(t) + v) - a(\hat u(t)+w)|_{H^1} \\
&= \int_0^1 |a'(\hat u(t) + (1-s) v + s w) (v-w)|_{H^1} ds \\
&\le a_1 |v-w|_{H^1} + a_2 |\hat u(t) + (1-s) v + s w|_{H^1} |v-w|_{H^1}.
\end{align*}
Here we used the embedding of $H^1(0,1)$ into $L^\infty(0,1)$ and the bounds for the coefficients.
This shows that $f$ is locally Lipschitz continuous with respect to $y$, uniform on $[0,T]$.
By Lemma~\ref{lem:classical2}, we thus obtain local existence and uniqueness of a classical solution.

{\em Step 3:}
To obtain the global existence of the classical solution,
note that
\begin{align*}
\|\tfrac{d}{dt} f(t,y(t))\|_X
&\le \|\tfrac{d}{dt} f_1(t)\|_{L^2} + \|\tfrac{d}{dt} f_2(t,\tilde u(t))\|_{L^2}  \\
&\le C_1 + C_2 + \|\partial_t \tilde u(t)\|_{L^2}),
\end{align*}
where the first term comes from estimating $f_1$ and the other three terms from the estimate for $f_2$.
The constants $C_1,C_2$ here depend only on the bounds for the data.
Global existence of the classical solution and the uniform bound now follow from Lemma~\ref{lem:classical3}.
\end{proof}

Note that not all regularity assumptions for the data and for the parameter were required so far.
The conditions stated in (A1)--(A3) allow us to prove higher regularity of the solution,
which will be used for instance in the proof of Theorem~\ref{thm:lipschitz} later on.
\begin{theorem}[Regularity] \label{thm:regularity}
Under the assumptions of the previous theorem, we have
\begin{align*}
\|(p,u)\|_{C^1([0,T];H^1\times H^1) \cap C^2([0,T];L^2 \times L^2)} \le C''
\end{align*}
with $C''$ only depending on the bounds for the coefficient and data, and the time horizon.
\end{theorem}
\begin{proof}
To keep track of the regularity requirements, we again sketch the main steps:

{\em Step 1:}
Define $(r,w)=(\partial_t p,\partial_t u)$ and $(r,w) = (\hat r,\hat w) + (\tilde r,\tilde w)$ with $(\hat r,\hat w)=(\partial_t \hat p,\partial_t \hat u)$ and $(\tilde r,\tilde w)=(\partial_t \tilde p,\partial_t \tilde u)$ as in the previous proof.
The part $z=(\tilde r,\tilde w)$ can be seen to satisfy
\begin{align} \label{eq:z}
\partial_t z(t) + A z(t) = g(t,z(t)), \qquad z(0)=z_0,
\end{align}
with right hand side  $g(t,z)=(-\partial_t \hat r(t) -\partial_x \hat w(t),-\partial_t \hat w(t)-\partial_x \hat r(t)-a'(u(t)) z_2)$
and initial value $z_0=(\partial_t p(0)-\partial_t \hat p(0),\partial_t u(0)-\partial_t \hat u(0)) = (-\partial_x u_0-\partial_t \hat p(0),-\partial_x p_0 - a(u_0) - \partial_t \hat u(0))$.

{\em Step 2:}
Using the assumptions (A1)--(A3) for the coefficient and the data, and the bounds for the solution
of Theorem~\ref{thm:classical}, and the definition of $\hat p$ and $\hat u$,
one can see that $z_0 \in Y=H^1 \times H_0^1$ and that
$g : [0,T] \times H^1(0,1) \times Y \to Y$ satisfies the conditions of Lemma~\ref{lem:classical2}.
Thus $z(t)$ is a local classical solution.

{\em Step 3:}
Similarly as in the previous proof, one can show that\begin{align*}
\|\tfrac{d}{dt} g(t,z(t))\|_X \le C_1 + C_2 \|z'(t)\|_X + C_3 \|A z(t)\|_X
\end{align*}
for all sufficiently smooth function $z$.
The global existence and uniform bounds for the classical solution then follow again by Lemma~\ref{lem:classical3}.
\end{proof}

\section{The parameter-to-output mapping} \label{sec:forward}

Let $u_0,p_0,g_0,g_1$ be fixed and satisfy assumptions (A2)--(A3).
Then by Theorem~\ref{thm:classical}, we can associate to any damping parameter $a$
satisfying the conditions (A1) the corresponding solution $(p,u)$ of problem
\eqref{eq:sys1}--\eqref{eq:sys4}.
By the uniform bounds of Theorem~\ref{thm:classical} and the embedding of $H^1(0,1)$ in $C[0,1]$,
we know that
\begin{align} \label{eq:bounds}
\underline{u} \le u(x,t) \le \overline{u}, \qquad x \in \omega, \ 0 \le t \le T,
\end{align}
for some constants $\underline{u}$, $\overline{u}$ independent of the choice of $a$.
Without loss of generality, we may thus restrict the parameter function $a$ to the interval $[\underline{u},\overline{u}]$.
We now define the parameter-to-measurement mapping, in the sequel also called \emph{forward operator}, by
\begin{align} \label{eq:forward}
F : D(F) \subset H^2(\underline{u},\overline{u}) \to L^2(0,T),
\qquad a \mapsto \triangle p
\end{align}
where $\triangle p=p(0,\cdot)-p(1,\cdot)$ is the pressure drop across the pipe and $(p,u)$ is the solution of \eqref{eq:sys1}--\eqref{eq:sys4} for parameter $a$. As domain for the operator $F$, we choose
\begin{align} \label{eq:domain}
D(F)=\{ a \in H^2(\underline{u},\overline{u}) : (A1) \text{ holds}\},
\end{align}
which is a closed and convex subset of $H^2(\underline{u},\overline{u})$.
By Theorem~\ref{thm:classical}, the parameter-to-measurment mapping is well-defined on $D(F)$.
In the following, we establish several further properties of this operator, which will be required for our analysis later on.
\begin{theorem}[Lipschitz continuity] \label{thm:lipschitz}
The operator $F$ is Lipschitz continuous, i.e.,
\begin{align*}
\|F(a) - F(\tilde a)\|_{L^2(0,T)} \le C_L \|a-\tilde a\|_{H^2(\underline{u},\overline{u})}, \qquad \forall a, \tilde a \in D(F)
\end{align*}
with some uniform Lipschitz constant $C_L$ independent of the choice of $a$ and $\tilde a$.
\end{theorem}
\begin{proof}
Let $a,\tilde a \in D(F)$ and let $(p,u)$, $(\tilde p,\tilde u)$ denote the corresponding classical solutions of problem \eqref{eq:sys1}--\eqref{eq:sys4}.
Then the function $(r,w)$ defined by $r=\tilde p-p$, $w=\tilde u-u$  satisfies
\begin{align*}
\partial_t r + \partial_x w &= 0, \\
\partial_t w + \partial_x r &= a(u) - \tilde a (\tilde u) =:f_2,
\end{align*}
with initial and boundary conditions $r(x,0)=w(x,0)=w(0,t)=w(1,t)=0$.
By Theorem~\ref{thm:classical}, we know the existence of a unique classical solution $(r,w)$.
Moreover,
\begin{align*}
\|\tfrac{d}{dt} f_2\|_{L^2}
&\le \|(a'(u)-a'(\tilde u)) \partial_t u\|_{L^2} + \|(a'(\tilde u) - \tilde a'(\tilde u)) \partial_t u\|_{L^2}
+ \|\tilde a'(\tilde u) (\partial_t u - \partial_t \tilde u)\|_{L^2} \\
&\le a_2 \|w\|_{L^2} \|\partial_t u\|_{L^\infty} + \|a'-\tilde a'\|_{L^\infty} \|\partial_t u\|_{L^2} + a_1 \|\partial_t w\|_{L^2}
\end{align*}
Using the uniform bounds for $u$ provided by Theorem~\ref{thm:classical} and \ref{thm:regularity} and similar estimates as in the proof of Lemma~\ref{lem:classical3}, one obtains
$\|(r,w)\|_{C([0,T];H^1 \times H_0^1)} \le C \|a' - \tilde a'\|_{L^\infty}$ with $C$ only depending on the bounds for the coefficients and the data and on the time horizon. The assertion then follows by noting that $F(\tilde a) -F(a) = r(0,\cdot)-r(1,\cdot)$ and the continuous embedding of $H^1(0,1)$ in $L^\infty(0,1)$ and $H^2(\underline{u},\overline{u})$ to $W^{1,\infty}(\underline{u},\overline{u})$.
\end{proof}

By careful inspection of the proof of Theorem~\ref{thm:lipschitz}, we also obtain
\begin{theorem}[Compactness] \label{thm:compact}
The operator $F$ maps sequences in $D(F)$  weakly converging in $H^2(\underline{u},\overline{u})$ to strongly convergent sequences in $L^2(0,T)$. In particular, $F$ is compact.
\end{theorem}
\begin{proof}
The assertion follows from the estimates of the previous proof by noting that the embedding of $H^2(\underline{u},\overline{u})$ into $W^{1,\infty}(\underline{u},\overline{u})$ is compact. The forward operator is thus a composition of a continuous and a compact operator.
\end{proof}

As a next step, we consider the differentiability of the forward operator.
\begin{theorem}[Differentiability] \label{thm:differentiability} $ $\\
The operator $F$ is Frechet differentiable with Lipschitz continuous derivative, i.e.,
\begin{align*}
\|F'(a) - F'(\tilde a)\|_{H^2(\underline{u},\overline{u}) \to L^2(0,T)} \le L \|a-\tilde a\|_{H^2(\underline{u},\overline{u})}
\qquad \text{for all } a,\tilde a \in D(F).
\end{align*}
\end{theorem}

\begin{proof}
Denote by $(p(a),u(a))$ the solution of \eqref{eq:sys1}--\eqref{eq:sys4}
for parameter $a$ and let $(r,w)$ be the directional derivative of $(p(a),u(a))$ with respect to $a$ in direction $b$, defined by
\begin{align} \label{eq:directional}
r = \lim_{s \to 0} \frac{1}{s} (p(a+sb)-p(a))
\quad \text{and} \quad
w = \lim_{s \to 0} \frac{1}{s} (u(a+sb)-u(a)).
\end{align}
Then $(r,w)$ is characterized by the {\em sensitivity system}
\begin{align}
\partial_t r + \partial_x w &= 0, \label{eq:sen1} \\
\partial_t w + \partial_x r &= -a'(u(a)) w - b(u(a))=:f_2\label{eq:sen2}
\end{align}
with homogeneous initial and boundary values
\begin{align}
   r(x,0) = w(x,0) = w(0,t) = w(1,t) &= 0. \label{eq:sen34}
\end{align}
The right hand side $f_2(t,w)=-a'(u(a;t)) w - b(u(a;t))$ can be shown to be continuously differentiable
with respect to time, by using the previous results and (A1)--(A3).
Hence by Lemma~\ref{lem:classical} there exists a unique classical solution $(r,w)$ to \eqref{eq:sen1}--\eqref{eq:sen34}.
Furthermore
\begin{align*}
\|\tfrac{d}{dt} f_2\|_{L^2}
&\le \|a''(u)\|_{L^\infty} \|\partial_t u\|_{L^\infty} \|w\|_{L^2} + \|a'(u)\|_{L^\infty} \|\partial_t w\|_{L^2} + \|b'(u)\|_{L^\infty} \|\partial_t u\|_{L^2}.
\end{align*}
By Lemma~\ref{lem:classical3} we thus obtain uniform bounds for $(w,r)$.
The directional differentiability of $(p(a),u(a))$ follows by verifying \eqref{eq:directional},
which is left to the reader.
The function $(r,w)$ depends linearly and continuously on $b$ and continuously on $a$ which yields the continuous differentiability of $(p(a),u(a))$ with respect to the parameter $a$.
The differentiability of the forward operator $F$ then follows by noting that $F'(a) b = r(0,\cdot)-r(1,\cdot)$.
For the Lipschitz estimate, we repeat the argument of Theorem~\ref{thm:lipschitz}.  An additional derivative
of the parameter $a$ is required for this last step.
\end{proof}

\section{The regularized inverse problem} \label{sec:min}

The results of the previous section allow us to rewrite the constrained minimization problem
\eqref{eq:min1}--\eqref{eq:min2} in reduced form as \begin{align} \label{eq:tikhonov}
J_\alpha^\delta(a) := \|F(a) - h^\delta\|_{L^2(0,T)}^2 + \alpha \|a-a^*\|_{H^2(\underline{u},\overline{u})}^2 \to \min_{a \in D(F)},
\end{align}
which amounts to Tikhonov regularization for the nonlinear inverse problem $F(a)=h^\delta$.
As usual, we replaced the exact data $h$ by perturbed data $h^\delta$ to account for measurement errors.
Existence of a minimizer can now be established with standard arguments \cite{EnglHankeNeubauer96,EnglKunischNeubauer89}.
\begin{theorem}[Existence of minimizers]
Let (A2)--(A3) hold.
Then for any $\alpha>0$ and any choice of data $h^\delta \in L^2(0,T)$,
the problem \eqref{eq:tikhonov} has a minimizer $a_\alpha^\delta \in D(F)$.
\end{theorem}
\begin{proof}
The set $D(F)$ is closed, convex, and bounded. In addition, we have shown that $F$ is weakly continuous,
and hence the functional $J_\alpha^\delta$ is weakly lower semi-continuous.
Existence of a solution then follows as in \cite[Thm.~10.1]{EnglHankeNeubauer96}.
\end{proof}
\begin{remark}
Weak continuity and thus existence of a minimizer can be shown without the bounds for the second and third derivative of the parameter in assumption (A1).
\end{remark}
Let us assume that there exists a true parameter $a^\dag \in D(F)$
and denote by $h=F(a^\dag)$ the corresponding exact data.
The perturbed data $h^\delta$ are required to satisfy
\begin{align} \label{eq:noise}
\|h^\delta - h\|_{L^2(0,T)} \le \delta
\end{align}
with $\delta$ being the noise level.
These are the usual assumptions  for the inverse problem.
In order to simplify the following statements about convergence, we also assume
for the moment that the solution of the inverse problem is unique, i.e., that
\begin{align} \label{eq:unique}
F(a) \ne F(a^\dag) \quad \text{for all } a \in D(F) \setminus \{a^\dag\}.
\end{align}
This assumption is only made for convenience here,
but we also give some justification for its validity in the following section.
Under this uniqueness assumption, we obtain the following result about the convergence of the regularized solutions; see \cite{EnglHankeNeubauer96,EnglKunischNeubauer89}.
\begin{theorem}[Convergence]
Let \eqref{eq:unique} hold and $h^\delta$ be a sequence of data satisfying \eqref{eq:noise} for $\delta \to 0$.
Further, let $a_\alpha^\delta$ be corresponding minimizeres of \eqref{eq:tikhonov} with $\alpha=\alpha(\delta)$ chosen such that $\alpha \to 0$ and $\delta^2/\alpha \to 0$.
Then $\|a_\alpha^\delta - a^\dag\|_{H^2(\underline{u},\overline{u})} \to 0$ with $\delta \to 0$.
\end{theorem}
\begin{remark}
Without assumption \eqref{eq:unique} about uniqueness, convergence holds for subsequences and
towards an $a^*$-minimum norm solution $a^\dag$; see \cite[Sec.~10]{EnglHankeNeubauer96} for details.
\end{remark}
To obtain quantitative estimates for the convergence, some additional conditions on the nonlinearity of the operator $F$ and on the solution $a^\dag$ are required.
Let us assume that
\begin{align} \label{eq:source}
a^\dag - a^* = F'(a^\dag)^* w + e
\end{align}
holds for some $w \in L^2(0,T)$ and $e \in H^2(\underline{u},\overline{u})$.
Note that one can always choose $w=0$ and $e=a^\dag-a^*$, so this condition is no
restrictio of generalty. However, good bounds for $\|w\|$ and $\|e\|$ are required
in order to really take advantage of this splitting later on.
Assumption \eqref{eq:source} is called a \emph{approximate source condition}, and has been
investigated for the convergence analysis of regularization methods for instance in \cite{EggerSchlottbom11,HeinHofmann05}
By a slight modification of the proof of \cite[Thm~10.4]{EnglHankeNeubauer96}, one can obtain
\begin{theorem}[Convergence rates]
Let \eqref{eq:source} hold and let $L \|w\|_{H^2(\underline{u},\overline{u})} < 1$. Then
\begin{align}
\|a^\dag - a_\alpha^\delta\|_{H^2(\underline{u},\overline{u})}
\le C \big( \delta^2/\alpha + \alpha \|w\|^2 + \delta \|w\|_{H^2(\underline{u},\overline{u})} +  \|e\|_{L^2(0,T)}^2).
\end{align}
The constant $C$ in the estimate only depends on the size of $L\|w\|_{H^2(\underline{u},\overline{u})}$.
\end{theorem}
\begin{proof}
Proceeding as in \cite{EnglHankeNeubauer96,EnglKunischNeubauer89}, one can see that
\begin{align*}
\|F(a_\alpha^\delta) - h^\delta\|^2 + \alpha \|a_\alpha^\delta - a^\dag\|^2
\le \delta^2 + 2\alpha (a^\dag-a_\alpha^\delta, a^\dag - a^* ).
\end{align*}
Using the approximate source condition \eqref{eq:source}, the last term can be estimated by
\begin{align*}
(a^\dag - a_\alpha^\delta, a^\dag - a^* )
&= (F'(a^\dag) (a^\dag -a_\alpha^\delta) , w) + (a^\dag-a_\alpha^\delta,e) \\
&\le \|F'(a^\dag) (a^\dag-a_\alpha^\delta)\| \|w\| + \|a^\dag-a_\alpha^\delta\|\|e\|.
\end{align*}
By elementary manipulations and the Lipschitz continuity of the derivative, one obtains
\begin{align*}
\|F'(a^\dag) (a^\dag - a_\alpha^\delta)\|
&\le \|F(a_\alpha^\delta)-h^\delta\| + \delta + \tfrac{L}{2} \|a_\alpha^\delta - a^\dag\|^2.
\end{align*}
Using this in the previous estimates and applying Young inequalities leads to
\begin{align*}
&\|F(a_\alpha^\delta) - h^\delta\|^2 + \alpha \|a_\alpha^\delta - a^\dag\|^2 \\
&\le \delta^2 + 2 \alpha^2 \|w\|^2 + 2 \alpha \delta \|w\| + C' \alpha \|e\|^2
  + \frac{1}{2} \|F(a_\alpha^\delta)-h^\delta\|^2 + \alpha \|a_\alpha^\delta-a^\dag\|^2 (L \|w\| + \tfrac{1}{C'}).
\end{align*}
If $L\|w\|<1$, we can choose $C'$ sufficienlty large such that $L \|w\| + \tfrac{1}{C'} < 1$ and the last two terms can be absorbed in the left hand side, which yields the assertion.
\end{proof}

\begin{remark}
The bound of the previous theorem yields a quantitative estimate for the error.
If the source condition \eqref{eq:source} holds with $e=0$ and $L \|w\| < 1$,
then for $\alpha \approx \delta$ one obtains $\|a_\alpha^\delta - a^\dag\| = O(\delta^{1/2})$,
which is the usual convergence rate result \cite[Thm.~10.4]{EnglHankeNeubauer96}.
The theorem however also yields estimates and a guidline for the choice of the regularization parameter in the general case.
We refer to \cite{HeinHofmann05} for an extensive discussion of the approximate source condition \eqref{eq:source} and its relation to more standard conditions.
\end{remark}

\begin{remark}
If the deviation from the classical source condition is small, i.e., if \eqref{eq:source} holds with
$\|e\| \approx \delta^{1/2}$ and $L \|w\| < 1$,
then for $\alpha \approx \delta$ one still obtains the usual estimate $\|a_\alpha^\delta - a^\dag\| = O(\delta^{1/2})$.
As we will illustrate in the next section, the assumption that $\|e\|$ is small is realistic in practice,
if the experimental setup is chosen appropriately.
The assumption that $\|e\|$ is sufficiently small in comparison to $\alpha$ also allows to show
that the Tikhonov functional is locally convex around minimizers and to prove convergence of iterative schemes;
see \cite{EggerSchlottbom15,ItoJin15} for some recent results in this direction.
\end{remark}

Numerical methods for minimizing the Tikhonov functional usually require the application of the adjoint derivative operator.
For later reference, let us therefore briefly give a concrete representation of the adjoint that can be used for the implementation.

\begin{lemma}
Let $\psi \in H^1(0,T)$ with $\psi(T)=0$ and let $(q,v)$ denote the solution of
\begin{align}
\partial_t q + \partial_x v &= 0 \qquad \qquad x \in (0,1), \ t<T,  \label{eq:adj1}\\
\partial_t v + \partial_x q &= a'(u) v,  \quad \ x \in (0,1), \ t<T, \label{eq:adj2}
\end{align}
with terminal conditions $v(x,T)=q(x,T)=0$ and boundary conditions
\begin{align}
v(0,t)=v(1,t)=\psi(t), \quad t<T.  \label{eq:adj3}
\end{align}
Then the action of the adjoint operator $\phi=F'(a)^* \psi$ is given by
\begin{align} \label{eq:adj}
(\phi,b)_{H^2(\underline{u},\overline{u})} = \int_0^T (b(u), v)_{L^2(0,1)} dt , \qquad \forall b \in H^2(\underline{u},\overline{u}).
\end{align}
\end{lemma}
\begin{proof}
By definition of the adjoint operator, we have
\begin{align*}
(b,F'(a)^* \psi)_{H^2(\underline{u},\overline{u})} = (F'(a) b, \psi)_{L^2(0,T)}.
\end{align*}
Using the characterization of the derivative via the solution $(r,w)$ of the sensitivity equation \eqref{eq:sen1}--\eqref{eq:sen2} and the definition of the adjoint state $(q,v)$ via \eqref{eq:adj1}--\eqref{eq:adj2}, we obtain
\begin{align*}
&(F'(a) b, \psi)_{L^2(0,T)}
 = \int\nolimits_0^T r(0,t) v(0,t) - r(1,t) v(1,t) dt \\
&= \int\nolimits_0^T -(\partial_x r,v) - (r, \partial_x v) dt
=\int\nolimits_0^T (\partial_t w+a'(u) w + b(u), v) + (r,\partial_t q) dt \\
&= \int\nolimits_0^T -(\partial_t v - a'(u) v,w) + (b(u),v) + (\partial_x w,q) dt
=\int\nolimits_0^T (b(u), v) dt.
\end{align*}
For the individual steps we only used integration-by-parts and made use of the boundary and initial conditions.
This already yields the assertion.
\end{proof}

\begin{remark}
Existence of a unique solution $(q,v)$ of the adjoint system \eqref{eq:adj1}--\eqref{eq:adj2}
with the homogeneous terminal condition $v(x,T)=q(x,T)=0$ and boundary condition $q(0,t)=q(1,t)=\psi(t)$ follows
with the same arguments as used in Theorem~\ref{thm:classical}.
The presentation of the adjoint formally holds also for $\psi \in L^2(0,T)$, which can be proved by a limiting process.
The adjoint problem then has to be understood in a generalized sense.
\end{remark}

\section{Remarks about uniqueness and the approximate source condition} \label{sec:hyp}

We now collect some comments about the uniqueness hypothesis \eqref{eq:unique} and the approximate source condition \eqref{eq:source}. Our considerations are based on the fact that the nonlinear inverse problem is actually close to a linear inverse problem provided that the experimental setup is chosen appropriately.
We will only sketch the main arguments here with the aim to illustrate the plausibility of these assumptions and to
explain what results can be expected in the numerical experiments presented later on.

\subsection{Reconstruction for a stationary experiment}
Let the boundary data \eqref{eq:sys3} be chosen such that
$g_0(t)=g_1(t)=\bar g \in \mathbb{R}$ for $t \ge t_0$.
By the energy estimates of \cite{GattiPata06}, which are derived for an equivalent problem in second order form \eqref{eq:second} there, one can show that the solution
$(p(t),u(t))$ of the system \eqref{eq:sys1}--\eqref{eq:sys4} converges exponentially fast to a steady state
$(\bar p,\bar u)$, which is the unique solution of
\begin{align}
\partial_x \bar u &= 0, \quad x \in (0,1), \label{eq:stat1}\\
\partial_x \bar p + a(\bar u) &= 0, \quad x \in (0,1), \label{eq:stat2}
\end{align}
with boundary condition $\bar u(0)=\bar u(1)=\bar g$.
From equation \eqref{eq:stat1}, we deduce that the steady state $\bar u$ is constant,
and upon integration of \eqref{eq:stat2}, we obtain
\begin{align} \label{eq:statsol}
a(\bar g) = a(\bar u) = \int_0^1 a(\bar u) dx = -\int_0^1 \partial_x \bar p(x) dx = \bar p(0)-\bar p(1) = \triangle \bar p.
\end{align}
The value $a(\bar g)$ can thus be determined by a stationary experiment.
As a consequence, the friction law $a(\cdot)$ could in principle be determined from an infinite number of
stationary experiments.
We will next investigate the inverse problem for these \emph{stationary experiments} in detail.
In a second step, we then use these results for the analysis of the inverse problem for the instationary experiments
that are our main focus.

\subsection{A linear inverse problem for a series of stationary experiments}

Let us fix a smooth and monotonic function $g : [0,T] \to [\underline{u},\overline{u}]$ and denote by $\triangle \bar p(t)=a(g(t))$ the pressure difference obtained from the stationary system \eqref{eq:stat1}--\eqref{eq:stat2} with boundary flux $\bar g=g(t)$.
The forward operator for a sequence of stationary experiments is then given by
\begin{align} \label{eq:statop}
K : H^2(\underline{u},\overline{u}) \to L^2(0,T), \qquad a \mapsto a(g(\cdot)),
\end{align}
and the corresponding inverse problem with exact data reads
\begin{align} \label{eq:statinv}
(K a)(t) = a(g(t)) = \triangle \bar p(t), \qquad t \in [0,T].
\end{align}
This problem is linear and its solution is given by the simple formula \eqref{eq:statsol}
with $\bar g$ and $\triangle \bar p$ replaced by $g(t)$ and $\triangle \bar p(t)$ accordingly.
From this representation, it follows that
\begin{align*}
\|a - \tilde a\|^2_{L^2(\underline{u},\overline{u})}
&= \int_0^T |a(g(t)) - \tilde a(g(t))|^2 |g'(t)| dt
 \le C \|K a - K \tilde a\|_{L^2(0,T)}^2,
\end{align*}
where we assumed that $|g'(t)| \le C$ for all $t$.
Using the uniform bounds iny assumption (A1),
embedding, and interpolation, one can further deduce that
\begin{align} \label{eq:stathoelder}
\|a - \tilde a\|_{H^2(\underline{u},\overline{u})} \le C_\gamma \|K a-K\tilde a\|_{L^2(0,T)}^\gamma.
\end{align}
This shows the Hölder stability of the inverse problem \eqref{eq:statinv} for stationary experiments.
As a next step, we will now extend these results to the instationary case by a perturbation argument
as proposed in \cite{EggerPietschmannSchlottbom15} for a related inverse heat conduction problem.

\subsection{Approximate stability for the instationary inverse problem}

If the variation of the boundary data $g(t)$ with respect to time is sufficiently small,
then from the exponential stability estimates of \cite{GattiPata06}, one may deduce that
\begin{align} \label{eq:eps}
 \|p(t)-\bar p(t)\|_{H^1} + \|u(t)-\bar u(t)\|_{H^1} \le \varepsilon.
\end{align}
Hence the solution $(p(t),u(t))$ is always close to the stationary state $(\bar p(t),\bar u(t))$
with the corresponding boundary data $\bar u(0,t)=\bar u(1,t)=g(t)$.
Using $\triangle p(t) = p(0,t) - p(1,t) = -\int_0^1 \partial_x p(y,t) dy$ and the Cauchy-Schwarz inequality leads to
\begin{align} \label{eq:est}
|\triangle p(t) - a(g(t))| = |\triangle p(t) - \triangle \bar p(t)| \le \|p(t)-\bar p(t)\|_{H^1(0,1)} \le \varepsilon.
\end{align}
From the definition of the nonlinear and the linear forward operators, we deduce that
\begin{align} \label{eq:estOps}
F(a) = K a + O(\varepsilon).
\end{align}
\begin{remark}
As indicated above, the error $\varepsilon$ can be made arbitrarily small by a proper design of the experiment, i.e., by
slow variation of the boundary data $g(t)$.
The term $O(\varepsilon)$ can therefore be considered as an additional measurement error,
and thus the parameter $a$ can be determined approximately with the formula \eqref{eq:statsol}
for the stationary experiments.
As a consequence of the stability of the linear inverse problem, we further obtain
\begin{align} \label{eq:hoelder}
\|a-\tilde a\|_{H^2(\underline{u},\overline{u})} \le C'_\gamma \|F(a)-F(\tilde a)\|_{L^2(0,T)}^\gamma + C''_\gamma \varepsilon^\gamma.
\end{align}
In summary, we may thus expect that the identification from the nonlinear experiments is stable and unique,
provided that the experimental setup is chosen appropriately.
\end{remark}

\subsection{The approximate source condition}

With the aid of the stability results in \cite{GattiPata06} and similar reasoning as above,
one can show that the linearized operator satisfies
\begin{align*}
F'(a) h = K h + O(\varepsilon \|h\|_{H^2(\underline{u},\overline{u})}).
\end{align*}
A similar expansion is then also valid for the adjoint operator, namely
\begin{align*}
F'(a)^* w  = K^*w + O(\varepsilon \|w\|_{L^2(0,T)}).
\end{align*}
This follows since $L=F'(a)-K$ is linear and bounded by a multiple of $\varepsilon$,
and so is the adjoint $L^*=F'(a)^*-K^*$.
In order to verify the approximate source condition \eqref{eq:source}, it thus suffices to
consider the condition $z = K^* w$ for the linear problem.
From the explicit respresentation \eqref{eq:statop} of the operator $K$ this can be translated directly to a smoothness condition on $z$  in terms of weighted Sobolev spaces and some boundary conditions; we refer to \cite{EggerPietschmannSchlottbom14} for a detailed derivation in a similar context.

\begin{remark}
The observations made in this section can be summarized as follows:

(i) If the true parameter $a$ is sufficiently smooth, and if the boundary data are varied sufficiently slowly ($\varepsilon$ small),
such that the instationary solution at time $t$ is close to the steady state corresponding to the boundary data $g(t)$,
then the parameter can be identified stably with the simple formula for the linear inverse problem.
The same stable reconstructions will also be obtained with Tikhonov regularization \eqref{eq:tikhonov}.

(ii) For increasing $\varepsilon$, the approximation \eqref{eq:estOps} of the nonlinear problem by the linear problem deteriorates.
In this case, the reconstruction by the simple formula \eqref{eq:statsol} will get worse while the solutions obtained
by Tikhonov regularization for the instationary problem can be expected to still yield good and stable reconstructions.
\end{remark}

\begin{remark}
Our reasoning here was based on the \emph{approximate stability estimate} \eqref{eq:hoelder} that is inherited from the
satationary problem by a perturbation argument.
A related analysis of Tikhonov regularization under \emph{exact} conditional stability assumptions
can be found \cite{ChengYamamoto00,HofmannYamamoto10} together with some applications.
\end{remark}

\section{Numerical tests} \label{sec:num}

For illustration of our theoretical considerations discussed in the previous section,
let us we present some numerical results which provide additional evidence for the
uniqueness and stability of the inverse problem.

\subsection{Discretization of the state equations}

For the space discretization of state system \eqref{eq:sys1}--\eqref{eq:sys4},
we utilize a mixed finite element method based on a weak formulation of the problem.
The pressure $p$ and the velocity $u$ are approximated with continuous piecewise linear
and discontinuous piecewise constant finite elements, respectively. For the time discretization, we employ a one step scheme in which the differential terms are treated implicitly and the nonlinear damping term is integrated explicitly.
A single time step of the resulting numerical scheme then has the form
\begin{align*}
\tfrac{1}{\tau} (p^{n+1}_h,q_h) - (u_h^{n+1},\partial_x q_h) &= \tfrac{1}{\tau} (p_h^n,q_h) + g_0^{n+1} q_h(0) - g_1^{n+1} q_h(1), \\
\tfrac{1}{\tau} (u_h^{n+1},v_h) + (\partial_x p_h^{n+1},v_h) &= \tfrac{1}{\tau} (u_h^n,v_h) - (a(u_h^n),v_h),
\end{align*}
for all test functions $q_h \in P_1(T_h) \cap C[0,1]$ and $v_h \in P_0(T_h)$.
Here $T_h$ is the mesh of the interval $(0,1)$, $P_k(T_h)$ denotes the space of piecewise polynomials on $T_h$, $\tau>0$ is the time-step, and $g_i^n=g_i(t^n)$ are the boundary fluxes at time $t^{n}=n \tau$.
The functions $(p_h^n,u_h^n)$ serve as approximations for the solutions $(p_h(t^n),u_h(t^n))$
at the discrete time steps.
Similar schemes are used to approximate the sensitivity system \eqref{eq:sen1}--\eqref{eq:sen34} and the adjoint problem \eqref{eq:adj}--\eqref{eq:adj3} in a consistent manner.
The spatial and temporal mesh size were chosen so small such that
approximation errors due to the discretization can be neglected;
this was verified by repeating the tests with different discretization parameters.

\subsection{Approximation of the parameter}

The parameter function $a(\cdot)$ was approximated by cubic interpolating splines over a uniform grid of the interval $[\underline{u},\overline{u}]$.
The splines were parametrized by the interpolation conditions $s(u_i)=s_i$, $i=0,\ldots,m$ and knot-a-knot conditions was used to obtain a unique representation. To simplify the implementation, the $L^2$, $H^1$, and $H^2$ norm in the parameter space were approximated by difference operators acting directly on the interpolation points $s_i$, $i=0,\ldots,m$.
To ensure mesh independence, the tests were repeated for different
numbers $m$ of interpolation points.

\subsection{Minimization of the Tikhonov functional}

For minimization of the Tikhonov functional \eqref{eq:tikhonov}, we utilized a projected iteratively regularized Gau\ss-Newton method with regularization parameters $\alpha^n = c q^n$, $q<1$.
The bounds in assumption (A1) for the parameters were satisfied automatically for all iterates in our tests such that  the projection step was never carried out.
The iteration was stopped by a discrepancy principle, i.e., when $\|F(a^n) - h^\delta\| \le 1.5 \delta$ was valid the first time.
The regularization parameter $\alpha^n$ of the last step was interpreted as the regularization parameter $\alpha$ of the Tikhonov functional \eqref{eq:tikhonov}.
We refer to \cite{EggerSchlottbom11} for details concerning such a strategy for the iterative minimization of the Tikhonov functional.
The discretizations of the derivative and adjoint operators $F'(a)$ and $F'(a)^*$ were implemented consistently, such that $(F'(a) h, \psi) = (h, F'(a)^* \psi)$ holds exactly also on the discrete level.
The linear systems of the Gau\ss-Newton method were then solved by a preconditioned conjugate gradient algorithm.

\subsection{Setup of the test problem}

As true damping parameter, we used the function
\begin{align} \label{eq:adag}
a^\dag(u) = u \sqrt{1+u^2} .
\end{align}
The asymptotic behaviour here is
$a(u) \approx u$ for $|u| \ll 1$ and $a(u) \approx u |u|$ for $|u| \gg 1$,
which corresponds to the expected behaviour of the friction forces in pipes \cite{LandauLifshitz6}.
Restricted to any bounded interval $[\underline{u},\overline{u}]$, the function $a^\dag$ satisfies the assumptions (A1).

For our numerical tests, we used the initial data $u_0 \equiv 0$, $p_0 \equiv 1$,
and we chose
\begin{align} \label{eq:g}
g_0(t)=g_1(t)=g(t)=2 \sin(\tfrac{\pi}{2T} t)^2
\end{align}
as boundary fluxes.
A variation of the time horizon $T$ thus allows us to tune the speed of variation in the boundary data,
while keeping the interval $[\underline{u},\overline{u}]$ of fluxes that arise at the boundary fixed.

\subsection{Simulation of measurement data}
The boundary data $g(t;T)$ and the resulting pressure drops $\triangle p(t;T)$ across the pipe resulting are displayed
in Figure~\ref{fig:1} for different choices of $T$.
For comparison, we also display the pressure drop $\triangle \bar p$ obtained with the
linear forward model.

\begin{figure}[ht!]
\medskip
\includegraphics[height=3.2cm]{data1} \hspace*{0.75cm}
\includegraphics[height=3.2cm]{data2} \hspace*{0.75cm}
\includegraphics[height=3.2cm]{data5} \\[0.5cm]
\includegraphics[height=3.2cm]{data10}
\caption{Boundary flux $g(t)$ and pressure drops $\triangle p(t)$ and $\triangle \bar p(t)$ for the instationary and the linearized model for time horizon $T=1,2,5,10$. \label{fig:1}}
\end{figure}

The following observations can be made:
For small values of $T$, the pressure drop $\triangle p$ varies rapidly all over the time interval $[0,T]$ and
therefore deviates strongly from the pressure drop $\triangle \bar p$ of the linearized model corresponding to stationary
experiments.
In contrast, the pressure drop $\triangle p$ is close to that of the linearized model on the whole time interval $[0,T]$, when $T$ is large and therefore the variation in the boundary data $g(t)$ is small.
As expected from \eqref{eq:estOps}, the difference between $\triangle p$ and $\triangle \bar p$ becomes smaller when $T$ is increased.
A proper choice of the parameter $T$ thus allows us to tune our experimental setup
and to verify the conclusions obtained in Section~\ref{sec:hyp}.

\subsection{Convergence to steady state}

We next demonstrate in more detail that the solution
$(p(t),u(t))$ of the instationary problem is close to the steady states $(\bar p(t),\bar u(t))$ for
boundary data $\bar u(0)=\bar u(1)=g(t)$, provided that $g(t)$ varies sufficiently slowly; cf \eqref{eq:eps}.
In Table~\ref{tab:1}, we list the errors
\begin{align*}
e(T) := \max_{0 \le t \le T} \|p(t;T)-\bar p(t;T)\|_{L^2} + \|u(t;T)-\bar u(t;T)\|_{L^2}
\end{align*}
between the instationary and the corresponding stationary states
for different values of $T$ in the definition of the boundary data $g(t;T)$.
In addition, we also display the difference
\begin{align*}
d(T)=\max_{0 \le t \le T} |\triangle p(t) - \triangle \bar p(t)|
\end{align*}
in the measurements corresponding to the nonlinear and the linearized model.
\begin{table}[ht!]
\centering
\small
\begin{tabular}{c||c|c|c|c|c|c}
 $T$    & $1$     & $2$     & $5$     & $10$    & $20$    & $50$ \\
\hline
 $e(T)$ & $1.016$ & $0.647$ & $0.207$ & $0.105$ & $0.054$ & $0.022$ \\
\hline
 $d(T)$ & $1.044$ & $1.030$ & $0.479$ & $0.225$ & $0.114$ & $0.045$
\end{tabular}
\medskip

\caption{Error $e(T)$ between instationary and stationary solution and difference $d(T)$ in the corresponding
measurements.\label{tab:1}}
\end{table}
The speed of variation in the boundary data decreases when $T$ becomes larger,
and we thus expect a monotonic decrease of the distance $e(T)$ to steady state
with increasing time horizon. The same can be expected for the error $d(T)$
in the measurements. This is exactly the behaviour that we observe in our numerical tests.

\subsection{Reconstructions for nonlinear and linearized model}

Let us now turn to the inverse problem
and compare the reconstructions for the nonlinear inverse problem obtained by Tikhonov regularization with that computed by the simple formula \eqref{eq:statsol} for the linearized inverse problem corresponding to stationary experiments.
The data for these tests are generated by simulation as explained before, and then perturbed with random noise such that $\delta=0.001$.
Since the noise level is rather small, the data perturbations do not have any visual effect on the reconstructions here;
see also Figure~\ref{fig:3} below.

In Figure~\ref{fig:2}, we display the corresponding results for measurements $h=\triangle p(\cdot;T)$ obtained for different time horizons $T$ in the definition of the boundary data $g(\cdot;T)$.

\begin{figure}[ht!]
\includegraphics[height=5cm]{a1}
\includegraphics[height=5cm]{a10} \\
\includegraphics[height=5cm]{a2}
\includegraphics[height=5cm]{a20} \\
\includegraphics[height=5cm]{a5}
\includegraphics[height=5cm]{a50}
\caption{True parameter $a^\dag$, reconstruction $a_\alpha^\delta$ obtained by Tikhonov regularization with initial guess $a^*$, and result $\bar a$ obtained by formula \eqref{eq:statsol}.
The data $h^\delta$ are perturbed by random noise of size $\delta=0.001$.
The images correspond to time horizons $T=1,2,5$ (left) and $T=10,20,50$ (right).\label{fig:2}}
\end{figure}

As can be seen from the plots, the reconstruction with Tikhonov regularization works well in all test cases.
The results obtained with the simple formula \eqref{eq:statsol} however show some systematic deviations due to model errors,
which however become smaller when increasing $T$.
Recall that for large $T$, the speed of variation in the boundary fluxes $g(t;T)$ is small,
so that the system is close to steady state on the whole interval $[0,T]$.
The convergence of the  reconstruction $\bar a$ for the linearized problem towards the true solution $a^\dag$
with increasing $T$ is thus in perfect agreement with our considerations in Sections~\ref{sec:hyp}.

\subsection{Convergence and convergence rates}

In a last sequence of tests, we investigate the stability and accuracy of the
reconstructions $a_\alpha^\delta$ obtained with Tikhonov regularization in the presence of data noise.
Approximations for the minimizers $a_\alpha^\delta$ are computed numerically via the projected
iteratively regularized Gau\ss-Newton method as outlined above.
The iteration is stopped according to the discrepancy principle.
Table~\ref{tab:2} displays the reconstruction errors for different time horizons $T$ and different noise levels $\delta$.

\begin{table}[ht!]
\centering
\small
\begin{tabular}{c||c|c|c|c|c|c}
$\delta \backslash T$
          & $1$      & $2$      & $5$      & $10$     & $20$     & $50$ \\
\hline
\hline
$0.10000$ & $0.8504$ & $0.3712$ & $0.1027$ & $0.0417$ & $0.0324$ & $0.0092$ \\
\hline
$0.05000$ & $0.6243$ & $0.2742$ & $0.0706$ & $0.0239$ & $0.0081$ & $0.0055$ \\
\hline
$0.02500$ & $0.3911$ & $0.1616$ & $0.0496$ & $0.0096$ & $0.0066$ & $0.0032$ \\
\hline
$0.01250$ & $0.2264$ & $0.1050$ & $0.0355$ & $0.0065$ & $0.0024$ & $0.0019$ \\
\hline
$0.00625$ & $0.1505$ & $0.0630$ & $0.0316$ & $0.0030$ & $0.0015$ & $0.0012$
\end{tabular}
\medskip

\caption{Reconstruction error $\|a_\alpha^\delta - a^\dag\|_{L^2(\underline{u},\overline{u})}$ for Tikhonov regularization for different noise levels $\delta$ and various time horizons $T$. \label{tab:2}}
\end{table}

Convergence is observed for all experimental setups, but the absolut errors decrease
monotonically with increasing time horizon $T$, which is partly explained by
our considerations in Section~\ref{sec:hyp}.
The reconstructions for time horizon $T=2$, corresponding to the third column of Table~\ref{tab:2},
are depicted in Figure~\ref{fig:3}; also compare with Figure~\ref{fig:2}.

\begin{figure}[ht!]
\includegraphics[height=5cm]{rec1}
\includegraphics[height=5cm]{rec4} \\
\includegraphics[height=5cm]{rec2}
\includegraphics[height=5cm]{rec5} \\
\includegraphics[height=5cm]{rec3}
\includegraphics[height=5cm]{rec6}
\caption{True parameter $a^\dag$, reconstruction $a_\alpha^\delta$ obtained by Tikhonov regularization, and initial guess $a^*$ for time horizon $T=2$ and noise levels $\delta=0.1,0.05,0.025$ (left) and $\delta=0.0125,0.00625,0.003125$ (right).\label{fig:3}}
\end{figure}

Note that already for a small time horizon $T=2$ and large noise level $\delta$ of several percent, one can obtain good reconstructions of the damping profile. For larger time horizon or smaller noise levels, the reconstruction $a_\alpha^\delta$ visually coincides completely with the true solution $a^\dag$.
This is in good agreement with our considerations in Section~\ref{sec:hyp}.

\section{Discussion} \label{sec:sum}

In this paper, we investigated the identification of a nonlinear damping law in a
semilinear hyperbolic system from additional boundary measurements. Uniqueness and
stability of the reconstructions obtained by Tikhonov regularization was observed
in all numerical tests. This behaviour could be explained theoretically by considering
the nonlinear inverse problem as a perturbation of a nearby linear problem, for which
uniqueness and stability can be proven rigorously.

In the coefficient inverse problem under investigation, the distance to the approximating
linearization could be chosen freely by a proper experimental setup. A similar argument was
already used in \cite{EggerPietschmannSchlottbom15} for the identification of a nonlinear
diffusion coefficient in a quasi-linear heat equation.
The general strategy might however be useful in a more general context and for many other applications.

Based on the uniqueness and stability of the linearized inverse problem, we could obtain
stability results for the nonlinear problem \emph{up to perturbations}; see
Section~\ref{sec:hyp} for details. Such a concept might be useful as well for the convergence
analysis of other regularization methods and more general inverse problems.

In all numerical tests we observed global convergence of an iterative method for the minimization
of the Tikhonov functional. Since the minimizer is unique for the linearized problem, such
a behaviour seems not too surprising. At the moment, we can however not give a rigorous
explanation of that fact. Let us note however, that H\"older stability of the inverse
problem can be employed to prove convergence and convergence rates for Tikhonov regularization \cite{ChengHofmannLu14,ChengYamamoto00} and also global convergence of iterative regularization methods
\cite{deHoopQiuScherzer12} without further assumptions.
An extension of these results to inverse problems satisfying \emph{approximated stability conditions},
as the one considered here, might be possible.

\section*{Acknowledgements}
The authors are grateful for financial support by the German Research Foundation (DFG) via grants IRTG~1529, GSC~233, and TRR~154.


\section{Introduction}
Extending the well-known result of extremal graph theory by Tur\'an, E. Gy\H ori and A.V. Kostochka \cite{ek} and independently F.R.K Chung \cite{chung} proved the following theorem. For an arbitrary graph $G$, let $p(G)$ denote the minimum of $\sum|V(G_i)|$ over all decompositions of $G$ into edge disjoint cliques $G_1,G_2,...$. Then $p(G)\le2t_2(n)$ and equality holds if and only if $G\cong T_2(n)$. Here $T_2(n)$ is the $2$-partite Tur\'an graph on $n$ vertices and $t_2(n)=\lfloor n^2/4\rfloor$ is the number of edges of this graph. P. Erd\H os later suggested to study the weight function $p^*(G)=\min \sum(|V(G_i)|-1))$. The first author   \cite{ervinsurvey} started to study this function and to prove the conjecture $p^*(G)\le t_2(n)$ just in the special case when $G$ is $K_4$-free.  This 24 year old conjecture was worded equivalently as follows.
\begin{conj} \label{mainconj}
Every $K_4$-free graph on $n$ vertices and $t_2(n)+m$ edges contains at least $m$ edge disjoint triangles.
\end{conj}
This was only known if the graph is $3$-colorable i.e. $3$-partite.

In \cite{chinese} towards proving the conjecture, they proved that for every $K_4$-free graph there are always at least $32k/35\ge 0.9142k$ edge-disjoint triangles and if $k\ge 0.0766 n^2$ then there are at least $k$ edge-disjoint triangles.
Their main tool is a nice and simple to prove lemma connecting the number of edge-disjoint triangles with the number of all triangles in a graph. In this paper using this lemma and proving new bounds about the number of all triangles in $G$, we settle the above conjecture:

\begin{thm}\label{thm:main}
Every $K_4$-free graph on $n^2/4+k$ edges contains at least $\lceil k\rceil$ edge-disjoint triangles.
\end{thm}

This result is best possible, as there is equality in Theorem \ref{thm:main} for every graph which we get by taking a $2$-partite Tur\'an graph and putting a triangle-free graph into one side of this complete bipartite graph. Note that this construction has roughly at most $n^2/4+n^2/16$ edges  while in general in a $K_4$-free graph $k\le n^2/12$, and so it is possible (and we conjecture so) that an even stronger theorem can be proved if we have more edges, for further details see section Remarks.

\section{Proof of Theorem \ref{thm:main}}

From now on we are given a graph $G$ on $n$ vertices and having $e=n^2/4+k$ edges.

\begin{defi}
Denote by $\te$ the maximum number of edge disjoint triangles in $G$ and  by $\ta$ the number of all triangles of $G$.
\end{defi}

The idea is to bound $\te$  by $\ta$. For that we need to know more about the structure of $G$, the next definitions are aiming towards that.

\begin{defi}
A {\bf good partition} $P$ of $V(G)$ is a partition of $V(G)$ to disjoint sets $C_i$ (the cliques of $P$) such that every $C_i$ induces a complete subgraph in $G$.

The {\bf size} $r(P)$ of a good partition $P$ is the number of cliques in it. The cliques of a good partition $P$ are ordered such that their size is non-decreasing: $|C_0|\le|C_1|\le\dots \le|C_{r(P)}|$.

A good partition is a {\bf greedy partition} if for every $l\ge 1$ the union of all the parts of size at most $l$ induces a $K_{l+1}$-free subgraph, that is, for every $i\ge 1$, $C_0\cup C_1\cup\dots\cup C_i$ is $K_{|C_i|+1}$-free.
(See Figure \ref{fig:defgp} for examples.)
\end{defi}

{\it Remark.} In our paper $l$ is at most 3 typically, but in some cases it can be arbitrary.

Note that the last requirement in the definition holds also trivially for $i=0$.

The name greedy comes from the fact that a good partition is a greedy partition if and only if we can build it greedily in backwards order, by taking a maximal size complete subgraph $C\subset V(G)$ of $G$ as the last clique in the partition, and then recursively continuing this process on $V(G)\setminus C$ until we get a complete partition. This also implies that every $G$ has at least one greedy partition. If $G$ is $K_4$-free then a greedy partition is a partition of $V(G)$ to $1$ vertex sets, $2$ vertex sets spanning an edge and $3$ vertex sets spanning a triangle, such that the union of the size 1 cliques of $P$ is an independent set and the union of the size 1 and size 2 cliques of $P$ is triangle-free.

\begin{figure}[t]
    \centering
        \includegraphics[scale=1]{greedypartitiondef.eps}
   \caption{A greedy partition of an arbitrary graph and of a complete $3$-partite graph.}
   \label{fig:defgp}
\end{figure}

\begin{lem}[\cite{chinese}]
Let $G$ be a $K_4$-free graph and $P$ be a greedy partition of $G$. Then
$$\te\ge \frac{\ta}{r(P)}.$$
\end{lem}

For sake of keeping the paper self-contained, we prove this lemma too.

\begin{proof}
Let $r=r(P)$ and the cliques of the greedy partition be $C_0,C_1,\dots C_{r-1}$. With every vertex $v\in C_i$ we associate the value $h(v)=i$ and with every triangle of $G$ we associate the value $h(T)=\sum _{v\in T} h(v) \mod r$. As there are $r$ possible associated values, by the pigeonhole principle there is a family $\cal T$ of at least $\ta/r$ triangles that have the same associated value. It's easy to check that two triangles sharing an edge cannot have the same associated value if $G$ is $K_4$-free, thus $\cal T$ is a family of at least $\ta/r$ edge-disjoint triangles in $G$, as required.
\end{proof}

 It implies that $\te\ge \frac{\ta}{R(P)}$, moreover the inequality is true for every $P$.
Note that the next theorem holds for every graph, not only for $K_4$-free graphs.

\begin{thm}\label{thm:tbound}
Let $G$ be a graph and $P$ a greedy partition of $G$. Then $t\ge r(P)\cdot(e-n^2/4)$.
\end{thm}

By choosing an arbitrary greedy partition $P$ of $G$, the above lemma and theorem together imply that for a $K_4$-free $G$ we have $t_e\ge \frac{\ta}{r(P)}\ge e-n^2/4=k$, concluding the proof of Theorem \ref{thm:main}.

\bigskip

Before we prove Theorem \ref{thm:tbound}, we make some preparations.

\begin{lem}\label{lem:twocliques}
Given a $K_{b+1}$-free graph $G$ on vertex set $A\cup B$, $|A|=a\le b=|B|$, $A$ and $B$ both inducing complete graphs, there exists a matching of non-edges between $A$ and $B$ covering $A$. In particular, $G$ has at least $a$ non-edges.
\end{lem}
\begin{proof}
Denote by $\bar G$ the complement of $G$ (the edges of $\bar G$ are the non-edges of $G$).
To be able to apply Hall's theorem, we need that for every subset $A'\subset A$ the neighborhood $N(A')$ of $A'$ in $\bar G$ intersects $B$ in at least $|A'|$ vertices. Suppose there is an $A'\subset A$ for which this does not hold, thus for $B'=B\setminus N(A')$ we have $|B'|= |B|-|B\cap N(A')|\ge b-(a-1)$. Then $A'\cup B'$ is a complete subgraph of $G$ on at least $a+b-(a-1)=b+1$ vertices, contradicting that $G$ is $K_{b+1}$-free.
\end{proof}

\begin{obs}\label{obs:Pdoesnotmatter}
If $G$ is complete $l$-partite for some $l$ then it has essentially one greedy partition, i.e., all greedy partitions of $G$ have the same clique sizes and have the same number of cliques, which is the size of the biggest part (biggest independent set) of $G$.
\end{obs}

We regard the following function depending on $G$ and $P$ (we write $r=r(P))$: $$f(G,P)=r(e-n^2/4)-t.$$ We are also interested in the function $$g(G,P)=r(e-r(n-r))-t.$$ Notice that $g(G,P)\ge f(G,P)$ and  $f$ is a monotone increasing function of $r$ (but $g$ is not!) provided that $e-n^2/4\ge 0$. Also, using Observation \ref{obs:Pdoesnotmatter} we see that if $G$ is complete multipartite then $r$, $f$ and $g$ do not depend on $P$, thus in this case, we may write simply $f(G)$ and $g(G)$.

\begin{lem}\label{lem:completepartite}
If $G$ is a complete $l$-partite graph then $g(G)\le 0$ and if $G$ is complete $3$-partite (some parts can have size $0$) then $g(G)= 0$.
\end{lem}
\begin{proof}
Let $G$ be a complete $l$-partite graph with part sizes $c_1\le \dots \le c_l$. By Observation \ref{obs:Pdoesnotmatter}, $r=r(P)=c_l$ for any greedy partition.
We have $n=\sum_i c_i$, $e=\sum_{i< j} c_ic_j$, $t=\sum_{i< j< m} c_ic_jc_m$ and so
$$g(G)= r(e-r(n-r))-t=c_l(\sum_{i< j} c_ic_j-c_l\sum_{i< l} c_i)-t=$$ $$=c_l\sum_{i<j<l} c_ic_j-\sum_{i<j<m} c_ic_jc_m=-\sum_{i<j<m<l} c_ic_jc_m\le 0.$$
Moreover, if $l\le 3$ then there are no indices $i<j<m<l$ thus the last equality also holds with equality.
\end{proof}

\begin{figure}[t]
    \centering
        \includegraphics[scale=1]{ggpdef.eps}
   \caption{A generalized greedy partition of an arbitrary graph (heavy edges represent complete bipartite graphs) .}
   \label{fig:defggp}
\end{figure}

In the proof we need a generalization of a greedy partition, which is similar to a greedy partition, with the only difference that the first part $C_0$ in the partition $P$ is a blow-up of a clique instead of a clique. see Figure \ref{fig:defggp} for an example.

\begin{defi}
A $P$ {\bf generalized greedy partition} ({\bf ggp} in short) of some graph $G$ is a partition of $V(G)$ into the sequence of disjoint sets $C_0,C_1,\dots C_l$ such that $C_0$ induces a complete $l_0$-partite graph, $C_i, i\ge 1$ induces a clique and $l_0\le |C_1|\le \dots |C_l|$. We require that for every $i\ge 1$, $C_0\cup C_1\cup\dots\cup C_i$ is $K_{|C_i|+1}$-free.

We additionally require that if two vertices are not connected in $C_0$ (i.e., are in the same part of $C_0$) then they have the same neighborhood in $G$, i.e., vertices in the same part of $C_0$ are already symmetric.

The {\bf size} $r(P)$ of a greedy partition $P$ is defined as the size of the biggest independent set of $C_0$ plus $l-1$, the number of parts of $P$ besides $C_0$.
\end{defi}

Note that the last requirement in the definition holds also for $i=0$ in the natural sense that $C_0$ is $l_0+1$-free.

Observe that the requirements guarantee that in a ggp $P$ if we contract the parts of $C_0$ (which is well-defined because of the required symmetries in $C_0$) then $P$ becomes a normal (non-generalized) greedy partition (of a smaller graph).

Using Observation \ref{obs:Pdoesnotmatter} on $C_0$, we get that the size of a ggp $P$ is equal to the size of any underlying (normal) greedy partition $P'$ of $G$ which we get by taking any greedy partition of $C_0$ and then the cliques of $P\setminus\{C_0\}$. Observe that for the sizes of $P$ and $P'$ we have $r(P)=r(P')$, in fact this is the reason why the size of a ggp is defined in the above way.

Finally, as we defined the size $r(P)$ of a ggp $P$, the definitions of the functions $f(G,P)$ and $g(G,P)$ extend to a ggp $P$ as well. With this notation Lemma \ref{lem:completepartite} is equivalent to the following:

\begin{cor}\label{cor:onepartggp}
If a ggp $P$ has only one part $C_0$, which is a blow-up of an $l_0$-partite graph, then $r(G,P)\le 0$ and if $l_0\le 3$ then $r(G,P)=0$.
\end{cor}

\begin{proof}[Proof of Theorem \ref{thm:tbound}]

The theorem is equivalent to the fact that for every graph $G_0$ and greedy partiton $P_0$ we have $f(G_0,P_0)\le 0$.

Let us first give a brief summary of the proof. We will repeatedly do some symmetrization steps, getting new graphs and partitions, ensuring that during the process $f$ cannot decrease. At the end we will reach a complete $l$-partite graph $G_*$ for some $l$. However by Lemma \ref{lem:completepartite} for such graphs $g(G_*,P_*)\le 0$ independent of $P_*$, which gives $f(G_0,P_0)\le f(G_*)\le g(G_*)\le 0$. This proof method is similar to the proof from the book of Bollob\'as \cite{bollobas} (section VI. Theorem 1.7.) for a (not optimal) lower bound on $t$ by a function of $e,n$. An additional difficulty comes from the fact that our function also depends on $r$, thus during the process we need to maintain a greedy partition whose size is not decreasing either.

\begin{figure}[t]
    \centering
        \includegraphics[scale=0.8]{proofalg.eps}
   \caption{One step of the symmetrization algorithm SymmAlg (dashed lines denote non-edges).}
   \label{fig:alg}
\end{figure}

Now we give the details of the symmetrization. The algorithm SymmAlg  applies the symmetrization algorithms SymmAlgSubMatch and SymmAlgSubMerge alternately, for an example see Figure \ref{fig:alg}

{\bf SymmAlg:}

We start the process with the given $G_0$ and $P_0$. $P_0$ is a normal greedy partition which can be regarded also as a ggp in which in the first blown-up clique $C_0$ all parts have size $1$.

In a general step of SymmAlg before running SymmAlgSubMatch we have a $G$ and a ggp $P$ of $G$ such that $f(G_0,P_0)\le f(G,P)$. This trivially holds (with equality) before the first run of SymmAlgSubMatch.

{\bf SymmAlgSubMatch:}

If the actual ggp $P$ contains only one part $C_0$ (which is a blow-up of a clique) then we {\bf STOP} SymmAlg.

Otherwise we do the following.
Let the blown-up clique $C_0$ be complete $l$-partite. Temporarily contract the parts of $C_0$ to get a smaller graph in which $P$ becomes a normal greedy partition $P_{temp}$, let $A$ ($|A|=a$) be the first clique (the contraction of $C_0$) and $B=C_1$ ($a\le b=|B|$) be the second clique of $P_{temp}$. As $P$ is a greedy partition, $A\cup B$ must be $K_{b+1}$-free, so we can apply Lemma \ref{lem:twocliques} on $A$ and $B$ to conclude that there is a matching of non-edges between $A$ and $B$ that covers $A$. In $G$ this gives a matching between the parts of the blown-up clique $C_0$ and the vertices of the clique $C_1$ such that if a part $A_i\subset C_0$ is matched with $b_i\in C_1$ then there are no edges in $G$ between $A_i$ and $b_i$.

For every such pair $(A_i,b_i)$ we do the following symmetrization. Let $v\in A_i$ an arbitrary representative of $A_i$ and $w=b_i$. Fix $r_0=r(P)$ and let $f_v=r_0d_v-t_v$ where $d_v$ is the degree of $v$ in $G$ and $t_v$ is the number of triangles in $G$ incident to $v$, or equivalently the number of edges spanned by $N(v)$. Similarly $f_w=r_0d_w-t_w$. Clearly, $f(G,P)=r_0(e-n^2/4)-t=|A_i|f_v+f_w+f_0$ where $f_0$ depends only on the graph induced by the vertices of $V(G)\setminus (A_i\cup\{w\})$. Here we used that there are no edges between $A_i$ and $b_i$. If $f_v\ge f_w$ then we replace $w$ by a copy of $v$ to get the new graph $G_1$, otherwise we replace $A_i$ by $|A_i|$ copies of $w$ to get the new graph $G_1$. In both cases
$$r_0(e_1-n^2/4)-t_1=(|A_i|+1)\max(f_{v},f_{w})+f_0\ge$$$$\ge |A_i|f_v+f_w+f_0=r_0(e-n^2/4)-t.$$
Note that after this symmetrization $V(G)\setminus (A_i\cup\{w\})$ spans the same graph, thus we can do this symmetrization for all pairs $(A_i,b_i)$ one-by-one (during these steps for some vertex $v$ we define $f_v$ using the $d_v$ and $t_v$ of the current graph, while $r_0$ remains fixed) to get the graphs $G_2,G_3,\dots$. At the end we get a graph $G'$ for which
 $$r_0(e'-n^2/4)-t'\ge r_0(e-n^2/4)-t=f(G,P).$$ Now we proceed with SymmAlgSubMerge, which modifies $G'$ further so that the final graph has a ggp of size at least $r_0$.

{\bf SymmAlgSubMerge:}

In this graph $G'$ for all $i$ all vertices in $A_i\cup \{b_i\}$ have the same neighborhood (and form independent sets). Together with the non-matched vertices of $C_1$ regarded as size-$1$ parts we get that in $G'$ the graph induced by $C_0\cup C_1$ is a blow-up of a (not necessarily complete) graph on $b$ vertices. To make this complete we make another series of symmetrization steps. Take an arbitrary pair of parts $V_1$ and $V_2$ which are not connected (together they span an independent set) and symmetrize them as well: take the representatives $v_1\in V_1$ and $v_2\in V_2$ and then $r_0(e'-n^2/4)-t'=|V_1|f_{v_1}+|V_2|f_{v_2}+f_1$ as before, $f_1$ depending only on the subgraph spanned by $G'\setminus (V_1\cup V_2)$. Again replace the vertices of $V_1$ by copies of $v_2$ if $f_2\ge f_1$ and replace the vertices of $V_2$ by copies of $v_1$ otherwise. In the new graph $G'_1$, we have
 $$r_0(e_1'-n^2/4)-t_1'=(|V_i|+|V_j|)\max(f_{v_1},f_{v_2})+f_0\ge$$$$\ge |V_1|f_{v_1}+|V_2|f_{v_2}+f_0=r_0(e'-n^2/4)-t'.$$
 Now $V_1\cup V_2$ becomes one part and in $G'_1$ $C_0\cup C_1$ spans a blow-up $C_0'$ of a (not necessarily complete) graph with $b-1$ parts. Repeating this process we end up with a graph $G''$ for which
$$r_0(e''-n^2/4)-t''\ge r_0(e'-n^2/4)-t'\ge f(G,P).$$
 In $G''$ $C_0\cup C_1$ spans a blow-up $C_0''$ of a complete graph with at most $|C_1|$ parts. Moreover $V\setminus(C_0\cup C_1)$ spans the same graph in $G''$ as in $G$, thus $C_0''$ together with the cliques of $P$ except $C_0$ and $C_1$ have all the requirements to form a ggp $P''$. If the biggest part of $C_0$ was of size $c_l$ then in $C_0'$ this part became one bigger and then it may have been symmetrized during the steps to get $G''$, but in any case the biggest part of $C_0''$ is at least $c_l+1$ big. Thus the size of the new ggp $P''$ is $r(P'')\ge c_l+1+(r(P)-c_l-1)\ge r(P)=r_0$.

If $e''-n^2/4< 0$, then we {\bf STOP} SymmAlg and conclude that we have $f(G_0,P_0)\le f(G,P)\le 0$, finishing the proof.
Otherwise $$f(G'',P'')=r(P'')(e''-n^2/4)-t''\ge r_0(e''-n^2/4)-t''\ge f(G,P)\ge f(G_0,P_0),$$
and so $G'',P''$ is a proper input to SymmAlgSubMatch. We set $G:=G''$ and $P:=P''$ and {\bf GOTO} SymmAlgSubMatch. Note that the number of parts in $P''$ is one less than it was in $P$.
This ends the description of the running of  SymmAlg.

As after each SymmAlgSubMerge the number of cliques in the gpp strictly decreases, SymmAlg must stop until finite many steps.
When SymmAlg STOPs we either can conclude that $f(G_0,P_0)\le 0$ or SymmAlg STOPped because in the current graph $G_*$ the current gpp $P_*$ had only one blow-up of a clique. That is, the final graph $G_*$ is a complete $l_*$-partite graph for some $l_*$ (which has essentially one possible greedy partition). We remark that if the original $G$ was $K_m$-free for some $m$ then $G_*$ is also $K_m$-free, i.e., $l_*\le m-1$. As $f$ never decreased during the process we get using Corollary \ref{cor:onepartggp} that $f(G_0,P_0)\le f(G_*,P_*)\le g(G_*,P_*)\le 0$, finishing the proof of the theorem.
\end{proof}

\section{Remarks}

In the proof of Theorem \ref{thm:tbound}, we can change $f$ to any function that depends on $r,n,e,t,k_4,k_5,\dots $, (where $k_i(G)$ is the number of complete $i$-partite graphs of $G$) and is monotone in $r$ and is linear in the rest of the variables (when $r$ is regarded as a constant) to conclude that the maximum of such an $f$ is reached for some complete multipartite graph. Moreover, as the symmetrization steps do not increase the clique-number of $G$, if the clique number of $G$ is $m$ then this implies that $f(G,P)$ is upper bounded by the maximum of $f(G_*)$ taken on the family of graphs $G_*$ that are complete $m$-partite (some parts can be empty).

Strengthening Theorem \ref{thm:tbound}, it is possible that we can change $f$ to $g$ and the following is also true:

\begin{conj}\label{conj:nice}
if $G$ is a $K_4$-free graph and $r=r(P)$ is the size of an arbitrary greedy partition of $G$ then $t\ge r(e-r(n-r))$ and so $t_e\ge e-r(n-r)$.
\end{conj}

This inequality is nicer than Theorem \ref{thm:tbound} as it holds with equality for all complete $3$-partite graphs. However, we cannot prove it using the same methods, as it is not monotone in $r$. Note that the optimal general bound for $t$ (depending on $e$ and $n$; see \cite{fishersolow} for $K_4$-free graphs and \cite{fisherpaper, razborov} for arbitrary graphs) does not hold with equality for certain complete $3$-partite graphs, thus in a sense this statement would be an improvement on these results for the case of $K_4$-free graphs (by adding a dependence on $r$). More specifically, it is easy to check that there are two different complete $3$-partite graphs with a given $e,n$ (assuming that the required size of the parts is integer), for one of them Fisher's bound holds with equality, but for the other one it does not (while of course Conjecture \ref{conj:nice} holds with equality in both cases).

As we mentioned in the Introduction, in the examples showing that our theorem is sharp, $k$ is roughly at most $n^2/16$ while in general in a $K_4$-free graph $k\le n^2/12$, thus for bigger $k$ it's possible that one can prove a stronger result. Nevertheless, the conjectured bound $t_e\ge e-r(n-r)$ is exact for every $e$ and $r$ as shown by graphs that we get by taking a complete bipartite graph on $r$ and $n-r$ vertices and putting any triangle-free graph in the $n-r$ sized side. For a greedy partition of size $r$ we have $e\le r(n-r)+(n-r)^2/4$ (follows directly from Claim \ref{claim:r2}, see below), thus these examples cover all combinations of $e$ and $r$, except when $e<r(n-r)$ in which case trivially we have at least $0$ triangles, while the lower bound $e-r(n-r)$ on the triangles is smaller than $0$.

\begin{claim}\label{claim:r2}
If $G$ is a $K_4$-free graph, $P$ is a greedy partition of $G$, $r=r(P)$ is the size of $P$ and $r_2$ is the number of cliques in $P$ of size at least $2$, then $e\le r(n-r)+r_2(n-r-r_2)$.
\end{claim}
\begin{proof}
Let $s_1,s_2,s_3$ be the number of size-$1,2,3$ (respectively) cliques of $P$. Then $r=s_1+s_2+s_3,n-r=s_2+2s_3,r_2=s_2+s_3,n-r-r_2=s_3$.
Applying Lemma \ref{lem:twocliques} for every pair of cliques in $P$ we get that the number of edges in $G$ is $e\le {s_1\choose 2}(1\cdot 1-1)+s_1s_2(1\cdot 2-1)+s_1s_3(1\cdot 3-1)+{s_2\choose 2}(2\cdot 2-2)+s_2s_3(2\cdot 3-2)+{s_3\choose 2}(3\cdot 3-3)+s_2+3s_3=s_1s_2+2s_1s_3+s_2^2+4s_2s_3+3s_3^2=(s_1+s_2+s_3)(s_2+2s_3)+(s_2+s_3)s_3=r(n-r)+r_2(n-r-r_2)$.
\end{proof}

Finally, as an additional motivation for Conjecture \ref{conj:nice} we show that Conjecture \ref{conj:nice} holds in the very special case when $G$ is triangle-free, that is $t=t_e=0$. Note that for a triangle-free graph the size-2 cliques of a greedy partition define a non-augmentable matching of $G$.

\begin{claim}
If $G$ is a triangle-free graph and $r=r(P)$ is the size of an arbitrary greedy partition of $G$, i.e., $G$ has a non-augmentable matching on $n-r$ edges, then $0\ge e-r(n-r)$.
\end{claim}

\begin{proof}
We need to show that $e\le r(n-r)$. By Claim \ref{claim:r2}, $e\le r(n-r)+r_2(n-r-r_2)$ where $r_2$ is the number of cliques in $P$ of size at least $2$. If $G$ is triangle-free, then $r_2=n-r$ and so $e\le r(n-r)$ follows.

Let us give another simple proof by induction. As $G$ is triangle-free, $P$ is a partition of $V(G)$ to sets inducing points and edges, thus $ r\le n$.
We proceed by induction on $n-r$. If $n-r=0$ then $P$ is a partition only to points. As $P$ is greedy, $G$ contains no edges, $e=0$ and we are done. In the inductive step, for some $n-r>0$ take a part of $P$ inducing an edge and delete these two points. Now we have a triangle-free graph $G'$ on $n-2$ points and a greedy partition $P'$ of $G'$ that has $r-1$ cliques, thus we can apply induction on $G'$ (as $n'-r'=n-2-(r-1)=n-r-1<n-r$) to conlcude that $G'$ has at most $(r-1)(n-1-r)$ edges. We deleted at most $n-1$ edges, indeed as the graph is triangle-free the deleted two vertices did not have common neighbors, so altogether they had edges to at most $n-2$ other points plus the edge between them. Thus in $G$ we had at most $n-1+(r-1)(n-1-r)=r(n-r)$ edges, finishing the inductive step.
\end{proof}