Question: Please assist me with the following practice question. I will comment where you can find the mentioned py in the comments, if you would like

Please assist me with the following practice question. I will comment where you can find the mentioned py in the comments, if you would like me to send them to another way please let me know

Please assist me with the following practice question. I will comment where

1a. (5 pts) Write a script that uses the Performance class to generate data that we can use to determine empirically the complexity class of the find_influencers function dened in the inf luence.py module (my solution to problem 1 of Programming Assignment #1). Call the evaluate and analyze functions on an appropriately constructed Performance class object for random graphs constructed from 100 nodes, 200 nodes, up to 12,800 nodes (on graphs that have five times the number of edges as nodes) using a loop to double the number of nodes each time. Do 5 timings for each size: each of the 5 timings in Performance should run on a different random graph, and creating the random graph should not be timed. Hint: Write a script with a create_random function that stores a random graph (see the random_graph lnction in the q81solution.py module) of the correct size into a global name, then time the find_inf1uencers function using that global name as an argument. If an exception is raised for any size, print an error message for that size but continue collecting data: this might happen for small sizes. I had about 30 lines in my module (including blank lines). See the file sample8.pdf (included in the download) for what your output should look like: of course, your times will depend on the speed of your computer (but the complexity class estimation will not). The process can take a few minutes. Do not time the execution of the random_graph function! lb. (3 pts) Fill in part 1b of the empirical .doc document (included in the download) with the data that you collect (or use the data in sample8.pdf if you cannot get your code to produce the correct results) and draw a conclusion about the complexity class of the find_influencers function by seeing how much time it takes to run as the size (in number of nodes) of its input graph doubles. Then predict how long this function will take when running on an input graph of 1 million nodes

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!