Design a shannon-fano code

Assignment Help Computer Engineering
Reference no: EM13801500

Question 1 (10 points) Consider a three-symbols alphabet with the specified probability of assignment shown below:

X,

P(X,)

a

0.70

b

0.25

c

0.05

Listed with the input alphabet are six binary code assignments.

Symbol

Code 1

Code 2

Code 3

Code 4

Code 5

Code 6

a

00

00

0

1

I

1

b

ll

01

1

10

01

00

c

11

10

11

100

11

01


(a) Scan these codes and determine which codes are practical (can be used for data compression application). Justify your answers.

(b) Design a Huffman code for the above three-symbols source alphabet shown above and find its code efficiency (i.e., compression efficiency).

(c) Design a Shannon-Fano code for the above three-symbol source alphabet shown above and find its code efficiency. Compare it with your answer in part (b).

(d) Can you suggest a technique to improve the code efficiency to achieve a greater compression ratio? Determine the code efficiency for your improved source coding method.

Question 2: Huffman Coding

In this problem, you will study the efficacy of Huffman source coding (data compression algorithm) on two different data sources. Generate two test data files data1.txt and data2.txt. Create the first test data file data1.txt such that it contains at least 20 characters (including spaces). Next create a second test data file data2.txt consisting of about 20 binary digits (i.e., digits 0 and 1).

(a) Suppose you wish to compress the data1.txt and data2.txt using Huffman source coding method. Find the compression efficiency and the average codeword length. Clearly show your final code design (i.e., codeword for each source symbol).

(b) Repeat part (a) but now consider at least 5000 characters and 5000 digits for data1.txt and data2.txt, respectively.

(c) Validate that your design and your program works fine (i.e., correct data encoding and decoding) for both of your test data files in parts (a) and (b). Compare your results with the compression efficiency attainable with "compress" routine in UNIX or with other data compression utilities (e.g., zip). Explain any interesting observations and/or trends from your results.

(d) Explain why Huffman coding is NOT used for data compression of practical data sources? In other words, why practical source compression utilities (e.g., zip, gnuzip, etc.) do not use Huffman coding method despite its optimality?

(e) Explain why it might be more advantageous to employ the Lempel-Ziv algorithm over Huffman coding method for digital multimedia (image/audio/video) data compression applications?

Reference no: EM13801500

Questions Cloud

What are the two major types of interest groups : What are the two major types of interest groups and examples of each. Which of these types of interest groups tend to be more powerful? Explain your choice.
Why is apa style used to document ideas in writing : Why is APA Style used to document ideas in writing? What is the purpose of the in-text citation? Demonstrate your understanding of the in-text citation by providing an in-text citation for the article you summarized.
How technology may contribute to child exploitation : How technology may contribute to child exploitation
Drawing on the review of organizational theory : What distinguishes a public organization from a private organization. Drawing on the review of organizational theory is there a particular theory that fits public and hybrid organizations better than others
Design a shannon-fano code : Design a Shannon-Fano code for the above three-symbol source alphabet shown above and find its code efficiency. Compare it with your answer in part (b)
What factors are most important as you become socialized : What factors are most important as you become socialized as a BSN student? What are your resources in this process? How can this process be most effective?
Plan for compliance with the sarbanes-oxley act : Develop a plan for compliance with the Sarbanes-Oxley Act (SOX) in a hospital setting. How can employees become knowledgeable with the major provisions of SOX?
Defense of the arts : Write a review of your arts experience that includes a defense of the arts. Include the following:
Individual assignment performing and visual arts paper : Individual Assignment Performing and Visual Arts Paper

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd