• Revista PROGRAMAR: Já está disponível a edição #53 da revista programar. Faz já o download aqui!


Simulações em Matlab

2 posts in this topic

Tive problemas em resolver este exercício. Pois os resultados não estão coincidindo com os teóricos.

15.6 The aim of this exercise is to simulate bacteria growth.

Suppose that a certain type of bacteria divides or dies according to the

following assumptions:

(a) during a fixed time interval, called a generation, a single bacterium

divides into two identical replicas with probability p;

(b) if it does not divide during that interval, it dies;

(c) the offspring (called daughters) will divide or die during the next

generation, independently of the past history (there may well be no

offspring, in which case the colony becomes extinct).

Start with a single individual and write a script which simulates a number of

generations. Take p=0.75. The number of generations which you can

simulate will depend on your computer system. Carry out a large number (e.g.

100) of such simulations. The probability of ultimate extinction, p(E), may be

estimated as the proportion of simulations that end in extinction. You can also

estimate the mean size of the nth generation from a large number of

simulations. Compare your estimate with the theoretical mean

of (2p)n.

Statistical theory shows that the expected value of the extinction probability

p(E) is the smaller of 1, and (1−p)/p. So for p=0.75, p(E) is expected to be

1/3. But for p≤0.5, p(E) is expected to be 1, which means that extinction is

certain (a rather unexpected result). You can use your script to test this

theory by running it for different values of p, and estimating p(E) in

each case.

Podem me enviar o programa caso consigam para tassiust@hotmail.com


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now