01.01.2015 Views

Modular Arithmetic and Primality

Modular Arithmetic and Primality

Modular Arithmetic and Primality

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

⎧⎧ 2(x⋅ ⎣⎣y/2⎦⎦) if y is even<br />

x⋅ y = ⎨⎨<br />

⎩⎩ x + 2(x⋅ ⎣⎣y/2⎦⎦) if y is odd<br />

€<br />

Obvious equality, yet it gives us a divide <strong>and</strong> conquer<br />

opportunity since we halve the size at each step<br />

Prep us for <strong>Modular</strong> exponentiation which uses the same<br />

basic approach

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!