Identify vertices and edges in a graph