Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Respected Mathematicians, Suppose we are given 10 remainders each of 10 digits for given ten distinct prime bases each of 10 digits. Find the rational number that corresponds to these remainders in the specified prime bases using Matlab. Observe that the rational number could consist more than 40 digits in numerator as well as those in denominator. Standard precision of Matlab does not allow more than 16 digits. But vpa (variable precision arithmetic) in Matlab will allow much more than 16 digits.

Consider, for example, the remainders 1, 1, 2 corresponding to the prime bases 3, 5, 7, respectively. What will be the rational number? The answer is 16. I would like to know the generalization of this part, especially about the rationals.

Thanking you all.

share|improve this question
    
I think I have not made my point clear. I have no problem with Chinese Remainder Theorem (CRT). We have used this in many of our problems on error-free computations, had written programs in Pascal/Matlab for solving small problems. But now I am interested in Matlab (and not the obsolete Pascal) for solving large problems error-free. –  BMSA Jul 30 '12 at 4:27
    
The problem is with high (larger than standard) precision computation in Matlab. So Matlab and possibly the vpa command in Matlab for variable precision computations need to be used for implementing CRT. We want to implement multiple residue arithmetic to solve large linear optimization problems error-free. For this, everything can be done very easily in Matlab standard precision except the implementation of CRT. –  BMSA Jul 30 '12 at 4:27
    
The main issue is how to implement CRT for solving error-free (reasonably) large real-world problems and not CRT/algorithm/mathematics for small problems. Please discuss more precisely. –  BMSA Jul 30 '12 at 4:28

1 Answer 1

You need to look at the Chinese remainder theorem. Nice tutorials exists via Google search.

Edit: here is a Youtube lesson and some more resources here and here.

share|improve this answer
    
! I visited the site which you cited above. That work in matlab is little confusing me. Can you explain my question by using matlab by taking 10 remainders each of 10 digits for given ten distinct prime bases each of 10 digits. Also, keep in mind that, Observe that the rational number could consist more than 40 digits in numerator as well as those in denominator. Thank you so much for your answer. –  BMSA Jul 25 '12 at 8:16
    
! see that first paragraph of my question and put in matlab and then discuss the observations or generalizations, which you want to make. Once again thank you so much. –  BMSA Jul 25 '12 at 8:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.