The following lab can be replicated in person using 100 coins.
Theory
Radioactive decay is a spontaneous process which occurs in certain substances due to their nuclear instability. These substances produce radioactive emissions in the form of alpha particles, beta particles and gamma rays.
The half-life ($t_{\frac12}$) of a radioactive substance is the time taken for its mass, and by extension its activity, to drop to half of its initial value. Provided an initial mass, $m_i$ the mass remaining, $m_f$ after $n$ half-lives would have elapsed is given by: $$ \begin{equation}\begin{aligned} m_f=\frac{m_i}{2^n}\\ \end{aligned}\end{equation} $$
We can replicate this phenomenon using coins where each coin represents a particle of the radioactive substance. We expect that for every throw of the coins remaining, half of the coins will show heads (representing undecayed particles) and the other half will show tails (decayed).
Aim
To simulate radioactivity using a coin toss experiment
Materials/Apparatus
- Computer
Method
- Use a C compiler already installed on your device or an online compiler such as that at https://www.jdoodle.com/c-online-compiler/ to run the code below
/*
This program simulates a coin toss done with 100 coins
Coins are drawn after each throw and the numbers of heads and tails
are counted and displayed
The tossing function is repeated and the drawing function is called recursively until no heads remain
*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
void draw_coins();
void toss_coins();
char coins[100];
int throw_count;
//function to keep the program busy for a fraction of a second
void tiny_pause(){
int sum = 0;
for (int i=0;i<=100000000;i++){
sum+=i;
}
}
//function to set the initial conditions of the experiment: all heads and zero throws
void reset_coins(){
throw_count = 0;
for (int i=0;i<100;i++){
coins[i] = 'o';
}
system("cls");
}
//function to display coins and count the numbers of heads and tails
void draw_coins(){
int heads=0,tails=0;
printf("Checking coins after %d throws:\n",throw_count);
for (int i=0;i<100;i++){
printf("%c",coins[i]);
if (i%50==49){
printf("\n");
}
if (coins[i]=='o'){
heads+=1;
}
else{
tails+=1;
}
}
printf("Heads(o): %d, Tails(-): %d\n\n\n",heads,tails);
tiny_pause();
if (heads>0){
toss_coins();
draw_coins();
}
}
//function to randomly flip the heads which are present in the set of coins
void toss_coins(){
for (int i=0;i<100;i++){
if (coins[i]=='o'){
if (rand()%100<50){
coins[i] = '-';
}
}
}
throw_count+=1;
}
int main(){
//changing the colors of the terminal window
system("color f3");
start:
reset_coins();
//setting the seed of the random number generator to the current time so that results of the rand() function will always vary
srand(time(0));
draw_coins();
printf("Enter 1 to repeat the experiment...\n");
int key_press;
scanf("%d",&key_press);
if (key_press==1)
goto start;
return 0;
}
- Record the number of throws and the number of heads remaining after each throw
Results
Number of throws | Number of heads remaining |
---|---|
0 | |
1 | |
2 | |
3 | |
4 | |
… |
Data Analysis
- Plot a graph of the number of heads remaining versus the number of throws
- From the graph, interpolate at 50 heads, 25 heads and 12.5 heads to get the corresponding number of elapsed throws for each
- Find the 1st, 2nd and 3rd half-lives (measured in throws) from these elapsed throw numbers
- Find the average half-life (measured in throws)