Write a Program to generate a random connected undirected graph on a n vertices by generating random pairs of integers between 1 and n. Compute how many edges are needed to produce a connected graph(as a function of n).

Implement the union-find algorithm, with the Weighted Balancing and the splitting Rule, to keep track of the connectivity. For each n=5, 10, 15, 20…95, 100, do 1000 experiments to find the average number of edges needed to get a connected graph.

Can any one help me out with the code?

Write a Program to generate a random connected undirected graph on a n vertices by generating random pairs of integers between 1 and n. Compute how many edges are needed to produce a connected graph(as a function of n).

Implement the union-find algorithm, with the Weighted Balancing and the splitting Rule, to keep track of the connectivity. For each n=5, 10, 15, 20…95, 100, do 1000 experiments to find the average number of edges needed to get a connected graph.

Can any one help me out with the code?

Sorry, this code is "above my pay grade". Uumh! I think I have heard this somewhere...
Well, here's a phrase I'm sure its taken.
Read the forum rules. No effort shown, not help offered.

hey, no worries, usman2k4u... i can totally help you out with this code.

here is the start

#include <stdio.h>
#include <stdlib.h>

int main()
{
     // declare local variables here

     // insert body of code here

     return 0;
}

you fill in the rest.

then when you can formulate a real question, come on back and we'll match you up with a real answer.

.

Write a Program to generate a random connected undirected graph on a n vertices by generating random pairs of integers between 1 and n. Compute how many edges are needed to produce a connected graph(as a function of n).

Implement the union-find algorithm, with the Weighted Balancing and the splitting Rule, to keep track of the connectivity. For each n=5, 10, 15, 20…95, 100, do 1000 experiments to find the average number of edges needed to get a connected graph.

Can any one help me out with the code?

I'm sure that if you wanted help, you could check the book. You could probably even ask Dr. Chen.

Nobody help this lazyass clown. He copied the entire assignment ver batim. I hope you DIAF.

>Nobody help this lazy @$$ clown.
We wouldn't have anyway. Cheaters and leeches are quickly shunned from the community.

p.s. You don't need to trick the censor, "ass" is perfectly acceptable here.

well, DIAF is a little excessive, methinks. even for lazyass clowns

:(

Thanks everyone, for all your appreciation's. This will motivate me to do the above code. In-fact it is easier than expected. Anyways, thanks for great help!!!!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.