Creating an adjacency matrix and its notation?

103 Views Asked by At

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?

2

There are 2 best solutions below

8
On BEST ANSWER

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:

Set $A_{i,j} = 1$ if $Z_i$ and $Z_j$ are adjacent (and not equal), otherwise $0$.

0
On

I didnt understood your first question so i will directly answer the second one. The condition makes sense as long as you can compute the adjency matrix A and it should ne written as : Given x a vector where x_i=1 if the square i is chosen, 0 otherwise. Hence x contains 20 composants equal to 1 and 80 equal to zero. You compute the product Ax ans see it the resulting vector is null. If it is the case, there is no intersection, if not there must be some squares with common boundery.