08.10.2016 Views

Foundations of Data Science

2dLYwbK

2dLYwbK

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4.12 Exercises<br />

Exercise 4.1 Search the World Wide Web to find some real world graphs in machine<br />

readable form or data bases that could automatically be converted to graphs.<br />

1. Plot the degree distribution <strong>of</strong> each graph.<br />

2. Compute the average degree <strong>of</strong> each graph.<br />

3. Count the number <strong>of</strong> connected components <strong>of</strong> each size in each graph.<br />

4. Describe what you find.<br />

5. What is the average vertex degree in each graph? If the graph were a G(n, p) graph,<br />

what would the value <strong>of</strong> p be?<br />

6. Spot differences between your graphs and G(n, p) for p from the last part. [Look at<br />

sizes <strong>of</strong> connected components, cycles, size <strong>of</strong> giant component.]<br />

Exercise 4.2 In G(n, p) the probability <strong>of</strong> a vertex having degree k is ( n<br />

k)<br />

p k (1 − p) n−k .<br />

1. Show by direct calculation that the expected degree is np.<br />

2. Compute directly the variance <strong>of</strong> the distribution.<br />

3. Where is the mode <strong>of</strong> the binomial distribution for a given value <strong>of</strong> p? The mode is<br />

the point at which the probability is maximum.<br />

Exercise 4.3<br />

1. Plot the degree distribution for G(1000, 0.003).<br />

2. Plot the degree distribution for G(1000, 0.030).<br />

Exercise 4.4 To better understand the binomial distribution plot ( n<br />

k)<br />

p k (1 − p) n−k as a<br />

function <strong>of</strong> k for n = 50 and k = 0.05, 0.5, 0.95. For each value <strong>of</strong> p check the sum over<br />

all k to ensure that the sum is one.<br />

Exercise 4.5 In G ( n, n) 1 , argue that with high probability there is no vertex <strong>of</strong> degree<br />

greater than<br />

6 log n (i.e. ,the probability that such a vertex exists goes to zero as n goes<br />

log log n<br />

to infinity). You may use the Poisson approximation and may wish to use the fact that<br />

k! ≥ ( k e )k .<br />

Exercise 4.6 The example <strong>of</strong> Section 4.1.1 showed that if the degrees in G(n, 1 n ) were<br />

independent there would almost surely be a vertex <strong>of</strong> degree Ω(log n/ log log n). However,<br />

the degrees are not independent. Show how to overcome this difficulty.<br />

130

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!