1.7. MODULAR ARITHMETIC371.6.13.(a)Write a program in your favorite programming language to com-pute the greatest common divisor of two nonzero integers, usingthe approach of repeated division with remainders. Get your pro-gram to explicitly give the greatest common divisor as an integerlinear combination of the given nonzero integers.(b)Another method of finding the greatest common divisor wouldbe to compute the prime factorizations of the two integers andthen to take the largest collection of prime factors common to thetwo factorizations. This method is often taught in school math-ematics.How do the two methods compare in computationalefficiency?1.6.14.(a)LetIDI.n1; n2; : : : ; nk/Dfm1n1Cm2n2C: : : mknkWm1; : : : ; mk2Zg:Show that ifx; y2I, thenxCy2Iandx2I. Show that ifx2Zanda2I, thenxa2I.(b)Show that g:c:d.n1; n2; : : : ; nk/is the smallest element ofI\N.1.6.15.(a)Develop an algorithm to compute g:c:d.n1; n2; : : : ; nk/.
This is the end of the preview.
access the rest of the document.
As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.
Temple University Fox School of Business ‘17, Course Hero Intern
I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.
University of Pennsylvania ‘17, Course Hero Intern
The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.