# CS 765 Complex Networks

## Due on Wednesday Nov 1, 2017 at 1 pm

Power-law network

Using any programming language, generate 100,000 random integers from a power law distribution with exponent alpha = 2.1. Note that the slides #90-105 discuss the power law generation and fitting.

1. What is the largest value in your sample? Is it possible for a node in a network to have a degree this high (assuming you don't allow multiple edges between two nodes)?
2. Construct a histogram of the frequency of occurrence of each integer in your sample. Try both a linear scale plot and a log-log scale plot. (include snapshots)
3. What happens to the bins with zero count in the log-log plot?
4. Try a simple linear regression on the log transformation of both variables. (In Matlab, you can plot two data sets together as follows: plot(x1,y1,'r-',x2,y2,'b:'). This will plot y1 vs. x1 as a red solid line, and y2 vs. x2 as a blue dotted line.) What is your value of the power-law exponent alpha? Include a plot of the data with the fit superimposed.
5. Now exponentially bin the data and fit with a line. What is your value of alpha?
6. Do a cumulative frequency plot of the original data sample. Fit, plot, and report on the fitted exponent and the corresponding value of alpha.
7. Finally, do a maximum likelihood fitting of the data. Plot the results and report the alpha.
8. Which method was the most accurate? Which one, in your opinion, gave the best view of the data and the fit?