CS 355/555, Spring 2020, Program I 1 – There is an ideal, cubic lake consisting of small cells,… 1 answer below »

CS 355/555, Spring 2020, Program I 1

There is an ideal, cubic lake consisting of small cells, 100 × 100 × 100, so 1,000,000

cells in all. “Ideal” means that there are a lot of real world issues to ignore:

• The edges of the lake are flat and the angles are all right angles.

• There is no impact of the sun on algae growth.

• You should ignore what the algae consume to grow.

• Temperature should be regarded as constant.

You should ignore any factor not included in the program statement.

Write a program to simulate the growth of algae in the pond, running iterations

and changing the algae in each cell using the following rules:

• Problem statement:

– Each cell starts with two algae

– For each alga in a cell with three or fewer algae, in each iteration take the

following actions:

Die Probability .1

With probability .1 the alga dies.

Reproduce Probability .3

With probability .3 the alga reproduces. Note that algae are one celled

creatures that reproduce by division, so no partner is necessary. Ignore

any evolutionary considerations.

Survive .6

With probability .6 the alga survives with no change.

– For each alga in a cell with four algae:

Die Probability .3

With probability .3 the algae dies, higher than smaller population cells,

due to overcrowding.

Attachments:

You don't know how to answer this question. We can help you find the right answer.

We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount! Use Discount Code "save15" for a 15% Discount!

Get Started

No need to wonder who can do my homework. You can always reach our team of professionals to do your homework at a low price.