Introduction to Algorithms
Introduction to Algorithms
3rd Edition
ISBN: 9780262033848
Author: Thomas H. Cormen, Ronald L. Rivest, Charles E. Leiserson, Clifford Stein
Publisher: MIT Press
Question
Book Icon
Chapter 30, Problem 6P

a.

Program Plan Intro

To provide a simple heuristic argument for expecting k to be approximately , in case one search for the smallest k such that p=kn+1 . Also explain in what way the expected length of p compare to the length of n .

b.

Program Plan Intro

To show that discrete Fourier Transform and inverse Fourier transform are inverse operation.

c.

Program Plan Intro

To show how to make the FFT and its inverse work modulo p in time O(nlogn) .

d.

Program Plan Intro

To compute the DFT modulo p = 17 of the vector (0, 5, 3, 7, 7, 2, 1, 6).

Blurred answer
Students have asked these similar questions
Implement the modular exponentiation (a.k.a. fast exponentiation) function mod_exp (b, n, m) to compute bn (mod m) more efficiently. (Hint: to read n bit-by-bit, use / and % operations repeatedly) a) Test your function for b = 3, n = 231 – 2, m = 231 – 1. b) Report the result and the time (in seconds) it takes to find the result. Q3. [30 pts] Modify your is_prime function to use the mod_exp (b, n, m) instead of the standard power operation (b**n % m). Rename it as is_prime2. Modify the mersenne (p) function to use is_prime2, and call it mersenne2. a) Use the modified function mersenne2 to print all the Mersenne primes Mp for p between 2 and 31 if possible, (with k = 3 in the is_prime function). Compare the results with the ones found in Q1. b) Gradually increase the range of p to find more Mersenne primes (say up to p = 101 if possible). What is the largest Mersenne prime you can achieve here? c) Extend the work in part (b) and find the maximum Mersenne prime you can get from this…
Given an integer say 45, to find the sum of 45 with 8 in binary form (see the figure below), we can use the TM designed in slides 79-90 of the notes "Turing Machines and Equivalent Models I" twice to find the result. A more effective way is to design a TM to do the addition with 8 directly. 1000 101101 A + = ? Such a TM can be designed by extending the TM designed in slides 79-90 of the notes "Turing Machines and Equivalent Models I". The TM has 14 instructions and 6 states: 0, 1, 2, 3, 4, and halt. Six instructions of such a TM have been given in the first and the second tables below. Fill out the remaining blanks in the first and the second tables and also blanks in the third table to show the remaining instructions of the TM (you have to use your own text boxes here)
Implement the following error detection and error correction algorithms using C programming for Hamming code. For Hamming codes, flip a bit in the data and implement the algorithm to correct the same on the receiver side.
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education