Docsity

3 Problems on Introduction to Digital Image Processing - Assignment 3 | EE 465, Assignments of Electrical and Electronics Engineering

Toggle sidebar
bg1
EE465 Introduction to Digital Image Processing
Spring 2009 โ€“ Solution to HW3
1. (source entropy calculation)
1) This part gives the details of Example 3 in my PPT slides (#17)- i.e.,
how to calculate the entropy for a geometric source: Prob(X=n)=1/2n,
n=1,2,โ€ฆโ€ฆ
According to the definition of source entropy, we have
To calculate the above summation of infinite series, we can write
Therefore, H(X)=2bps
2) Prob(X=2n-1)=Prob(X=2n)=1/2n+1,n=1,2,โ€ฆโ€ฆ
2. (Prefix codes)
1) No, 10 is the prefix of 1010, 1000 and 10010.
2) Solution is not unique โ€“ it depends on how you label the binary
codeword tree. If we always label left branch by 1 and right branch by
0, then we have C={11,10,011,010,0011,0010,0001,0000};
โˆ‘โˆ‘
โˆž
=
โˆž
=
=โˆ’=
1
2
12
)
2
1
(log
2
1
)(
nnn
nn
n
XH
...
2
3
2
2
2
1
232
1
+++== โˆ‘
โˆž
=nn
n
S...
2
4
2
3
2
2
12 32 ++++=S(1)
(2)
2...
2
1
2
1
2
1
1)1()2( 32 =++++=โ‡’โˆ’ S
bps
n
XH
nnn
nn3
2
1
)
2
1
(log
2
1
2)(
1
1
2
11=
+
=โˆ’= โˆ‘โˆ‘
โˆž
=
+
โˆž
=
+
1 0
pf2

Partial preview of the text

Download 3 Problems on Introduction to Digital Image Processing - Assignment 3 | EE 465 and more Assignments Electrical and Electronics Engineering in PDF only on Docsity!

EE465 Introduction to Digital Image Processing

Spring 2009 โ€“ Solution to HW

1. (source entropy calculation)

1) This part gives the details of Example 3 in my PPT slides (#17)- i.e.,

how to calculate the entropy for a geometric source: Prob(X=n)=1/

n

n=1,2,โ€ฆโ€ฆ

According to the definition of source entropy, we have

To calculate the above summation of infinite series, we can write

Therefore, H(X)=2bps

2) Prob(X=2n-1)=Prob(X=2n)=1/

n+

,n=1,2,โ€ฆโ€ฆ

2. (Prefix codes)

1) No, 10 is the prefix of 1010, 1000 and 10010.

2) Solution is not unique โ€“ it depends on how you label the binary

codeword tree. If we always label left branch by 1 and right branch by

0, then we have C={11,10,011,010,0011,0010,0001,0000};

โˆž

=

โˆž

=

1

2 1 2

log ( 2

n

n n n

n

n H X

2 3 1

โˆž

n =

n

n S (^) ... 2

2 3

S = + + + + (1)

(2)

2 3

โˆ’ โ‡’ S = + + + + =

bps

n H X n

n n n

n^3 2

log ( 2

1

2 1 1

โˆž

=

โˆž

=

1 0

3) It is easy to check

Then you can easily prove the claim by contradiction. If there exist such

set of prefix codes, then using Kraftโ€™s inequality, we know their code-

lengths have satisfy

Contradiction.

8

1

โˆ‘ = + + + =^ >

=

โˆ’

i

l (^) i

8

1

โˆ‘^ โ‰ค

=

โˆ’

i

l (^) i