Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 3 (20 pts). In this programming problem, we will be considering MSTs on complete, undirected graphs A graph with n vertices is complete if

image text in transcribed

Problem 3 (20 pts). In this programming problem, we will be considering MSTs on complete, undirected graphs A graph with n vertices is complete if all possible (?) edges are present in the graph. Consider the following two * Complete graphs on n vertices, where the weight of each edge is a real number chosen uniformly at random * Complete graphs on n vertices, where the vertices are points chosen uniformly at random inside the unit types of graphs: from [0, 1] square. (That is, the points are (x, y), with x and y each a real number chosen uniformly at random from 0,1].) The weight of an edge is the Euclidean distance between its endpoints Your goal is to determine how the average weight of the minimum spanning tree grows as a function of n for each of these families of graphs. You will need to implement an MST algorithm and procedures that generate the appropriate random graphs. Run your program on at least five random graph instances for n- 16,32,64,128,256,512,1024,2048, 4096, 8192 and report the average for each value of n. (It is possible, that depending on your implementation you won't be able to run it for the largest graphs. ) For each family of graphs, generate an appropriate figure that depicts your results. Clearly label the axes and think carefully about the most effective representation (should it be a bar chart, line chart, scatterplot, etc.). Also, interpret your results by giving (and plotting) two sample functions that characterize each of your depicted results. For example, your answer might be f(n) 2logn, f(n) - 1.5vn, etc. Also, provide a few sentences of intuition for why the growth rate of your functions f(n) are reasonable. Do this for both types of graphs separately As per usual, submit both the written answer (and charts) as well as your code as part of your pdf submission in Problem 3 (20 pts). In this programming problem, we will be considering MSTs on complete, undirected graphs A graph with n vertices is complete if all possible (?) edges are present in the graph. Consider the following two * Complete graphs on n vertices, where the weight of each edge is a real number chosen uniformly at random * Complete graphs on n vertices, where the vertices are points chosen uniformly at random inside the unit types of graphs: from [0, 1] square. (That is, the points are (x, y), with x and y each a real number chosen uniformly at random from 0,1].) The weight of an edge is the Euclidean distance between its endpoints Your goal is to determine how the average weight of the minimum spanning tree grows as a function of n for each of these families of graphs. You will need to implement an MST algorithm and procedures that generate the appropriate random graphs. Run your program on at least five random graph instances for n- 16,32,64,128,256,512,1024,2048, 4096, 8192 and report the average for each value of n. (It is possible, that depending on your implementation you won't be able to run it for the largest graphs. ) For each family of graphs, generate an appropriate figure that depicts your results. Clearly label the axes and think carefully about the most effective representation (should it be a bar chart, line chart, scatterplot, etc.). Also, interpret your results by giving (and plotting) two sample functions that characterize each of your depicted results. For example, your answer might be f(n) 2logn, f(n) - 1.5vn, etc. Also, provide a few sentences of intuition for why the growth rate of your functions f(n) are reasonable. Do this for both types of graphs separately As per usual, submit both the written answer (and charts) as well as your code as part of your pdf submission in

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Principles Of Multimedia Database Systems

Authors: V.S. Subrahmanian

1st Edition

1558604669, 978-1558604667

More Books

Students also viewed these Databases questions

Question

600 lb 20 0.5 ft 30 30 5 ft

Answered: 1 week ago