atest - (b Write a new version of ATEST called ATEST2 that...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
The Miller-Rabin a-Test for Primality EXERCISE (10 + 5 + 5 + 5 = 25 bonus points) (a) Write a maple procedure to implement the a-Test. Call your function ATEST ATEST(a,N) should return "N fails a-test and so is composite" OR "N passes the a-test". Assume N is odd and a < N, otherwise return an ERROR message. > ATEST:=proc(a,N) > > > > > > > > > > > > > > > > > > > > > > > > > > > Test your function > ATEST(2,2041); > ifactor(2041); > isprime(2041); Verify that 2047 is composite but it passes the 2-Test
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: (b) Write a new version of ATEST called ATEST2 that returns "true" or "false" depending on whether N passes or fails the a-Test. Use this function to find the smallest composite number that passes the 3-Test. Include all MAPLE code and output. > (c) Find the smallest composite number that passes the 5-Test. Include all MAPLE code and output. > (d) Find the smallest composite number that passes both the 2-Test and the 3-Test. >...
View Full Document

{[ snackBarMessage ]}

Page1 / 2

atest - (b Write a new version of ATEST called ATEST2 that...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online