I want to add/merge two graphs in form of adjacency matrices and take care of the structure.
The first graph looks like this: first small graph The related adjacency