# lec07 - Optimal Merging Of Runs 22 22 13 7 4 3 6 15 9 4 7 3...

This preview shows pages 1–9. Sign up to view the full content.

Optimal Merging Of Runs 4 3 6 9 4 3 6 9 7 15 22 7 13 22

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Weighted External Path Length 4 3 6 9 WEPL(T) = Σ (weight of external node i) * (distance of node i from root of T) WEPL(T) = 4 * 2 + 3*2 + 6*2 + 9*2 = 44 7 15 22
Weighted External Path Length WEPL(T) = Σ (weight of external node i) * (distance of node i from root of T) WEPL(T) = 4 * 3 + 3*3 + 6*2 + 9*1 = 42 4 3 6 9 7 13 22

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Other Applications Message coding and decoding. Lossless data compression.
Message Coding & Decoding Messages M 0 , M 1 , M 2 , …, M n-1 are to be transmitted. The messages do not change. Both sender and receiver know the messages. So, it is adequate to transmit a code that identifies the message (e.g., message index). M i is sent with frequency f i . Select message codes so as to minimize transmission and decoding times.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Example n = 4 messages. The frequencies are [2, 4, 8, 100] . Use 2 -bit codes [00, 01, 10, 11] . Transmission cost = 2*2 + 4*2 + 8*2 + 100*2 = 228 . Decoding is done using a binary tree.
Example Decoding cost = 2*2 + 4*2 + 8*2 + 100*2 = 228 = transmission cost = WEPL 2 4 8 100 0 1 1 0 M 3 M 0 M 1 M 2

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Example Every binary tree with n external nodes defines a code set for n messages.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern