Asg4 Problem1: Calculate required measures with igraph