Some words like “Help", "Stop", “Fire", “Run" are short, not because they are frequently used, but perhaps because time is precious in the situations

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Some words like “Help", "Stop", “Fire", “Run" are short, not because they
are frequently used, but perhaps because time is precious in the situations
Transcribed Image Text:Some words like “Help", "Stop", “Fire", “Run" are short, not because they are frequently used, but perhaps because time is precious in the situations
in which these words are required. With the same token, in designing a
source code for the random variable X, the average code length can be
weighted using costs assigned for different realizations of X. Specifically,
let X be a random variables that takes values from the alphabet &
{1,2, ... , m} with probabilities p; = Px(i) where i E {1,2, .. , m}. Let l;
be the length of the codeword associated with X = i. Also, let c; be the
cost per symbol of the codeword when X = i. Therefore, the average cost
C of the code description of X can be written as
m
C = EP:cili
i=1
(a) You want to design a prefix code for X with lengths 1, l2,...,lm
(ED-li < 1) such that the average description cost C is mini-
mized. You need to find the minimizing set of lengths {l†,l;,...,}
and the corresponding value of the minimum cost C*.
In class, we studied two different methods to solve this problem:
(1) the Lagrangian approach and (2) the KL distance approach.
Use both methods to verify your answer.
Hint. You may wish to define a new distribution over X, namely
qi = qx(i), where
m
CiPi
and Q=>ciPi
Q
i=1
Note that q is a valid probability distribution.
(b) How would you use the Huffman code procedure to minimize C (over
all possible prefix codes)? Specifically, what distribution you want to
use to design a Huffman code?
Transcribed Image Text:in which these words are required. With the same token, in designing a source code for the random variable X, the average code length can be weighted using costs assigned for different realizations of X. Specifically, let X be a random variables that takes values from the alphabet & {1,2, ... , m} with probabilities p; = Px(i) where i E {1,2, .. , m}. Let l; be the length of the codeword associated with X = i. Also, let c; be the cost per symbol of the codeword when X = i. Therefore, the average cost C of the code description of X can be written as m C = EP:cili i=1 (a) You want to design a prefix code for X with lengths 1, l2,...,lm (ED-li < 1) such that the average description cost C is mini- mized. You need to find the minimizing set of lengths {l†,l;,...,} and the corresponding value of the minimum cost C*. In class, we studied two different methods to solve this problem: (1) the Lagrangian approach and (2) the KL distance approach. Use both methods to verify your answer. Hint. You may wish to define a new distribution over X, namely qi = qx(i), where m CiPi and Q=>ciPi Q i=1 Note that q is a valid probability distribution. (b) How would you use the Huffman code procedure to minimize C (over all possible prefix codes)? Specifically, what distribution you want to use to design a Huffman code?
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Problems on Dynamic Programming
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education