Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Llog log 10 Tlormulat dog ) log log n)) time where n)) time where fis a polynomi

ID: 3666438 • Letter: L

Question

Llog log 10 Tlormulat dog ) log log n)) time where n)) time where fis a polynomial. (This means the time it takes te this n st a constant times the num digits.) into the following algorithm which they proved woald nin in » . Other bookne is a polynomial. (This meansthe time it takes to run the algorithm is at ved would run in ber of digits to the twelfth power times a polynomial evaluated at the log of the mumber Input: Integer n> 1 if (n is has the form ab with b s 1) then output COMPOSITE while (r 4sqrt(r)log n) and n1)7 is not 1 (mod r) then break r := r+1 1 to 2sqrt(r)log n t if (x-a)r is not (-a (mod-1,n) ) then outpu for a t CoMPosITE output PRIME; ard, and perhaps the most advanced result necessary is a siere result ( 98g,BH10061) (Note that the first step. detentin ng he proof [AKS20021 is relatively straightforward, and pethaps the most advanced result necessary is a seve resnuit equired to show the necessary g exists for each composite f the number is a perfect power can be done in essentiaily linear tine [Benstem1998b) nrthed Bur of course when actually finding primes it is the unlisted coustantsl that nake all of the dilfereace fficreut umplementatious of tlhis algorntho and hopetully cleter restateueuts of the pantil AKS also showed that if Sophie Germampumes have the expected distribution H33] aad they certamly shouild ifhr integers of a fene thousand digits, Estil then ar least we bate heth is dletermuisac aud reles on no pro hen the exponent 12 in the time estimate can be reduced to o brmging it much closer to the (probabilesto Fop?

Explanation / Answer

Output

This program takes a positive integer from user and stores it in variable n. Then, for loop is executed which checks whether the number entered by user is perfectly divisible by i or not starting with initial value of i equals to 2 and increasing the value of i in each iteration. If the number entered by user is perfectly divisible by i then, flag is set to 1 and that number will not be a prime number but, if the number is not perfectly divisible by i until test condition i<=n/2 is true means, it is only divisible by 1 and that number itself and that number is a prime number.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote