Due: Friday Dec 1 by 11:59pm Graphs! Points - 3 points per problem? Note - correct working version of the program is in my lab16 directory. Put files in ~/HW/lab16/ Copy into your lab16 directory all the files in ~jkinne/public_html/cs202-f2017/CLASS/graphs/ 1) New graph - create a text file in our adjacency list format for the following. Note - you only create one, the one assigned to your cs202 number. Put a comment at the end of the file with the link to the picture. Use a reasonable filename (e.g., bidiakis.txt) cs20200 - https://en.wikipedia.org/wiki/Bidiakis_cube cs20201 - https://en.wikipedia.org/wiki/Franklin_graph cs20202 - https://en.wikipedia.org/wiki/Gallery_of_named_graphs#/media/File:Complete_graph_K6.svg cs20203 - https://en.wikipedia.org/wiki/Gallery_of_named_graphs#/media/File:Biclique_K_3_4.svg cs20204 - https://en.wikipedia.org/wiki/Gallery_of_named_graphs#/media/File:Undirected_6_cycle.svg cs20205 - https://en.wikipedia.org/wiki/Gallery_of_named_graphs#/media/File:Octahedral_graph.circo.svg cs20206 - https://en.wikipedia.org/wiki/Truncated_tetrahedron cs20207 - https://en.wikipedia.org/wiki/Tietze%27s_graph cs20208 - http://mathinsight.org/media/image/image/small_directed_network_labeled.png cs20209 - https://i.stack.imgur.com/BTt0Z.png cs20210 - https://i.stack.imgur.com/pP6tW.png cs20211 - https://computerabode.files.wordpress.com/2015/05/screen-shot-2015-05-03-at-3-03-19-pm.png cs20213 - http://interactivepython.org/runestone/static/pythonds/_images/digraph.png cs20214 - http://www.dreamincode.net/forums/uploads/monthly_06_2015/post-146038-143447092443.jpg~ cs20215 - http://freefeast.info/wp-content/uploads//2013/06/tree.jpg 2) Degree stats - add a method degreeStats to the Graph class that computes for each Vertex what its degree is, and then prints the degree of all vertices. (You get a gold star if - you print the vertices from largest to smallest degree). Call the degreeStats method at the end of main in graphs.cpp. You can assume the graph is undirected. 3) Connected - add a method connected to the Graph class that uses the BFS function to determine if the graph is connected (call BFS from the first vertex, and then check if all parents are non-NULL). Have your method return a bool, and call the method from the end of main, and then print whether the graph is connected. You can assume the graph is undirected. Example of disconnected graph: http://web.math.princeton.edu/math_alive/5/Lab1/Isolated.jpg 4) Distance - add a method maxDistance to the Graph class that takes one parameter that is a string label of a vertex. The function should call BFS and then determine the furthest vertex from the given vertex. Call maxDistance from the end of main, and call it with the last vertex as the parameter, save the result of maxDistance, and print it. 5) maybe something else gets added to this ... Grading script is below. Note that if you didn't have a part at all, -3 for that. If it was wrong, -2 for that. For #1, if the graph wasn't put in the right format then -2. if [ -d HW/lab16 ]; then cd HW/lab16 echo " *** (1) *** " ls *.txt echo " *** (2) - (4) *** " g++ graph.cpp graphs.cpp -o g ./g ~jkinne/public_html/cs202-f2017/CLASS/graphs/aGraph.txt else echo "*** no lab16 directory *** "; fi Output from running mine - jkinne@cs:~/courses/202/lab16$ *** (2) - (4) *** jkinne@cs:~/courses/202/lab16$ n: 8 weighted undirected V: a[<-a,0] b[<-a,1] c[<-a,1] d[<-b,2] e f g[<-c,2] z E: (a, b, 30) (a, c, 20) (b, d, 10) (b, c, 20) (c, g, 30) (d, g, 5) (e, f, 5) (e, z, 10) (f, z, 30) degrees - deg(a) = 2 deg(b) = 3 deg(c) = 3 deg(d) = 2 deg(e) = 2 deg(f) = 2 deg(g) = 2 deg(z) = 2 graph is NOT connected maxDistance is -1