<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.5" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: The Monte Carlo algorithm/method</title>
	<link>http://www.datastructures.info/the-monte-carlo-algorithmmethod/</link>
	<description>Data structures, algorithms, e-books, usefull code and so on...</description>
	<pubDate>Fri, 05 Sep 2008 21:28:02 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.5</generator>

	<item>
		<title>by: YT</title>
		<link>http://www.datastructures.info/the-monte-carlo-algorithmmethod/#comment-66</link>
		<pubDate>Fri, 06 Apr 2007 20:59:51 +0000</pubDate>
		<guid>http://www.datastructures.info/the-monte-carlo-algorithmmethod/#comment-66</guid>
					<description>Just a quick comment about efficiency in the code: There's no need to take the square root.  As long as r^2</description>
		<content:encoded><![CDATA[<p>Just a quick comment about efficiency in the code: There&#8217;s no need to take the square root.  As long as r^2
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Klaus</title>
		<link>http://www.datastructures.info/the-monte-carlo-algorithmmethod/#comment-53</link>
		<pubDate>Fri, 09 Mar 2007 09:09:28 +0000</pubDate>
		<guid>http://www.datastructures.info/the-monte-carlo-algorithmmethod/#comment-53</guid>
					<description>The precision depends at first on the number of samples and next on the precision of the calculation and the RNG (random number generator). This assumes that the RNG is really random enough, of course.

With 4000 samples, two decimal digits is what you can expect. Try 40.000 and 400.000 samples as see what happens.

As the result is a fraction with the number of samples as denominator, the result is quantized. In your case, the pi/4 intermediate result is quntized to 1/4000, and the pi result is quantized to 1/1000. In other words, it can only provide 3 digits above the noise level.

It may also be noteworthy that the approach can also be tried with a uniform non-random distribution of samples. For example, one can use two nested loops from 0.0 to 1.0 with an increament of 0.01 to generate 10.201 samples (not 10.000, because it's 101 steps from 0 to 1 here). This approach may be of use when no sufficienty good RNG is available.</description>
		<content:encoded><![CDATA[<p>The precision depends at first on the number of samples and next on the precision of the calculation and the RNG (random number generator). This assumes that the RNG is really random enough, of course.</p>
<p>With 4000 samples, two decimal digits is what you can expect. Try 40.000 and 400.000 samples as see what happens.</p>
<p>As the result is a fraction with the number of samples as denominator, the result is quantized. In your case, the pi/4 intermediate result is quntized to 1/4000, and the pi result is quantized to 1/1000. In other words, it can only provide 3 digits above the noise level.</p>
<p>It may also be noteworthy that the approach can also be tried with a uniform non-random distribution of samples. For example, one can use two nested loops from 0.0 to 1.0 with an increament of 0.01 to generate 10.201 samples (not 10.000, because it&#8217;s 101 steps from 0 to 1 here). This approach may be of use when no sufficienty good RNG is available.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Simon</title>
		<link>http://www.datastructures.info/the-monte-carlo-algorithmmethod/#comment-32</link>
		<pubDate>Thu, 08 Feb 2007 16:11:37 +0000</pubDate>
		<guid>http://www.datastructures.info/the-monte-carlo-algorithmmethod/#comment-32</guid>
					<description>The real pb is to succeed in doing some random function cause in bigger problems than solving pi, finding a suitable random code is hard. 
What is the precision of the pi found ?
I'm doing it in matlab and in fortran with my own sequence to radomize numbers, and i cant' find nearer than 3.14XXXX then the others (X) are false.
NB: I do the MC with 4000 numbers.</description>
		<content:encoded><![CDATA[<p>The real pb is to succeed in doing some random function cause in bigger problems than solving pi, finding a suitable random code is hard.<br />
What is the precision of the pi found ?<br />
I&#8217;m doing it in matlab and in fortran with my own sequence to radomize numbers, and i cant&#8217; find nearer than 3.14XXXX then the others (X) are false.<br />
NB: I do the MC with 4000 numbers.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Elton Minetto</title>
		<link>http://www.datastructures.info/the-monte-carlo-algorithmmethod/#comment-6</link>
		<pubDate>Thu, 11 Jan 2007 10:57:43 +0000</pubDate>
		<guid>http://www.datastructures.info/the-monte-carlo-algorithmmethod/#comment-6</guid>
					<description>Hi, i implemented the Monte Carlo calculation of pi using Python, sockets and threads. It's in portuguese, but the code is universal
http://www.eltonminetto.net/metodo-de-monte-carlo-distribuido.htm</description>
		<content:encoded><![CDATA[<p>Hi, i implemented the Monte Carlo calculation of pi using Python, sockets and threads. It&#8217;s in portuguese, but the code is universal<br />
<a href="http://www.eltonminetto.net/metodo-de-monte-carlo-distribuido.htm" rel="nofollow">http://www.eltonminetto.net/metodo-de-monte-carlo-distribuido.htm</a>
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Mike</title>
		<link>http://www.datastructures.info/the-monte-carlo-algorithmmethod/#comment-5</link>
		<pubDate>Tue, 09 Jan 2007 21:03:12 +0000</pubDate>
		<guid>http://www.datastructures.info/the-monte-carlo-algorithmmethod/#comment-5</guid>
					<description>good job!</description>
		<content:encoded><![CDATA[<p>good job!
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
