Represent graph using adjacency matrix (#706)

Represent graph using adjacency matrix (#706)

Create a matrix where entry Aij=1A_{ij}=1 if edge exists between ii and jj.