We conclude study of weighted union algorithm considering a case study of developing a program to solve an interesting scientific problem. as Monte Carlo simulation to study a natural model known as percolation.
The problem can be found on this page: http://introcs.cs.princeton.edu/java/24percolation/
To perform my code, you should include stdlib.jar(http://algs4.cs.princeton.edu/code/stdlib.jar) and algs4.jar(http://algs4.cs.princeton.edu/code/algs4.jar) in your java project, the former contains libraries for reading data from standard input, writing data to standard output, drawing results to standard draw, generating random numbers, computing statistics, and timing programs; the latter contains all of the algorithms introduced in [Algorithms,4th Edition by Robert Sedgewick and Kevin Wayne].