Skip to content

Latest commit

 

History

History
24 lines (15 loc) · 847 Bytes

README.md

File metadata and controls

24 lines (15 loc) · 847 Bytes

Project

This program is written to estimate the value of the percolation threshold via Monte Carlo simulation. (Specification)

Percolation.java

This class models percolation system.

PercolationStats.java

This class estimates the value of the percolation threshold.

How to run program

First of all you should install algs4.jar library into your project.

Thereafter you can get the 95% confidence interval for the percolation threshold by running program these ways:

java PercolationStats 200 100
java PercolationStats 2 10000
java PercolationStats 2 100000

PercolationStats main method takes two arguments: n and T, performs T independent computational experiments on an n-by-n grid.