Chronology | Current Month | Current Thread | Current Date |
[Year List] [Month List (current year)] | [Date Index] [Thread Index] | [Thread Prev] [Thread Next] | [Date Prev] [Date Next] |
If the decay rate of 16.66% per round is too fast, you
can lower it by various means. You can lower by a
factor of 4 by saying that they only decay if they land
black-spot-up _and_ pointing toward the north side
of the room.
Program Simulation ! In True Basic computer language
randomize ! to avoid exact reproducibilities
let lambda=1/6 ! probability of "decay" per throw
let t=0 ! initialize counter of throws (timer)
let N=10000 ! initialize number of atoms (pencils)
print"At t=0 the number of radiactive atoms was: ";N
for i=1 to 20 ! perform 20 throws
let decays=0 ! initialize counter of decays
for k=1 to N ! for every pencil in a throw
let try=rnd ! a random number (between 0 and 1)
if try<lambda then let decays=decays+1
next k
let N=N-decays ! remaining number of pencils (atoms)
print "after t=";i;" only ";N; "atoms remained."
next i ! ready for the next throw
end
! ********************************************