files for finding degree of graph