I. 280. In exercise I. 271. a statistical model was proposed for percolation -- a phenomenon when a liquid passes through a solid but porous substance. The simulation was run on a grid of n×n squares (1n50), representing a vertical cross section of the solid material. The liquid can pass through each cell with probability p (0.00p1.00), say, through a microscopic crack, and can not pass with probability 1-p. Now we extend our model with the assumption that the liquid can percolate in an arbitrary direction -- also vertically -- due to pressure. In the figure we see a percolation path through which liquid can pass.
The material in the figure allows percolation. There are 8 possible directions for the flow toward neighboring cells. By gradually increasing the probability p from 0, your program should determine the first state in which the liquid can percolate from top to bottom. The side length n of the grid can be an arbitrary value satisfying the constraints. The value of p should be increased in steps 0.05 until we find the desired state with complete percolation. For each p, it is sufficient to create a table. This state can be visualized in an arbitrary way, but cells allowing and not allowing percolation and the percolation path should be clearly visible.
The source code of your program (i280.pas, i280.cpp, ...), a brief documentation of your solution (i280.txt, i280.pdf, ...) and the name of the developer environment to use for compiling the source file should be submitted in a compressed file i280.zip.
Deadline expired on 10 January 2012.
Google Translation (Sorry, the solution is published in Hungarian only.)
Mintamegoldásként Barkaszi Richárd Miklós 12. osztályos (Nyíregyháza, Széchenyi István Közgazdasági Szakközépiskola) tanuló munkáját közöljük: i280.pas
Kucsma Levente István 9. osztályos (Eger, Dobó István Gimnázium) megoldásának egy érdekes eredménye: