
Csci 688 (Kincaid Fall 2009)
Scale-Free Networks
Homework 6: Due October 16, 2009
As on the last homework you may work in groups (size ≤3).
1. Write a C program to generate a scale-free network via preferen-
tial attachment. Please explain any assumptions you make with
regard to your implementation. Make sure that the degree of the
dynamically added nodes is an input parameter. Steve Park’s
suite of random number generators (rngs.c, rngs.h, rvgs.c and
rvgs.h) are available on the math network in ∼rrkinc/homework/.
C code for generating Gn,p graphs that use these random number
generators, erdosGNP.c, can also be found in that same directory.
2. Verify that your code is producing a scale-free network by ana-
lyzing its degree distribution for n= 100, 500 and 1000 nodes.
Plot the degree distribution on a log-log scale using any tools you
like (e.g. Maple or Splus). Does the degree distribution follow a
power law? Why or why not? Explain how you generated your
plots.
3. Compute the average shortest path distance for your network
when n= 1000. How does it compare to log n; log log n?
4. Find a way to plot your resulting graphs for n= 100,500 and
1000 nodes. Is it easy to see that it is scale-free? Why or why
not? Explain how to generate your plots.
Please email me your code. Turn in your log-log degree distribution
plots, your graph plots and the answers to the questions in 2, 3 and
4.