Complicated cases expression

\documentclass[margin=3mm, varwidth]{standalone}
\usepackage{mathtools}% for cases*, also load amsmath

\begin{document}
\begin{equation}\setlength\arraycolsep{1pt}
xxx = \begin{cases*}
    \max(t,f) & if $\min(t,f) = 0$   \\
\min\left\{\begin{array}{rl}
    xxx & + 1 \\
    xxx & + 1 \\
xxx xxx & + 1 \\
    \end{array}\right. &  otherwise
        \end{cases*}
\end{equation}
\end{document}

enter image description here


Your text is very hard to read (which is why most likely some characters are misrepresented below). Yet I could not make sense of having \min in front of cases. So I am wondering if the lower part, i.e. the second case, is the minimum of a list. If so, maybe the following is more appropriate.

\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{equation}
 MA_{C_0f_0}(i,j)=
 \begin{dcases}
  \max(i,j) & \text{if}~\min(i,j)=0\;,\\
  \begin{array}{@{}r@{}l@{}l@{}}
  \min\bigl\{
    &MA_{C_0f_0}(i-1,j)+1,\\
    &MA_{C_0f_0}(i,j-1)+1,\\
    &MA_{C_0f_0}(i-1,j-1)+1\bigr\}\\
  \end{array}& 
  \text{otherwise}\;.
 \end{dcases}
\end{equation}
\end{document}

enter image description here

Tags:

Math Mode