Question: using python An important form of Zipf's law is the citation patterns found in scientific articles. Rather than doing equations, let's make a simulation of

 using python An important form of Zipf's law is the citation

using python

An important form of Zipf's law is the citation patterns found in scientific articles. Rather than doing equations, let's make a simulation of a simplified version of this. (a) Start with a list containing the integers 1 and 2. (b) Choose one number randomly from the list and append it back to the list. You can use the sample() function from the random module to do this. (c) Append the next number (3) to the list. (d) Repeat these last two steps 1,000 times, incrementing the new number each time until you get a list of 2,002 integers. Now, count up how many times each integer appears in the list and plot a rank-value plot on a log-log scale. Explain how we know that the plot exhibits a power-law scaling, and approximate the scaling exponent

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!