Lets say I divide an image up into small squares (100 in total). I pick say 20 squares at random, and each is denoted by, $\text{Z}$. So the first square is $\text{Z}_{\text{1}}$, the second is $\text{Z}_{\text{2}}$ and so fourth. I want to see if their boundaries $\mathcal{B}$ intersect, i.e. if the squares happen to be directly next to each other on the image.
I created an adjacency matrix:
\begin{equation} A_{\text{i,j}}=\left\{ \begin{alignedat}{3} 1,&\quad \text{if} \quad \text{i}\neq\text{j}\enspace\text{and}\enspace\exists\mathcal{B}: \mathcal{B}\in\text{Z}_{\text{i}}\cap\text{Z}_{\text{j}}\\ 0,&\quad \text{if} \quad \text{i}=\text{j} \\ 0,&\quad \text{otherwise} \end{alignedat}\, \right\} \end{equation}
1) How do I remove the right curly bracket?
2) Does the condition, $\exists\mathcal{B}: \mathcal{B}\in\text{Z}_{\text{i}}\cap\text{Z}_{\text{j}}$, make sense or is there a better way to write it?
1) To remove the curly bracket you can use
\right.instead of\right\}.2) The conditions makes sense. You could write $Z_i \cap Z_j \neq \emptyset$ to be slightly more succinct. Or even just use words to be more plain: