Milikan's Experiment Lab - Euclidean Algorithm

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 2K views
Morass
Messages
7
Reaction score
0

Homework Statement



Hey guys I need help with a lab I'm doing that is similar to the Milikan's experiment. I am given 10 bags each holding the same item (Jellybean) of various quantities. Each bag has a different mass. What I'm trying to figure out is the mass of the individual item, so mass of 1 jellybean. This is similar to finding the elementary charges for milikan's experiment.

Homework Equations


I believe using the euclidean algorithm is the best method because all the bags should be a integer multiple of the mass of 1 jellybean.


The Attempt at a Solution


First i subtracted the mass of the bags from the mass of bag + jellybeans, to find the mass of the jellybeans only. Then i ordered the various masses in increasing order. Now my problem is, in doing Euclidean Algorithm to find GCD, since these numbers are real numbers, how do I know when to stop using the algorithm. I've made a Java program that does the algorithm recursively but I'm not sure when to stop because this algorithm can go on forever. Thanks in advance.
 
Physics news on Phys.org
Do integer division with the smallest mass (m1) (result is Ni for the i-th mass) and replace all masses by the remainder mi-Ni*m1.Choose the smallest again and repeat till you get zero remainder for all but one. The last smallest mass still can include a few beans, but that is the best you can do.

As an example: assume that here are 5 bags of mass 33, 16.83, 15.84, 5.94, 2.31. The smallest is 2.31, integer division gives 14, 7, 6, 2, and the remainders are 0.66, 0.66, 1.98, 1.32, Choose these values for mi and add also 2.31. The smallest is 0.66. Repeat the procedure, the remainders are 0, 0, 0, 0, 0.33. You have one non-zero remainder, that is the mass of one bean (or integer multiple of it).

ehild