2

This is the problem that I'm having trouble on:

Let $a$ and $b$ be natural numbers with $1000000>a>b$. What bound does Theorem 4.2.3 give for the number of steps the Euclidean Algorithm will take when performed on $a$ and $b$?

Theorem 4.2.3 states "for any pair of natural numbers $a$ and $b$, the Euclidean Algorithm takes at most $\log_2(ab)$ steps to find $\gcd (a,b)$.

Would it be $\log_2(10^6\cdot10^6)=\log_2(12)$?

ematth7
  • 719

1 Answers1

0

Technically the answer is $log_2((10^6-1)(10^6-2))$ (due to the strict inequalities) but you get the same result. Calculating it out should give you

$$39 < log_2((10^6-1)(10^6-2)) <40.$$

The largest integer value would then be 39.

Luke
  • 395
  • When I calculated $log_2((10^6-1)(10^6-2))$ I got ~ 3.32 and not 39. – ematth7 Oct 06 '15 at 23:41
  • $8<2^{3.32}< 16<<(10^6-1)(10^6-2)$. If you are trying to convert to base $10$ make sure you use $log_{2}(x)=\frac{log_{10}(x)}{log_{10}(2)}$ – Luke Oct 07 '15 at 00:03
  • @ematth7, I believe you multiplied by $log_{10}(2)$ when you should have divided. That would give you the answer you got. – Luke Oct 07 '15 at 04:18