For functions , big O notation means
Using the natural logarithm and exponential function, . Since , for every we have . The witnesses therefore prove
For , implies , and also . Consequently
The definition of big O notation holds with :
Suppose the definition of big O notation held with constants . Choose an odd integer . At this input, and , so the required inequality would be , a contradiction. Thus
The infinitely many even inputs, where , cannot repair the failure on odd inputs because the bound must hold for every sufficiently large input.
A direct mathematical induction proves . The base cases and hold. If the bound holds at and , then the Fibonacci recurrence gives
Thus the definition of big O notation holds with , proving
By divisibility, write and for positive integers . Then
The factor is an integer, so
The Euclidean division gives with and . Writing gives
Since is an integer, this proves the divisibility
including .
The greatest common divisor is the largest positive integer dividing both inputs:
This maximum exists because belongs to the set and all its elements are at most .
Write using the Euclidean division. If and , then . Conversely, if and , then . Therefore and have exactly the same positive common divisors, proving
For , this agrees with .
Set . At each iteration with , compute the remainder , then set
Stop at the first index with and return . The positive second coordinates strictly decrease, so algorithm termination follows from the well-ordering principle. The equality of greatest common divisors established in (ii) is a loop invariant, and at termination it gives
Consider one iteration with and . If , then . If , the quotient is , so . In either case , whence
Repeated application, or mathematical induction, proves
This also holds for the final iteration, whose left side is zero. For zero iterations the correct relation is equality , rather than a strict inequality.
Count the final division producing zero as an iteration, and let the total be . The terminal product alone gives no useful bound. Instead apply (i) to each nonterminal product, which is a positive integer and hence at least .
If , the penultimate product satisfies
As is an integer, this implies
For , the same bound holds since implies . In particular the Euclidean algorithm uses divisions, in big O notation. The convention that includes the final zero-producing division explains the one-step offset in the argument.
The second coordinate after two iterations satisfies
whenever those two divisions are needed, by the same remainder bound, now applied to . Let . If the Euclidean algorithm has not already stopped after iterations, then its positive second coordinate is at most : for ,
For the original is already . A second coordinate of requires just one more division. Consequently
This removes dependence on the potentially much larger input . It improves the scale to one involving only the smaller input; the rounded numerical bound need not be smaller for every pair. One may always take the minimum of the bounds in (ii) and (iii).

Articles by others on the same topic (0)

There are currently no matching articles.