Question #1: Red/Blue Computation

  • The environment for this simulation is an n x n grid of colored cells (red and blue are occupied, white is unoccupied). The n x n grid is divided up into blocks of size t x t, which are worked on by individual threads.
  • Each round all red cells move to the right, blue cells move down (if possible, based on the constraints to come)
  • Each round is divided into two steps; all red cells move in one step, then all blue move in one step. Cells cannot move into occupied cells.
  • A cell can be vacated by red, then moved into by a blue in a single round.
  • Board is toroidal
  • Initial state is input (potentially random); stop if any t x t block is 90% one color.
  • Write a Peril-L program to take advantage of parallelism in the problem.

Note: The end condition is not represented in this animation, it just shows six rounds.

Question #2

The homework is due before class 4/24/07. E-mail a copy of your homework nkuchta at cs with the subject '524P HW2'. Please submit a copy in pdf, doc, or txt format.