Allow S to be the number of atoms along one edge of a cube of N total atoms. During X-ray diffraction, the scattering from each of those N atoms interacts with the scattering of every other atom. If a simulation of the diffraction from a cube with S = 10 takes 1 second to calculate, how long will a simulation a cube with S = 100 take to calculate?
Here, S is the no of atoms along an edge of the cube (or the side of the cube)
So, the number of atoms N is given by
N = S3
Each of the N atom interact with N-1 other atoms. This is similar to "no of handshakes in a room" problem
For N atoms, the no of such interactions is
NI = (N-1) + (N-2) + ... +1 = N(N-1)/2 (sum of counting numbers up to N-1)
Suppose that one such interaction takes a time x.
For NI interactions,
t = x*N(N-1)/2
Here, For S = 10 , t = 1 second
For S = 10, N = S*S*S = 1000
So, No of interactions
NI = 1000*999/2 = 499500
So, time taken for one interaction is
x = t/NI = 1/499500 seconds
We have to find time taken for S = 100
For S = 100, N = 1000000
So,
NI = 1000000*999999/2 = 499999500000
So, time taken = 499999500000 *x = 499999500000*1/499500 = 1001000 seconds.
Get Answers For Free
Most questions answered within 1 hours.