COMPUTING SCIENCE
Rumours and Errours
Brian Hayes
The Rumor Mill
I was curious to see the rumor models in action, and so I wrote a
little program. I set up a population of 1,000 individuals, each of
whom could be an ignorant, a spreader or a stifler. Initially there
was just one spreader and all the rest were ignorants. At the heart
of the program was the following procedure, meant to implement the
Daley-Kendall model (the one in which pairs of spreaders annihilate
each other):
repeat
choose X at random from
among the spreaders in the population;
choose Y at random from
the entire population;
if Y is an
ignorant
then make Y a spreader
else if Y is a
spreader
then make both X and Y stiflers
else if Y is a
stifler
then make X a stifler
until there are no more spreaders
When all the spreaders are gone, nothing more can change, so the
program ends and reports the fraction of the population still
oblivious of the rumor. This fraction, designated θ,
should be 0.203188. But the result from my program, averaged over a
few thousand runs, was 0.28 or 0.29—a considerable discrepancy.
At this point, let me pause to say that my big boo-boo had already
been committed. Before reading on, you might want to try debugging
my algorithm, or even write a program of your own.
» Post Comment