Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need to implement the percolation algorithm Project 1, Percolation Description Percolation is a scientific model thats used to analyze the connectivity of systems. For

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

I need to implement the percolation algorithm

Project 1, Percolation Description Percolation is a scientific model thats used to analyze the connectivity of systems. For example, it can be used to analyze if u porous landscape with water on the surface will eventually allow the wuter to drain through to the bottom. It can be us to analyze if oil would be able to reach the sur acc n a similar manner. The idea of the mo cl is o anal ze what conditions arc necessary or the system to per o ate ' e let the water or oil throu h of 3 states: blocked (black), open (white) or full The current assignment will allow students to apply the union-find data structure to solve this problem. The system will be represented as a Vby-V grid where cach cel can be in on (blue). A grid where percolation has been achieved will have a path of full cells livm the surface toe butou percolates does not percolate blocked site ful emmpty site open site connected to top no open site connected to top As can be observed in the cxamples, the flow of the matcrial gocs from top to bottom and cach ce routs that flow through the top, lcft, right and bottom ncighbors. A system whcre at least oue bottom-row ccll is full (thanks to thc flow route) is said to percolate Tasks e current project w e divided nto 3 pru raunining tus s and an analysLs phase 1 t wil require cou e sunulation experum en a evaluation and discussion o the results t is expectedat students will use the all ar rary provided by the authors of the course textbook, along with the suggested implementations for union-find data structures in Algorith 1.5 (Chapter I). The standard library JAR file can be dircctly seccssed here and basic instructions on how to execure programs using it a here Percolation API Develop alava class called Percolation that complies with the following interface: public Percolatian int n: Create a new n hy n grid where all cells are inially blocked public vold open( int x 1nt y): Open he sile al cuor unte x.y), where x represents the horizon al axis and y the vertical one. For cuns! Ieny purposes. 0,0 will be he button-le cell of the grid and n-1 -l) will be on the top-right. The graphical capabilitics discussed later assumc a similar convcntion

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

How might one glacial till differ from another?

Answered: 1 week ago

Question

a donor to the university or school?

Answered: 1 week ago