This is LaTeX code:

[latex]
F(i,j)=\max{ \left\{ 
\begin{array}{l}
F(i-1,j-1)+B(x_i,y_i),\\
F(i-1,j)-d,\\
F(i,j-1)-d
\end{array}
\right.}
[/latex]