# lec23 - Introduction to Algorithms 6.006 Lecture 23 Jelani...

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

Introduction to Algorithms 6.006 Lecture 23 Jelani Nelson

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

View Full Document
Introduction to Algorithms 5/5/11 2 Menu “Numerics” - algorithms for operations on large numbers – Cryptography, simulations, etc Operations – Addition – Multiplication – Division – Matrix multiplication 3.14159265358979323846264338327950288419 7169399375105820974944592307816406286208 9986280348253421170679821480865132823066 4709384460955058223172535940812848111745 0284102701938521105559644622948954930381 9644288109756659334461284756482337867831 6527120190914564856692346034861045432664 8213393607260249141273724587006…
Introduction to Algorithms 5/5/11 3 Division a/b Inversion: – Given positive n -digit number b (radix r ) – Compute 1/b I.e., for some R=r k , compute Σ R/b Φ Iterative algorithm: – Start from some x 0 – Keep computing x i+1 from x i – Show this converges to the answer

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

View Full Document
Introduction to Algorithms 5/5/11 4 Newton’s method Iterative approach to solving f(x)=0 – In our case f(x)=1/x-b/R Iterative step: – Find a line y= f(x i )+f’(x i )(x- x i ) tangent to f(x) at x i – Set x i+1 to the solution of f(x i )+f’(x i )(x- x i ) =0 I.e., x i+1 =x i -f(x i )/f’(x i ) -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5 0.6 x i x i+1 f
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 16

lec23 - Introduction to Algorithms 6.006 Lecture 23 Jelani...

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

View Full Document
Ask a homework question - tutors are online