How I can typeset this equation with LaTeX?

I would like to typeset the enclosed equation but placing the last a_{i, j} in the same column as the above a_{i, j}+1 and a_{i, j}-1, and the b_i in the same column as the above b_i's and not as it is presented in this equation, where the last line is just center aligned.

-
It would be useful if you add the code you have now for the equation. –  egreg Sep 29 '12 at 13:41
I recommend adding if before b_i to avoid misinterpretation. And btw, your profile shows only 20% accept rate. I'm sure that you have some good solutions to your questions and you should consider accepting the answers, giving the answerers the site reputation. –  tohecz Sep 29 '12 at 14:31

I prefer the cases environment of amsmath. Furthermore, it is advisable to add the word "if" to the conditions:

\documentclass{scrartcl}
\usepackage{amsmath}
\begin{document}

$$a_{i,j} = \begin{cases} a_{i,j}+1 & \text{if b_{i}=1 and c_{j}=0}\\ a_{i,j}-1 & \text{if b_{i}=0 and c_{j}=1}\\ a_{i,j} & \text{if b_{i}=0} \end{cases}$$
\end{document}


-
without the word "if", the mathematical meaning is quite unclear –  tohecz Sep 29 '12 at 14:29
Besides adding the word if, I suggest you typeset the commas in text mode (or add the word and): \text{if $b_i = 1$ and $c_j = 0$} .... (Requires amsmath.) –  Marc van Dongen Sep 29 '12 at 15:04
@tohecz and (at)Marc I added your propositions to the answer. –  sebschub Sep 29 '12 at 16:48
The mathtools gives you, among others, the environment cases* where you don't need the \text part. –  Qrrbrbirlbel Sep 29 '12 at 17:01

Although I am not exactly sure what you are trying to do (it seems like a circular definition to me), perhaps this answers your question:

\documentclass{article}

\begin{document}
$$a_{i,j}=\left\lbrace \begin{array}{lll} a_{i,j}+1, & b_i = 1, & c_j = 0\\ a_{i,j}-1, & b_i = 0, & c_j = 1\\ a_{i,j} , & b_i = 0 & \end{array} \right.$$
\end{document}


Note that you could also use the cases environment from the amsmath package, but in that case you would only have two columns while you seem to need three here (the spacing will be different). A solution with cases would be

\documentclass{article}

\usepackage{amsmath}
\begin{document}
$$a_{i,j} = \begin{cases} a_{i,j}+1 & b_i = 1,\quad c_j = 0\\ a_{i,j}-1 & b_i = 0,\quad c_j = 1\\ a_{i,j} & b_i = 0 \end{cases}$$
\end{document}


With output:

-
If you add @{} in front of the three llls you have a spacing between the \lbrace and your array in the same way as the cases environment. –  Qrrbrbirlbel Sep 29 '12 at 14:09