3 ms·
You're right, as a method for computing pi it's silly and inefficient. As a way of demonstrating the utility of Monte Carlo algorithms in general, though, it's
by afafsd 12y ago
You're right, as a method for computing pi it's silly and inefficient.
As a way of demonstrating the utility of Monte Carlo algorithms in general, though, it's a neat and easily visualisable example, which is why it's used so often in elementary introductions of the concept.
Actual examples of how Monte Carlo algorithms can be useful involve the sampling of many-dimensional spaces via algorithms which sample points you're interested in more often than points you're not interested in -- check out the Metropolis-Hastings algorithm for an example of useful Monte Carlo in action.
- wfunction 12y agoSee my comment here. https://news.ycombinator.com/item?id=8159270 https://news.ycombinator.com/item?id=8159270