note
sk
Here is my shot at a pseudo-code <p>
1. Pick the first element of array a <p>
2. Calcuate the GCD(a[0],b[0]) or better yet <strike>a[0] = mod (a[0], gcd(a[0],b[0]) and b[0] =mod (a[0], gcd(b[0],b[0])</strike> (just divide elements by gcd, it should be an integer) <p>
3. If anything is 1 pop it out of the list<p>
4. Go through the list of elements for b with a[0] again. Do this until all elements are scanned in b.<p>
5. Take the second element in a and repeat the process.<p>
Does this work?<p>
I shall post the code if i get a chance to implement it<p>
-SK <p>
PS: This reminds of division in high school days ;)
481987
482012