Skip to content

A monte-carlo simulation to represent a scientific phenomenon known as percolation.

Notifications You must be signed in to change notification settings

msexton1519/Percolation.java-PercolationStats.java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Background

Percolation requires algs4.jar from Princeton University to run properly due to the use of its QuickUnion data structure. Also, Princeton University's PercolationViewer class to view the results. The implementation of the Percolation class and PercolationStats classes are my own and make use of the Union data structure in order to solve this particular dynamic connectivity problem.

Percolation

The Percolation class keeps track of a grid and how each site is connected. If the top row connects to the bottom row in some way, the grid is said to percolate. For example, when using the viewer: Alt Text

Peroclation Stats

This class is run with two command line arguments where the first argument is the length of the grid to be constructed, size = length * length, and the second argument is the number of trials run with a grid size of length * length. A confidence interval is constructred where the percolation value lies within the low end and high end with 95% accuracy. Note: there is no definitive percolation value for any grid, thus, the value must be estimated.

Author

Matt Sexton

About

A monte-carlo simulation to represent a scientific phenomenon known as percolation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages