Update adjacency list and add adjacency matrix