ALittleBitofCalculus

Theorem

MATH on $(0,\infty ).$

Proof

:

Since MATH

MATH for $x\preceq 1$

and

MATH for $x\succeq 1$

Proof
Proof
Proof
Proof

Hence

MATH

or

MATH


graphics/littlecalc__10.png

Theorem

For MATH, let MATH and MATH

- MATH

Proof

:

MATH

Hence

MATH

or

MATH

or

- MATH

Hence the result follows from the fact that MATHand $\log _{e}(2)>0.$

Application:

Definition

A binary cipher is said to be an instantaneous code if no ciphertext is a prefix of any other.

Here is an example of an instantaneous code

MATH

Here is an example of code that is not instantaneous.

MATH

It turns out that this second code is uniquely decipherable and the result we are about to consider holds for this class as well.

Lemma

Let (MATH) be an instantaneous code, where MATH and MATH. Let MATH then

MATH

Proof

$\vspace{1pt}$

The proof can be visualized by looking at a tree diagram of the code


treecode.gif

On can quickly prove that an instantaneous code has the property that all of its plaintext elements occur on the leafs of its tree. The proof is a simple induction on the depth of the tree.

Theorem

: Let (MATH) be an instantaneous code, where MATH and MATH. Let MATH. Finally let $p_{i}$ be the probability that the plaintext $a_{i}$ occurs in a message. Then

MATH

- MATH

Proof

:

Choose $k$ such that

MATH. By the previous lemma we know that $k\geq 1$. Setting MATH we have

$\vspace{1pt}$

MATH- MATH

MATH

MATH

MATH since $\log _{2}(k)\geq 0$