Lecture5

# Lecture5 - ECE15 Introduction to Computer Programming Using...

This preview shows pages 1–5. Sign up to view the full content.

ECE15: Introduction to Computer Programming Using the C Language Lecture Unit 5: Two Fundamental Algorithms

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

View Full Document
Euclidean Algorithm for Computing the Greatest Common Divisor Lecture Unit 5 ECE15: Introduction to Computer Programming Using the C Language 2 Outline of This Lecture Newton-Raphson Algorithm for Computing Zeros of Functions
Definition: Given positive integers m and n , their greatest common divisor gcd( m,n ) is the largest positive integer that divides (without remainder) both m and n . Fundamental Theorem of Arithmetic: Every positive integer has unique prime factorization , it can be always written in one and only one way as a product of primes. Greatest Common Divisor gcd( m,n ) Lecture Unit 5 ECE15: Introduction to Computer Programming Using the C Language 3 Compute the prime factorization of both m and n . Then gcd( m,n ) is the product of all the common prime factors. High-school method for computing the GCD: Example : m = 700 n = 270 n = 2 * 3 3 * 5 m = 2 2 * 5 2 * 7 gcd (700, 270) = 2 * 5 = 10

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

View Full Document
What's Wrong with Prime Factorization? Lecture Unit 5 ECE15: Introduction to Computer Programming Using the C Language 4 Computing gcd( m,n ) via the prime factorization of m and n works well if both m and n are reasonably small. However, what is the prime factorization of the following number: n 1350664108659952233496032162788059699388814756056670 27524485143851526510604859533833940287150571909441 798207282164471551373680419703964191743046496589274 2562393410208643832021103729587257623585096431105640 7350150818751067659462920556368552947521350085287941 6377328533906109750544334999811150056977236890927563 Nobody knows! This number has 309 decimal digits ( 1024 bits), and the computational hardness of factoring such numbers is the basis for modern cryptosystems that underly e-commerce, national security, etc. The number above is known as RSA-1024 , and up until the year 2007 RSA Laboratories Inc. offered a prize of \$100,000 for its factorization.
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 04/15/2010 for the course ECE ECE15 taught by Professor Vardy during the Fall '08 term at UCSD.

### Page1 / 17

Lecture5 - ECE15 Introduction to Computer Programming Using...

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

View Full Document
Ask a homework question - tutors are online