title: Generate random numbers distributed by Zipf
body: <p>The <a href="http://en.wikipedia.org/w/index.php?title=Zipf%27s_law" rel="noreferrer">Zipf probability distribution</a> is often used to model file size distribution or item access distributions on items in P2P systems. e.g. <a href="http://www.nslij-genetics.org/wli/zipf/breslau99.pdf" rel="noreferrer">"Web Caching and Zip like Distribution Evidence and Implications"</a>, but neither <a href="http://www.boost.org/doc/libs/1_40_0/libs/random/index.html" rel="noreferrer">Boost</a> or the <a href="http://www.gnu.org/software/gsl/manual/html_node/Random-Number-Distributions.html" rel="noreferrer">GSL (Gnu Scientific Library)</a> provide an implementation to generate random numbers using this distribution. I have not found a (trustworthy) implementation using the common search engines.</p>
  
  <p><em>How can random numbers that are distributed according to the Zipf distribution by using a U(0,1) random generator, e.g. the <a href="http://en.wikipedia.org/wiki/Mersenne_twister" rel="noreferrer">Mersenne twister</a>?</em> </p>