informationtheory.ps

Upload: anonymous-tlgnqzv5d7

Post on 03-Jun-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/12/2019 Informationtheory.ps

    1/17

    I n f o r m a t i o n T h e o r y P r i m e r

    W i t h a n A p p e n d i x o n L o g a r i t h m s

    s o u r c e : f t p : / / f t p . n c i f c r f . g o v / p u b / d e l i l a / p r i m e r . p s

    T h o m a s D . S c h n e i d e r

    v e r s i o n = 2 . 3 2 o f p r i m e r . t e x 1 9 9 5 J u l y 2 7

    T h i s p r i m e r i s w r i t t e n f o r m o l e c u l a r b i o l o g i s t s w h o a r e u n f a m i l i a r w i t h

    i n f o r m a t i o n t h e o r y . I t s p u r p o s e i s t o i n t r o d u c e y o u t o t h e s e i d e a s s o t h a t y o u

    c a n u n d e r s t a n d h o w t o a p p l y t h e m t o b i n d i n g s i t e s 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ] .

    M o s t o f t h e m a t e r i a l i n t h i s p r i m e r c a n a l s o b e f o u n d i n i n t r o d u c t o r y t e x t s

    o n i n f o r m a t i o n t h e o r y . A l t h o u g h S h a n n o n ' s o r i g i n a l p a p e r o n t h e t h e o r y o f

    i n f o r m a t i o n 1 0 ] i s s o m e t i m e s d i c u l t t o r e a d , a t o t h e r p o i n t s i t i s s t r a i g h t

    f o r w a r d . S k i p t h e h a r d p a r t s , a n d y o u w i l l n d i t e n j o y a b l e . P i e r c e l a t e r

    p u b l i s h e d a p o p u l a r b o o k 1 1 ] w h i c h i s a g r e a t i n t r o d u c t i o n t o i n f o r m a t i o n

    t h e o r y . O t h e r i n t r o d u c t i o n s a r e l i s t e d i n r e f e r e n c e 1 ] . A w o r k b o o k t h a t y o u

    m a y n d u s e f u l i s r e f e r e n c e 1 2 ] . S h a n n o n ' s c o m p l e t e c o l l e c t e d w o r k s h a v e

    b e e n p u b l i s h e d 1 3 ] . I n f o r m a t i o n a b o u t o r d e r i n g t h i s b o o k i s g i v e n i n

    f t p : / / f t p . n c i f c r f . g o v / p u b / d e l i l a / b i o n e t . i n f o - t h e o r y . f a q

    O t h e r p a p e r s a n d d o c u m e n t a t i o n o n p r o g r a m s c a n b e f o u n d a t

    h t t p : / / w w w - l m m b . n c i f c r f . g o v / t o m s /

    N o t e : I f y o u h a v e t r o u b l e g e t t i n g t h r o u g h o n e o r m o r e s t e p s i n t h i s p r i m e r ,

    p l e a s e s e n d e m a i l t o m e d e s c r i b i n g t h e e x a c t p l a c e ( s ) t h a t y o u h a d t h e p r o b -

    l e m . I f i t i s a p p r o p r i a t e , I w i l l m o d i f y t h e t e x t t o s m o o t h t h e p a t h . M y

    t h a n k s g o t o t h e m a n y p e o p l e w h o s e s t u b b e d t o e s l e d t o t h i s v e r s i o n .

    N a t i o n a l C a n c e r I n s t i t u t e , F r e d e r i c k C a n c e r R e s e a r c h a n d D e v e l o p m e n t C e n t e r , L a b -

    o r a t o r y o f M a t h e m a t i c a l B i o l o g y , P . O . B o x B , F r e d e r i c k , M D 2 1 7 0 2 . e m a i l a d d r e s s :

    t o m s @ n c i f c r f . g o v . T h i s t e x t o r i g i n a t e d a s c h a p t e r I I o f m y P h D t h e s i s : \ T h e I n f o r m a t i o n

    C o n t e n t o f B i n d i n g S i t e s o n N u c l e o t i d e S e q u e n c e s " , U n i v e r s i t y o f C o l o r a d o , 1 9 8 4 . A s a

    U . S . g o v e r n m e n t w o r k , t h i s d o c u m e n t c a n n o t b e c o p y r i g h t e d .

    1

  • 8/12/2019 Informationtheory.ps

    2/17

    T o m S c h n e i d e r ' s I n f o r m a t i o n T h e o r y P r i m e r 2

    I n f o r m a t i o n a n d U n c e r t a i n t y

    I n f o r m a t i o n a n d u n c e r t a i n t y a r e t e c h n i c a l t e r m s t h a t d e s c r i b e a n y p r o c e s s

    t h a t s e l e c t s o n e o r m o r e o b j e c t s f r o m a s e t o f o b j e c t s . W e w o n ' t b e d e a l i n g

    w i t h t h e m e a n i n g o r i m p l i c a t i o n s o f t h e i n f o r m a t i o n s i n c e n o b o d y k n o w s

    h o w t o d o t h a t m a t h e m a t i c a l l y . S u p p o s e w e h a v e a d e v i c e t h a t c a n p r o d u c e

    3 s y m b o l s , A , B , o r C . A s w e w a i t f o r t h e n e x t s y m b o l , w e a r e u n c e r t a i n

    a s t o w h i c h s y m b o l i t w i l l p r o d u c e . O n c e a s y m b o l a p p e a r s a n d w e s e e

    i t , o u r u n c e r t a i n t y d e c r e a s e s , a n d w e r e m a r k t h a t w e h a v e r e c e i v e d s o m e

    i n f o r m a t i o n . T h a t i s , i n f o r m a t i o n i s a d e c r e a s e i n u n c e r t a i n t y . H o w s h o u l d

    u n c e r t a i n t y b e m e a s u r e d ? T h e s i m p l e s t w a y w o u l d b e t o s a y t h a t w e h a v e

    a n \ u n c e r t a i n t y o f 3 s y m b o l s " . T h i s w o u l d w o r k w e l l u n t i l w e b e g i n t o w a t c h

    a s e c o n d d e v i c e a t t h e s a m e t i m e , w h i c h , l e t u s i m a g i n e , p r o d u c e s s y m b o l s

    1 a n d 2 . T h e s e c o n d d e v i c e g i v e s u s a n \ u n c e r t a i n t y o f 2 s y m b o l s " . I f w e

    c o m b i n e t h e d e v i c e s i n t o o n e d e v i c e , t h e r e a r e s i x p o s s i b i l i t i e s , A 1 , A 2 , B 1 ,

    B 2 , C 1 , C 2 . T h i s d e v i c e h a s a n \ u n c e r t a i n t y o f 6 s y m b o l s " . T h i s i s n o t

    t h e w a y w e u s u a l l y t h i n k a b o u t i n f o r m a t i o n , f o r i f w e r e c e i v e t w o b o o k s , w e

    w o u l d p r e f e r t o s a y t h a t w e r e c e i v e d t w i c e a s m u c h i n f o r m a t i o n t h a n f r o m

    o n e b o o k . T h a t i s , w e w o u l d l i k e o u r m e a s u r e t o b e a d d i t i v e .

    I t ' s e a s y t o d o t h i s i f w e r s t t a k e t h e l o g a r i t h m o f t h e n u m b e r o f p o s s i b l e

    s y m b o l s b e c a u s e t h e n w e c a n a d d t h e l o g a r i t h m s i n s t e a d o f m u l t i p l y i n g t h e

    n u m b e r o f s y m b o l s . I n o u r e x a m p l e , t h e r s t d e v i c e m a k e s u s u n c e r t a i n b y

    l o g ( 3 ) , t h e s e c o n d b y l o g ( 2 ) a n d t h e c o m b i n e d d e v i c e b y l o g ( 3 ) + l o g ( 2 ) =

    l o g ( 6 ) . T h e b a s e o f t h e l o g a r i t h m d e t e r m i n e s t h e u n i t s . W h e n w e u s e t h e

    b a s e 2 t h e u n i t s a r e i n b i t s ( b a s e 1 0 g i v e s d i g i t s a n d t h e b a s e o f t h e n a t u r a l

    l o g a r i t h m s , e , g i v e s n i t s ) . T h u s i f a d e v i c e p r o d u c e s o n e s y m b o l , w e a r e

    u n c e r t a i n b y l o g

    2

    1 = 0 b i t s , a n d w e h a v e n o u n c e r t a i n t y a b o u t w h a t t h e

    d e v i c e w i l l d o n e x t . I f i t p r o d u c e s t w o s y m b o l s o u r u n c e r t a i n t y w o u l d b e

    l o g

    2

    2 = 1 b i t . I n r e a d i n g a n m R N A , i f t h e r i b o s o m e e n c o u n t e r s a n y o n e o f

    4 e q u a l l y l i k e l y b a s e s , t h e n t h e u n c e r t a i n t y i s 2 b i t s .

    S o f a r , o u r f o r m u l a f o r u n c e r t a i n t y i s l o g

    2

    ( M ) , w i t h M b e i n g t h e n u m b e r

    o f s y m b o l s . T h e n e x t s t e p i s t o e x t e n d t h e f o r m u l a s o i t c a n h a n d l e c a s e s

    w h e r e t h e s y m b o l s a r e n o t e q u a l l y l i k e l y . F o r e x a m p l e , i f t h e r e a r e 3 p o s s i b l e

    s y m b o l s , b u t o n e o f t h e m n e v e r a p p e a r s , t h e n o u r u n c e r t a i n t y i s 1 b i t . I f

    t h e t h i r d s y m b o l a p p e a r s r a r e l y r e l a t i v e t o t h e o t h e r t w o s y m b o l s , t h e n o u r

    u n c e r t a i n t y s h o u l d b e l a r g e r t h a n 1 b i t , b u t n o t a s h i g h a s l o g

    2

    ( 3 ) b i t s . L e t ' s

  • 8/12/2019 Informationtheory.ps

    3/17

  • 8/12/2019 Informationtheory.ps

    4/17

    T o m S c h n e i d e r ' s I n f o r m a t i o n T h e o r y P r i m e r 4

    B y s u b s t i t u t i n g N f o r t h e d e n o m i n a t o r a n d b r i n g i n g i t i n s i d e t h e u p p e r s u m ,

    w e o b t a i n :

    M

    X

    i = 1

    N

    i

    N

    u

    i

    ( 6 )

    I f w e d o t h i s m e a s u r e f o r a n i n n i t e s t r i n g o f s y m b o l s , t h e n t h e f r e q u e n c y

    N

    i

    = N b e c o m e s P

    i

    , t h e p r o b a b i l i t y o f t h e i

    t h

    s y m b o l . M a k i n g t h i s s u b s t i t u t i o n ,

    w e s e e t h a t o u r a v e r a g e s u r p r i s a l ( H ) w o u l d b e :

    H =

    M

    X

    i = 1

    P

    i

    u

    i

    ( 7 )

    F i n a l l y , b y s u b s t i t u t i n g f o r u

    i

    , w e g e t S h a n n o n ' s f a m o u s g e n e r a l f o r m u l a

    f o r u n c e r t a i n t y :

    H =

    M

    X

    i = 1

    P

    i

    l o g

    2

    P

    i

    ( b i t s p e r s y m b o l ) . ( 8 )

    S h a n n o n g o t t o t h i s f o r m u l a b y a m u c h m o r e r i g o r o u s r o u t e t h a n w e

    d i d , b y s e t t i n g d o w n s e v e r a l d e s i r a b l e p r o p e r t i e s f o r u n c e r t a i n t y , a n d t h e n

    d e r i v i n g t h e f u n c t i o n . H o p e f u l l y t h e r o u t e w e j u s t f o l l o w e d g i v e s y o u a f e e l i n g

    f o r h o w t h e f o r m u l a w o r k s .

  • 8/12/2019 Informationtheory.ps

    5/17

    T o m S c h n e i d e r ' s I n f o r m a t i o n T h e o r y P r i m e r 5

    T o s e e h o w t h e H f u n c t i o n l o o k s , w e c a n p l o t i t f o r t h e c a s e o f t w o s y m b o l s .

    T h i s i s s h o w n b e l o w

    1

    :

    0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0

    0.0

    0.1

    0.2

    0.3

    0.4

    0.50.6

    0.7

    0.8

    0.9

    1.0

    probability

    uncertainty, H (bits)

    N o t i c e t h a t t h e c u r v e i s s y m m e t r i c a l , a n d r i s e s t o a m a x i m u m w h e n t h e

    t w o s y m b o l s a r e e q u a l l y l i k e l y ( p r o b a b i l i t y = 0 . 5 ) . I t f a l l s t o w a r d s z e r o

    w h e n e v e r o n e o f t h e s y m b o l s b e c o m e s d o m i n a n t a t t h e e x p e n s e o f t h e o t h e r

    s y m b o l .

    A s a n i n s t r u c t i v e e x e r c i s e , s u p p o s e t h a t a l l t h e s y m b o l s a r e e q u a l l y l i k e l y .

    W h a t d o e s t h e f o r m u l a f o r H ( e q u a t i o n ( 8 ) ) r e d u c e t o ? Y o u m a y w a n t t o t r y

    t h i s y o u r s e l f b e f o r e r e a d i n g o n .

    * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

    1

    T h e p r o g r a m t o c r e a t e t h i s g r a p h i s a t f t p : / / f t p . n c i f c r f . g o v / p u b / d e l i l a / h g r a p h . p

  • 8/12/2019 Informationtheory.ps

    6/17

    T o m S c h n e i d e r ' s I n f o r m a t i o n T h e o r y P r i m e r 6

    E q u a l l y l i k e l y m e a n s t h a t P

    i

    = 1 = M , s o i f w e s u b s t i t u t e t h i s i n t o t h e

    u n c e r t a i n t y e q u a t i o n w e g e t :

    H

    e q u i p r o b a b l e

    =

    M

    X

    i = 1

    1

    M

    l o g

    2

    1

    M

    ( 9 )

    S i n c e M i s n o t a f u n c t i o n o f i , w e c a n p u l l i t o u t o f t h e s u m :

    H

    e q u i p r o b a b l e

    = (

    1

    M

    l o g

    2

    1

    M

    )

    M

    X

    i = 1

    1 ( 1 0 )

    =

    1

    M

    l o g

    2

    1

    M

    M

    = l o g

    2

    1

    M

    ( 1 1 )

    = l o g

    2

    M

    w h i c h i s t h e s i m p l e e q u a t i o n w e s t a r t e d w i t h . I t c a n b e s h o w n t h a t f o r a

    g i v e n n u m b e r o f s y m b o l s ( i e . , M i s x e d ) t h e u n c e r t a i n t y H h a s i t s l a r g e s t

    v a l u e o n l y w h e n t h e s y m b o l s a r e e q u a l l y p r o b a b l e . F o r e x a m p l e , a n u n b i a s e d

    c o i n i s h a r d e r t o g u e s s t h a n a b i a s e d c o i n . A s a n o t h e r e x e r c i s e , w h a t i s t h e

    u n c e r t a i n t y w h e n t h e r e a r e 1 0 s y m b o l s a n d o n l y o n e o f t h e m a p p e a r s ? ( c l u e :

    l i m

    p ! 0

    p l o g p = 0 b y s e t t i n g p = 1 = M a n d u s i n g l ' H o p i t a l ' s r u l e , s o 0 l o g

    2

    0 = 0 . )

    W h a t d o e s i t m e a n t o s a y t h a t a s i g n a l h a s 1 . 7 5 b i t s p e r s y m b o l ? I t m e a n s

    t h a t w e c a n c o n v e r t t h e o r i g i n a l s i g n a l i n t o a s t r i n g o f 1 ' s a n d 0 ' s ( b i n a r y

    d i g i t s ) , s o t h a t o n t h e a v e r a g e t h e r e a r e 1 . 7 5 b i n a r y d i g i t s f o r e v e r y s y m b o l

    i n t h e o r i g i n a l s i g n a l . S o m e s y m b o l s w i l l n e e d m o r e b i n a r y d i g i t s ( t h e r a r e

    o n e s ) a n d o t h e r s w i l l n e e d f e w e r ( t h e c o m m o n o n e s ) . H e r e ' s a n e x a m p l e .

    S u p p o s e w e h a v e M = 4 s y m b o l s :

    A C G T ( 1 2 )

    w i t h p r o b a b i l i t i e s ( P

    i

    ) :

    P

    A

    =

    1

    2

    ; P

    C

    =

    1

    4

    ; P

    G

    =

    1

    8

    ; P

    T

    =

    1

    8

    ; ( 1 3 )

    w h i c h h a v e s u r p r i s a l s ( l o g

    2

    P

    i

    ) :

    u

    A

    = 1 b i t ; u

    C

    = 2 b i t s ; u

    G

    = 3 b i t s ; u

    T

    = 3 b i t s ; ( 1 4 )

  • 8/12/2019 Informationtheory.ps

    7/17

    T o m S c h n e i d e r ' s I n f o r m a t i o n T h e o r y P r i m e r 7

    s o t h e u n c e r t a i n t y i s

    H =

    1

    2

    1 +

    1

    4

    2 +

    1

    8

    3 +

    1

    8

    3 = 1 7 5 ( b i t s p e r s y m b o l ) ( 1 5 )

    L e t ' s r e c o d e t h i s s o t h a t t h e n u m b e r o f b i n a r y d i g i t s e q u a l s t h e s u r p r i s a l :

    A = 1

    C = 0 1

    G = 0 0 0

    T = 0 0 1 ( 1 6 )

    s o t h e s t r i n g

    A C A T G A A C ( 1 7 )

    w h i c h h a s f r e q u e n c i e s t h e s a m e a s t h e p r o b a b i l i t i e s d e n e d a b o v e , i s c o d e d

    a s

    1 0 1 1 0 0 1 0 0 0 1 1 0 1 ( 1 8 )

    1 4 b i n a r y d i g i t s w e r e u s e d t o c o d e f o r 8 s y m b o l s , s o t h e a v e r a g e i s 1 4 / 8 = 1 . 7 5

    b i n a r y d i g i t s p e r s y m b o l . T h i s i s c a l l e d a F a n o c o d e . F a n o c o d e s h a v e t h e

    p r o p e r t y t h a t y o u c a n d e c o d e t h e m w i t h o u t n e e d i n g s p a c e s b e t w e e n s y m b o l s .

    U s u a l l y o n e n e e d s t o k n o w t h e \ r e a d i n g f r a m e " , b u t i n t h i s e x a m p l e o n e c a n

    g u r e i t o u t . I n t h i s p a r t i c u l a r c o d i n g , t h e r s t d i g i t d i s t i n g u i s h e s b e t w e e n

    t h e s e t c o n t a i n i n g A , ( w h i c h w e s y m b o l i z e a s A ) a n d t h e s e t C ; G ; T , w h i c h

    a r e e q u a l l y l i k e l y . T h e s e c o n d d i g i t , u s e d i f t h e r s t d i g i t i s 0 , d i s t i n g u i s h e s

    C f r o m G ; T . T h e n a l d i g i t d i s t i n g u i s h e s G f r o m T . B e c a u s e e a c h c h o i c e i s

    e q u a l l y l i k e l y ( i n o u r o r i g i n a l d e n i t i o n o f t h e p r o b a b i l i t i e s o f t h e s y m b o l s ) ,

    e v e r y b i n a r y d i g i t i n t h i s c o d e c a r r i e s 1 b i t o f i n f o r m a t i o n . B e w a r e ! T h i s

    w o n ' t a l w a y s b e t r u e . A b i n a r y d i g i t c a n s u p p l y 1 b i t o n l y i f t h e t w o s e t s

    r e p r e s e n t e d b y t h e d i g i t a r e e q u a l l y l i k e l y ( a s r i g g e d f o r t h i s e x a m p l e ) . I f t h e y

    a r e n o t e q u a l l y l i k e l y , o n e b i n a r y d i g i t s u p p l i e s l e s s t h a n o n e b i t . ( R e c a l l t h a t

    H i s a t a m a x i m u m f o r e q u a l l y l i k e l y p r o b a b i l i t i e s . ) S o i f t h e p r o b a b i l i t i e s

    w e r e

    P

    A

    =

    1

    2

    ; P

    C

    =

    1

    6

    ; P

    G

    =

    1

    6

    ; P

    T

    =

    1

    6

    ; ( 1 9 )

    t h e r e i s n o w a y t o a s s i g n a ( n i t e ) c o d e s o t h a t e a c h b i n a r y d i g i t h a s t h e

    v a l u e o f o n e b i t ( b y u s i n g l a r g e r b l o c k s o f s y m b o l s , o n e c a n a p p r o a c h i t ) . I n

    t h e r i g g e d e x a m p l e , t h e r e i s n o w a y t o u s e f e w e r t h a n 1 . 7 5 b i n a r y d i g i t s p e r

  • 8/12/2019 Informationtheory.ps

    8/17

    T o m S c h n e i d e r ' s I n f o r m a t i o n T h e o r y P r i m e r 8

    s y m b o l , b u t w e c o u l d b e w a s t e f u l a n d u s e e x t r a d i g i t s t o r e p r e s e n t t h e s i g n a l .

    T h e F a n o c o d e d o e s r e a s o n a b l y w e l l b y s p l i t t i n g t h e s y m b o l s i n t o s u c c e s s i v e

    g r o u p s t h a t a r e e q u a l l y l i k e l y t o o c c u r ; y o u c a n r e a d m o r e a b o u t i t i n t e x t s

    o n i n f o r m a t i o n t h e o r y . T h e u n c e r t a i n t y m e a s u r e t e l l s u s w h a t c o u l d b e d o n e

    i d e a l l y , a n d s o t e l l s u s w h a t i s i m p o s s i b l e . F o r e x a m p l e , t h e s i g n a l w i t h 1 . 7 5

    b i t s p e r s y m b o l c o u l d n o t b e c o d e d u s i n g o n l y 1 b i n a r y d i g i t p e r s y m b o l .

    T y i n g t h e I d e a s T o g e t h e r

    I n t h e b e g i n n i n g o f t h i s p r i m e r w e t o o k i n f o r m a t i o n t o b e a d e c r e a s e i n

    u n c e r t a i n t y . N o w t h a t w e h a v e a g e n e r a l f o r m u l a f o r u n c e r t a i n t y , ( 8 ) , w e c a n

    e x p r e s s i n f o r m a t i o n u s i n g t h i s f o r m u l a . S u p p o s e t h a t a c o m p u t e r c o n t a i n s

    s o m e i n f o r m a t i o n i n i t s m e m o r y . I f w e w e r e t o l o o k a t i n d i v i d u a l i p - o p s ,

    w e w o u l d h a v e a n u n c e r t a i n t y H

    b e f o r e

    b i t s p e r i p - o p . S u p p o s e w e n o w

    c l e a r p a r t o f t h e c o m p u t e r ' s m e m o r y , s o t h a t t h e r e i s a n e w u n c e r t a i n t y ,

    s m a l l e r t h a n t h e p r e v i o u s o n e : H

    a f t e r

    . T h e n t h e c o m p u t e r m e m o r y h a s l o s t

    a n a v e r a g e o f

    R = H

    b e f o r e

    H

    a f t e r

    ( 2 0 )

    b i t s o f i n f o r m a t i o n p e r i p - o p . I f t h e c o m p u t e r w a s c o m p l e t e l y c l e a r e d ,

    t h e n H

    a f t e r

    = 0 a n d R = H

    b e f o r e

    N o w c o n s i d e r a t e l e t y p e r e c e i v i n g c h a r a c t e r s o v e r a p h o n e l i n e . I f t h e r e

    w e r e n o n o i s e i n t h e p h o n e l i n e a n d n o o t h e r s o u r c e o f e r r o r s , t h e t e l e t y p e

    w o u l d p r i n t t h e t e x t p e r f e c t l y . W i t h n o i s e , t h e r e i s s o m e u n c e r t a i n t y a b o u t

    w h e t h e r a c h a r a c t e r p r i n t e d i s r e a l l y t h e r i g h t o n e . S o b e f o r e a c h a r a c t e r

    i s p r i n t e d , t h e t e l e t y p e m u s t b e p r e p a r e d f o r a n y o f t h e l e t t e r s , a n d t h i s

    p r e p a r e d s t a t e h a s u n c e r t a i n t y H

    b e f o r e

    , w h i l e a f t e r e a c h c h a r a c t e r h a s b e e n

    r e c e i v e d t h e r e i s s t i l l s o m e u n c e r t a i n t y , H

    a f t e r

    . T h i s u n c e r t a i n t y i s b a s e d o n

    t h e p r o b a b i l i t y t h a t t h e s y m b o l t h a t c a m e t h r o u g h i s n o t e q u a l t o t h e s y m b o l

    t h a t w a s s e n t , a n d i t m e a s u r e s t h e a m o u n t o f n o i s e .

    S h a n n o n g a v e a n e x a m p l e o f t h i s i n s e c t i o n 1 2 o f 1 0 ] ( p a g e s 3 3 - 3 4 o f 1 3 ] ) .

    A s y s t e m w i t h t w o e q u a l l y l i k e l y s y m b o l s t r a n s m i t t i n g e v e r y s e c o n d w o u l d

    s e n d a t a r a t e o f 1 b i t p e r s e c o n d w i t h o u t e r r o r s . S u p p o s e t h a t t h e p r o b a b i l i t y

    t h a t a 0 i s r e c e i v e d w h e n a 0 i s s e n t i s 0 . 9 9 a n d t h e p r o b a b i l i t y o f a 1 r e c e i v e d

    i s 0 . 0 1 . \ T h e s e g u r e s a r e r e v e r s e d i f a 1 i s r e c e i v e d . " T h e n t h e u n c e r t a i n t y

    a f t e r r e c e i v i n g a s y m b o l i s H

    a f t e r

    = 0 9 9 l o g

    2

    0 9 9 0 0 1 l o g

    2

    0 0 1 = 0 0 8 1 , s o

  • 8/12/2019 Informationtheory.ps

    9/17

    T o m S c h n e i d e r ' s I n f o r m a t i o n T h e o r y P r i m e r 9

    t h a t t h e a c t u a l r a t e o f t r a n s m i s s i o n i s R = 1 0 0 8 1 = 0 9 1 9 b i t s p e r s e c o n d .

    2

    T h e a m o u n t o f i n f o r m a t i o n t h a t g e t s t h r o u g h i s g i v e n b y t h e d e c r e a s e i n

    u n c e r t a i n t y , e q u a t i o n ( 2 0 ) .

    U n f o r t u n a t e l y m a n y p e o p l e h a v e m a d e e r r o r s b e c a u s e t h e y d i d n o t k e e p

    t h i s p o i n t c l e a r . T h e e r r o r s o c c u r b e c a u s e p e o p l e i m p l i c i t l y a s s u m e t h a t

    t h e r e i s n o n o i s e i n t h e c o m m u n i c a t i o n . W h e n t h e r e i s n o n o i s e , R = H

    b e f o r e

    ,

    a s w i t h t h e c o m p l e t e l y c l e a r e d c o m p u t e r m e m o r y . T h a t i s i f t h e r e i s n o

    n o i s e , t h e a m o u n t o f i n f o r m a t i o n c o m m u n i c a t e d i s e q u a l t o t h e u n c e r t a i n t y

    b e f o r e c o m m u n i c a t i o n . W h e n t h e r e i s n o i s e a n d s o m e o n e a s s u m e s t h a t t h e r e

    i s n ' t a n y , t h i s l e a d s t o a l l k i n d s o f c o n f u s i n g p h i l o s o p h i e s . O n e m u s t a l w a y s

    a c c o u n t f o r n o i s e .

    O n e F i n a l S u b t l e P o i n t . I n t h e p r e v i o u s s e c t i o n y o u m a y h a v e f o u n d

    i t o d d t h a t I u s e d t h e w o r d \ i p - o p " . T h i s i s b e c a u s e I w a s i n t e n t i o n a l l y

    a v o i d i n g t h e u s e o f t h e w o r d \ b i t " . T h e r e a s o n i s t h a t t h e r e a r e t w o m e a n i n g s

    t o t h i s w o r d , a s w e m e n t i o n e d b e f o r e w h i l e d i s c u s s i n g F a n o c o d i n g , a n d i t i s

    b e s t t o k e e p t h e m d i s t i n c t . H e r e a r e t h e t w o m e a n i n g s f o r t h e w o r d \ b i t " :

    1 . A b i n a r y d i g i t , 0 o r 1 . T h i s c a n o n l y b e a n i n t e g e r . T h e s e ` b i t s ' a r e

    t h e i n d i v i d u a l p i e c e s o f d a t a i n c o m p u t e r s .

    2 A m e a s u r e o f u n c e r t a i n t y , H , o r i n f o r m a t i o n R . T h i s c a n b e a n y r e a l

    n u m b e r b e c a u s e i t i s a n a v e r a g e . I t ' s t h e m e a s u r e t h a t S h a n n o n u s e d

    t o d i s c u s s c o m m u n i c a t i o n s y s t e m s .

    2

    S h a n n o n u s e d t h e n o t a t i o n H

    y

    ( x ) , m e a n i n g t h e c o n d i t i o n a l u n c e r t a i n t y a t t h e r e -

    c e i v e r y g i v e n t h e m e s s a g e s e n t f r o m x , f o r w h a t w e c a l l H

    a f t e r

    . H e a l s o u s e d t h e t e r m

    \ e q u i v o c a t i o n " .

  • 8/12/2019 Informationtheory.ps

    10/17

    T o m S c h n e i d e r ' s I n f o r m a t i o n T h e o r y P r i m e r 1 0

    R e f e r e n c e s

    1 ] T . D . S c h n e i d e r , G . D . S t o r m o , L . G o l d , a n d A . E h r e n f e u c h t . I n f o r -

    m a t i o n c o n t e n t o f b i n d i n g s i t e s o n n u c l e o t i d e s e q u e n c e s . J . M o l . B i o l . ,

    1 8 8 : 4 1 5 { 4 3 1 , 1 9 8 6 .

    2 ] T . D . S c h n e i d e r . I n f o r m a t i o n a n d e n t r o p y o f p a t t e r n s i n g e n e t i c s w i t c h e s .

    I n G . J . E r i c k s o n a n d C . R . S m i t h , e d i t o r s , M a x i m u m - E n t r o p y a n d

    B a y e s i a n M e t h o d s i n S c i e n c e a n d E n g i n e e r i n g , v o l u m e 2 , p a g e s 1 4 7 {

    1 5 4 , D o r d r e c h t , T h e N e t h e r l a n d s , 1 9 8 8 . K l u w e r A c a d e m i c P u b l i s h e r s .

    3 ] T . D . S c h n e i d e r a n d G . D . S t o r m o . E x c e s s i n f o r m a t i o n a t b a c t e r i o p h a g e

    T 7 g e n o m i c p r o m o t e r s d e t e c t e d b y a r a n d o m c l o n i n g t e c h n i q u e . N u c l .

    A c i d s R e s . , 1 7 : 6 5 9 { 6 7 4 , 1 9 8 9 .

    4 ] T . D . S c h n e i d e r a n d R . M . S t e p h e n s . S e q u e n c e l o g o s : A n e w w a y t o

    d i s p l a y c o n s e n s u s s e q u e n c e s . N u c l . A c i d s R e s . , 1 8 : 6 0 9 7 { 6 1 0 0 , 1 9 9 0 .

    5 ] N . D . H e r m a n a n d T . D . S c h n e i d e r . H i g h i n f o r m a t i o n c o n s e r v a t i o n

    i m p l i e s t h a t a t l e a s t t h r e e p r o t e i n s b i n d i n d e p e n d e n t l y t o F p l a s m i d

    i n c D r e p e a t s . J . B a c t . , 1 7 4 : 3 5 5 8 { 3 5 6 0 , 1 9 9 2 .

    6 ] P . P . P a p p , D . K . C h a t t o r a j , a n d T . D . S c h n e i d e r . I n f o r m a t i o n a n a l y s i s

    o f s e q u e n c e s t h a t b i n d t h e r e p l i c a t i o n i n i t i a t o r R e p A . J . M o l . B i o l . ,

    2 3 3 : 2 1 9 { 2 3 0 , 1 9 9 3 .

    7 ] R . M . S t e p h e n s a n d T . D . S c h n e i d e r . F e a t u r e s o f s p l i c e o s o m e e v o l u t i o n

    a n d f u n c t i o n i n f e r r e d f r o m a n a n a l y s i s o f t h e i n f o r m a t i o n a t h u m a n s p l i c e

    s i t e s . J . M o l . B i o l . , 2 2 8 : 1 1 2 4 { 1 1 3 6 , 1 9 9 2 .

    8 ] T . D . S c h n e i d e r . S e q u e n c e l o g o s , m a c h i n e / c h a n n e l c a p a c i t y , M a x w e l l ' s

    d e m o n , a n d m o l e c u l a r c o m p u t e r s : a r e v i e w o f t h e t h e o r y o f m o l e c u l a r

    m a c h i n e s . N a n o t e c h n o l o g y , 5 : 1 { 1 8 , 1 9 9 4 .

    9 ] P . K . R o g a n a n d T . D . S c h n e i d e r . U s i n g i n f o r m a t i o n c o n t e n t a n d

    b a s e f r e q u e n c i e s t o d i s t i n g u i s h m u t a t i o n s f r o m g e n e t i c p o l y m o r p h i s m s

    i n s p l i c e j u n c t i o n r e c o g n i t i o n s i t e s . H u m a n M u t a t i o n , 6 : 7 4 { 7 6 , 1 9 9 5 .

    1 0 ] C . E . S h a n n o n . A m a t h e m a t i c a l t h e o r y o f c o m m u n i c a t i o n . B e l l S y s t e m

    T e c h . J . , 2 7 : 3 7 9 { 4 2 3 , 6 2 3 { 6 5 6 , 1 9 4 8 .

  • 8/12/2019 Informationtheory.ps

    11/17

    T o m S c h n e i d e r ' s I n f o r m a t i o n T h e o r y P r i m e r 1 1

    1 1 ] J . R . P i e r c e . A n I n t r o d u c t i o n t o I n f o r m a t i o n T h e o r y : S y m b o l s , S i g n a l s

    a n d N o i s e . D o v e r P u b l i c a t i o n s , I n c . , N e w Y o r k , s e c o n d e d i t i o n , 1 9 8 0 .

    1 2 ] W . S a c c o , W . C o p e s , C . S l o y e r , a n d R . S t a r k . I n f o r m a t i o n T h e o r y :

    S a v i n g B i t s . J a n s o n P u b l i c a t i o n s , I n c . , D e d h a m , M A , 1 9 8 8 .

    1 3 ] C . E . S h a n n o n . C l a u d e E l w o o d S h a n n o n : C o l l e c t e d P a p e r s . I E E E P r e s s ,

    P i s c a t a w a y , N J , 1 9 9 3 .

    1 4 ] M . T r i b u s . T h e r m o s t a t i c s a n d T h e r m o d y n a m i c s . D . v a n N o s t r a n d C o m -

    p a n y , I n c . , P r i n c e t o n , N . J . , 1 9 6 1 .

  • 8/12/2019 Informationtheory.ps

    12/17

    T o m S c h n e i d e r ' s I n f o r m a t i o n T h e o r y P r i m e r 1 2

    A P P E N D I X : A T u t o r i a l O n L o g a r i t h m s

    U n d e r s t a n d i n g t h e L o g F u n c t i o n . I n t h e m a t h e m a t i c a l o p e r a -

    t i o n o f a d d i t i o n w e t a k e t w o n u m b e r s a n d j o i n t h e m t o c r e a t e a t h i r d :

    1 + 1 = 2 ( 2 1 )

    W e c a n r e p e a t t h i s o p e r a t i o n :

    1 + 1 + 1 = 3 ( 2 2 )

    M u l t i p l i c a t i o n i s t h e m a t h e m a t i c a l o p e r a t i o n t h a t e x t e n d s t h i s :

    3 1 = 3 ( 2 3 )

    I n t h e s a m e w a y , w e c a n r e p e a t m u l t i p l i c a t i o n :

    2 2 = 4 ( 2 4 )

    a n d

    2 2 2 = 8 ( 2 5 )

    T h e e x t e n s i o n o f m u l t i p l i c a t i o n i s e x p o n e n t i a t i o n :

    2 2 = 2

    2

    = 4 ( 2 6 )

    a n d

    2 2 2 = 2

    3

    = 8 ( 2 7 )

    T h i s i s r e a d \ t w o r a i s e d t o t h e t h i r d i s e i g h t " . B e c a u s e e x p o n e n t i a t i o n s i m p l y

    c o u n t s t h e n u m b e r o f m u l t i p l i c a t i o n s , t h e e x p o n e n t s a d d :

    2

    2

    2

    3

    = 2

    2 + 3

    = 2

    5

    ( 2 8 )

    T h e n u m b e r ` 2 ' i s t h e b a s e o f t h e e x p o n e n t i a t i o n . I f w e r a i s e a n e x p o n e n t t o

    a n o t h e r e x p o n e n t , t h e v a l u e s m u l t i p l y :

    2

    2

    3

    = 2

    2

    2

    2

    2

    2

    = 2

    2 + 2 + 2

    = 2

    2 3

    = 2

    6

    ( 2 9 )

  • 8/12/2019 Informationtheory.ps

    13/17

    T o m S c h n e i d e r ' s I n f o r m a t i o n T h e o r y P r i m e r 1 3

    T h e e x p o n e n t i a l f u n c t i o n y = 2

    x

    i s s h o w n i n t h i s g r a p h

    3

    :

    0 1 2 3 4 5

    0

    1

    2 3

    4

    5

    6

    7

    8

    9

    10

    11

    12

    13

    14

    15

    16

    17

    18 19

    20

    21

    22

    23

    24

    25

    26

    27

    28

    29

    30

    31

    32

    x

    y = 2x

    N o w c o n s i d e r t h a t w e h a v e a n u m b e r a n d w e w a n t t o k n o w h o w m a n y 2 ' s

    m u s t b e m u l t i p l i e d t o g e t h e r t o g e t t h a t n u m b e r . F o r e x a m p l e , g i v e n t h a t w e

    a r e u s i n g ` 2 ' a s t h e b a s e , h o w m a n y 2 ' s m u s t b e m u l t i p l i e d t o g e t h e r t o g e t

    3 2 ? T h a t i s , w e w a n t t o s o l v e t h i s e q u a t i o n :

    2

    B

    = 3 2 ( 3 0 )

    O f c o u r s e , 2

    5

    = 3 2 , s o B = 5 . T o b e a b l e t o g e t a h o l d o f t h i s , m a t h e m a t i c i a n s

    m a d e u p a n e w f u n c t i o n c a l l e d t h e l o g a r i t h m :

    l o g

    2

    3 2 = 5 ( 3 1 )

    3

    T h e p r o g r a m t o c r e a t e t h i s g r a p h i s a t f t p : / / f t p . n c i f c r f . g o v / p u b / d e l i l a / e x p g r a p h . p

  • 8/12/2019 Informationtheory.ps

    14/17

  • 8/12/2019 Informationtheory.ps

    15/17

    T o m S c h n e i d e r ' s I n f o r m a t i o n T h e o r y P r i m e r 1 5

    w h i c h i s j u s t a g e n e r a l i z a t i o n o f e q u a t i o n ( 2 8 ) . T a k e t h e l o g a r i t h m o f b o t h

    s i d e s :

    l o g

    2

    2

    a + b

    = l o g

    2

    2

    a

    2

    b

    ( 3 5 )

    E x p o n e n t i a t i o n a n d t h e l o g a r i t h m a r e i n v e r s e o p e r a t i o n s , s o w e c a n c o l l a p s e

    t h e l e f t s i d e :

    a + b = l o g

    2

    2

    a

    2

    b

    ( 3 6 )

    N o w l e t ' s b e t r i c k y a n d s u b s t i t u t e : l o g

    2

    x = a a n d l o g

    2

    y = b :

    l o g

    2

    x + l o g

    2

    y = l o g

    2

    2

    l o g

    2

    x

    2

    l o g

    2

    y

    ( 3 7 )

    A g a i n , e x p o n e n t i a t i o n a n d t h e l o g a r i t h m a r e i n v e r s e o p e r a t i o n s , s o w e c a n

    c o l l a p s e t h e t w o c a s e s o n t h e r i g h t s i d e :

    l o g

    2

    x + l o g

    2

    y = l o g

    2

    ( x y ) ( 3 8 )

    T h i s i s t h e a d d i t i v e p r o p e r t y t h a t S h a n n o n w a s i n t e r e s t e d i n .

    T h e \ P u l l F o r w a r d " R u l e . F r o m e q u a t i o n ( 3 2 ) :

    a = 2

    l o g

    2

    a

    ( 3 9 )

    R a i s e b o t h s i d e s t o t h e u :

    a

    u

    =

    2

    l o g

    2

    a

    u

    ( 4 0 )

    N o w , w e c a n c o m b i n e t h e e x p o n e n t s b y m u l t i p l y i n g , a s i n ( 2 9 ) :

    a

    u

    = 2

    u l o g

    2

    a

    ( 4 1 )

    F i n a l l y , t a k e t h e l o g b a s e 2 o f b o t h s i d e s a n d c o l l a p s e t h e r i g h t s i d e :

    l o g

    2

    a

    u

    = u l o g

    2

    a ( 4 2 )

    T h i s c a n b e r e m e m b e r e d a s a r u l e t h a t a l l o w s o n e t o \ p u l l " t h e e x p o n e n t

    f o r w a r d f r o m i n s i d e t h e l o g a r i t h m .

    H o w t o C o n v e r t B e t w e e n D i e r e n t B a s e s . C a l c u l a t o r s a n d

    c o m p u t e r s g e n e r a l l y d o n ' t c a l c u l a t e t h e l o g a r i t h m t o t h e b a s e 2 , b u t w e c a n

    u s e a t r i c k t o m a k e t h i s e a s y . S t a r t b y l e t t i n g :

    x = l o g

    z

    a = l o g

    z

    b ( 4 3 )

  • 8/12/2019 Informationtheory.ps

    16/17

    T o m S c h n e i d e r ' s I n f o r m a t i o n T h e o r y P r i m e r 1 6

    R e a r r a n g e i t a s :

    l o g

    z

    a = x l o g

    z

    b ( 4 4 )

    N o w u s e a \ r e v e r s e p u l l f o r w a r d " ( ! ) :

    l o g

    z

    a = l o g

    z

    b

    x

    ( 4 5 )

    a n d d r o p t h e l o g s :

    a = b

    x

    ( 4 6 )

    N o w t a k e t h e l o g b a s e b :

    l o g

    b

    a = l o g

    b

    b

    x

    ( 4 7 )

    T h i s s i m p l i e s t o :

    l o g

    b

    a = x ( 4 8 )

    B u t w e k n o w w h a t x i s f r o m e q u a t i o n ( 4 3 ) :

    l o g

    b

    a = l o g

    z

    a = l o g

    z

    b ( 4 9 )

    T h e c o n v e r s i o n r u l e t o g e t l o g a r i t h m s b a s e 2 f r o m a n y b a s e z i s :

    l o g

    2

    ( a ) = l o g

    z

    ( a ) = l o g

    z

    ( 2 ) ( 5 0 )

    N o t i c e t h a t s i n c e t h e z d o e s n o t a p p e a r o n t h e l e f t h a n d s i d e i t d o e s n ' t m a t t e r

    w h a t k i n d o f l o g a r i t h m y o u h a v e a v a i l a b l e , b e c a u s e y o u c a n a l w a y s g e t t o

    a n o t h e r b a s e u s i n g t h i s e q u a t i o n ! T r y t h i s e x a m p l e o n y o u r c a l c u l a t o r :

    l o g

    2

    ( 3 2 ) =

    l o g

    w h a t e v e r !

    ( 3 2 )

    l o g

    w h a t e v e r !

    ( 2 )

    ( 5 1 )

    Y o u s h o u l d g e t ` 5 ' .

    T r i c k s W i t h P o w e r s o f 2 . I n c a l c u l u s w e l e a r n a b o u t t h e n a t u r a l

    l o g a r i t h m w i t h b a s e e = 2 7 1 8 2 8 1 8 2 8 4 5 9 0 4 5

    5

    C a l c u l a t i o n s w i t h t h i s b a s e

    c a n e a s i l y b e d o n e b y a c o m p u t e r o r c a l c u l a t o r , b u t t h e y a r e d i c u l t f o r m o s t

    p e o p l e t o d o i n t h e i r h e a d .

    I n c o n t r a s t , t h e p o w e r s o f 2 a r e e a s y t o m e m o r i z e a n d r e m e m b e r :

    5

    W a n t t o i m p r e s s y o u r f r i e n d s b y m e m o r i z i n g t h i s n u m b e r ? N o t e t h a t a f t e r t h e 2 . 7

    ( y o u a r e y o u y o u r o w n f o r t h a t ! ) w e h a v e t w o 1 8 2 8 ' s f o l l o w e d b y a 4 5

    - 9 0

    - 4 5

    t r i a n g l e .

  • 8/12/2019 Informationtheory.ps

    17/17

    T o m S c h n e i d e r ' s I n f o r m a t i o n T h e o r y P r i m e r 1 7

    c h o i c e s b i t s

    M B

    1 0

    2 1

    4 2

    8 3

    1 6 4

    3 2 5

    6 4 6

    1 2 8 7

    2 5 6 8

    5 1 2 9

    1 0 2 4 1 0

    w h e r e 2

    B

    = M a n d l o g

    2

    M = B

    W e c a n u s e t h i s t a b l e a n d a t r i c k t o m a k e q u i c k e s t i m a t e s o f t h e l o g s o f

    h i g h e r n u m b e r s . N o t i c e t h a t

    2

    1 0

    = 1 0 2 4 1 0 0 0 = 1 0

    3

    ( 5 2 )

    S o t o t a k e t h e l o g b a s e 2 o f 4 1 0

    6

    , w e t h i n k :

    l o g

    2

    ( 4 1 0

    6

    ) = l o g

    2

    ( 4 ) + l o g

    2

    ( 1 0

    6

    ) ( 5 3 )

    = 2 + l o g

    2

    ( 1 0

    3

    1 0

    3

    ) ( 5 4 )

    = 2 + l o g

    2

    ( 1 0

    3

    ) + l o g

    2

    ( 1 0

    3

    ) ( 5 5 )

    2 + l o g

    2

    ( 2

    1 0

    ) + l o g

    2

    ( 2

    1 0

    ) ( 5 6 )

    2 + 1 0 + 1 0 ( 5 7 )

    2 2 ( 5 8 )

    T h e a c t u a l v a l u e i s 2 1 . 9 3 .