public static int MaxDegree(this Graph g, int v)
 {
     return(Enumerable.Range(0, g.Vertices).Select(x => g.Degree(x)).Max());
 }