Choose your graph implementation allowing to build such


A random graph is is graph generated by a random process. In this project, we will use a simple process. Given a graph with n nodes, and a number p chosen between 0 and 1, a link between two nodes is going to generated if a uniform random draw between 0 and 1 is less than the number p. In this exercise, we will consider only undirected graphs.

Choose your graph implementation allowing to build such graphs (you should be able to generate graphs up to 1000 nodes).

Implement a method on your graph using breadth first search to check if all nodes are reachable from each other.

Then, implement the following experiment for n being 200, 400, 600, 800, 1000, and for each value of n, for p equal to .007, .01, and .02:
Generate 1000 random graphs for n and p, and count how many are connected using the method described above.

Generate a plot (using Excel for instance) to summarize your results for each value of n (5 different plots).

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Choose your graph implementation allowing to build such
Reference No:- TGS01482642

Now Priced at $15 (50% Discount)

Recommended (90%)

Rated (4.3/5)