Write a program that generates V random points in the plane, then builds a flow network with edges (in both directions) connecting all pairs of points within a given distance d of each other (see Program 3.20), setting each edge's capacity using one of the random models described in Exercise 22.9. Determine how to set d so that the expected number of edges is E.
Exercise 22.9
Write a random-network generator for sparse networks with capacities between 0 and 220, based on Program 17.7. Use a separate class for capacities and develop two implementations: one that generates uniformly distributed capacities and another that generates capacities according to a Gaussian distribution. Implement client programs that generate random networks for both weight distributions with a well-chosen set of values of V and E so that you can use them to run empirical tests on graphs drawn from various distributions of edge weights.
![1405_a1c934a2-0521-44fd-8ceb-57b0deb772f6.png](https://secure.tutorsglobe.com/CMSImages/1405_a1c934a2-0521-44fd-8ceb-57b0deb772f6.png)
![1283_8919e15d-5320-4748-ab1b-eb48fb2285bf.png](https://secure.tutorsglobe.com/CMSImages/1283_8919e15d-5320-4748-ab1b-eb48fb2285bf.png)