Search for question
Question

Phase 1

1. Develop an algorithm/program to construct a connected, weighted graph with v vertices and

e edges, where vand e are parameters that satisfy v-1 se sv(v-1)/2 and weights are random

numbers between 1 and 20. Execute your program on 3 examples. Program's input and output

are as follows:

• Inputs:

ov: number of vertices.

oe: number of edges.

Outputs:

o Constructed graph (Show the constructed graph as an adjacency list in an appropriate

manner)

o

Running time of the algorithm

Fig: 1