Question: Exercise 5.21: (a) Let f (n) be the expected number of random edges that must be added before an empty undirected graph with n vertices


Exercise 5.21: (a) Let f (n) be the expected number of random edges that must be
added before an empty undirected graph with n vertices becomes connected. (Connectedness is deined in Exercise 5.19.) That is, suppose that we start with a graph on
n vertices with zero edges and then repeatedly add an edge, chosen uniformly at random from all edges not currently in the graph, until the graph becomes connected. If
Xn represents the number of edges added, then f (n) = E[Xn].
Find program to estimate f (n) for a given value of n. Your program should track
the connected components of the graph as you add edges until the graph becomes connected. You will probably want to use a disjoint set data structure, a topic covered in
standard undergraduate algorithms texts. You should try n = 100, 200, 300, 400, 500,
600, 700, 800, 900, and 1000. Repeat each experiment 100 times, and for each value of
n compute the average number of edges needed. Based on your experiments, suggest a
function h(n) that you think is a good estimate for f (n).
(b) Modify your program for the problem in part (a) so that it also keeps track of
isolated vertices. Let g(n) be the expected number of edges added before there are no
more isolated vertices. What seems to be the relationshi?



Law of probability of a triplet of continuous random variables Problem 2 Let (X, Y, Z) be a triplet of random variables whose probability density function is defined by: f(x, y.z) = (k(x + y3+ z3). (x,y,z) ED 1 0, (x, y. z) ED D = (x, y,z) E R3 where 0 Sy Sx SzS1 1. Determine the constant k. 2. Determine the marginal density of X, the marginal density of Y, and the marginal density of Z. 3. Are the variables X.Y, and Z independent? 4. Compute the expectation of X and the variance of X. 5. Compute the expectation of Y and the variance of Y. 6. Compute the expectation of Z and the variance of Z. 7. Determine the density of Y conditioned by (X = x) and (Z = z), and the expectation of Y conditioned by (X = x) and (Z = z).In order to receive full credit, all work in obtaining the answer must be shown. 1. Consider the continuous random variables W, X, Y with the given probability densityr functions {PDF's): W:f{w)=1/2,D
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
