The Big O notation asserts an eventual uniform bound on the size of by a constant multiple of the size of :The constants may depend on the two functions but cannot depend on . Absolute values matter because the stated functions can be real-valued with either sign.
The logarithm identity rewrites the expression as . Since , we have , and for ,Thus the Big O notation bound holds with :
The logarithm laws giveFor , both and . The expression is therefore at most . ConsequentlyThe Big O notation concerns eventual behaviour; the zero value of at is irrelevant.
Divide by the proposed comparison function :The ratio is unbounded, so no constant in the definition of Big O notation can work:
The exponential function eventually grows faster than the fixed polynomial. A direct justification uses the ratio :For all sufficiently large , this ratio exceeds , so grows without bound. The proposed Big O notation bound is therefore impossible:
Treat as fixed positive integers. For , . Raising this inequality to the positive power givesThe factor is independent of , as required by Big O notation. HenceA bound uniform over varying is not what the notation here asserts.
By Big O notation, there are and thresholds after which and . Choose a common threshold and set . The positivity assumption givesSquaring preserves this inequality, so
First consider powers of four, with a fixed finite base value. For a mathematical induction hypothesis , the recurrence relation givesprovided and also covers the base value.
The allowed integer rounding needs a little more care. Suppose the recurrence relation is applied above fixed base cases, as usual; applying with a ceiling would not define a positive sequence. For either rounding write or . For ,Choose large enough to bound all finitely many positive-index base values below . By strong induction,This argument starts at , so the floor convention's index zero, if used in an earlier base calculation, is absorbed into those fixed initial values. Thus, for either convention with a well-defined finite base,
In modular arithmetic, calculations may be performed after replacing each input by its remainder. For a positive modulus , write for the remainder in . ThenEquivalently, if and , addition and multiplication give and , and a fixed nonnegative integer exponent gives . One cannot in general reduce the exponent modulo by this rule.
Repeated squaring computes by successively squaring. The binary representation of the exponent specifies which of these values to multiply. For modular exponentiation, reduce after every multiplication; only a number of steps proportional to the logarithm of the exponent is needed.
Articles by others on the same topic
There are currently no matching articles.