COSC 2010 / 2100 Data Structures

Fall 2018

Homework Assignment #5: The Percolation Variations

Due: Wednesday, October 3rd, 11:59PM CST
Submit: Turn in all of your Java source files using the turnin command on Morbius, "turnin all.java my.java files.java ...", listing instead the names of each Java source file. You must include a class called PercRunner that contains the main program for this assignment.
Work may be completed in teams of two. The names of both partners must appear in a comment block at the top of your files for credit to be given.

Background

This project continues the percolation simulation built in the previous project. We expand upon this work in two significant ways. First, we add two new types of percolation flow to the simulation. Second, we will run many concurrent simulations in order to find the probability tipping point at which a given grid size is more likely to be saturated by the fluid than not.

PercRunner

The top-level class for this project is called PercRunner. PercRunner should take five items on a single line of input:

The output of your program will consist of two lines:
Percolation tipping point p = p
Elapsed Time = t
where p is a double value probability, like 0.451, and t is a time in seconds, like 0.004.

Fluid Types

The first fluid type is highly viscous, and percolates only vertically, not horizontally. Thus, flow from top to bottom will occur only when a complete column is unblocked.

The second fluid type will percolate horizontally and vertically, as in the previous project

The third fluid type flows more easily through crevices, and thus percolates horizontally, vertically, and also diagonally in all four directions.

Notes


Back
[Revised 2018 Sep 28 10:39 DWB]