O'Reilly logo

Data Structures and Algorithms in Python by Michael H. Goldwasser, Roberto Tamassia, Michael T. Goodrich

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix B

Useful Mathematical Facts

In this appendix we give several useful mathematical facts. We begin with some combinatorial definitions and facts.

Logarithms and Exponents

The logarithm function is defined as

images

The following identities hold for logarithms and exponents:

  1. logb ac = logba + logbc
  2. logb a/c = logba − logbc
  3. logb ac = clogba
  4. logb a = (logca)/logcb
  5. blogc a = alogcb
  6. (ba)c = bac
  7. ba bc = ba+c
  8. ba /bc = ba−c

In addition, we have the following:

Proposition B.1: If a > 0, b > 0, and c > a + b, then

loga + logb < 2logc − 2.

Justification: It is enough to show that ab < c2/4. We can write

images

The natural logarithm function lnx = loge x, where e = 2.71828. . ., is the value of the following progression:

images

In addition,

images

There are a number of useful inequalities relating to these functions (which derive from these definitions).

Proposition B.2: If x > −1,

images

Proposition B.3: For 0 ≤ x < 1,

Proposition B.4: For any two positive real numbers x and n,

Integer Functions and Relations

The “floor” ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required