GohMatilda_HuffmanLab

docx

School

University of Maryland, College Park *

*We aren’t endorsed by this school

Course

204

Subject

English

Date

Dec 6, 2023

Type

docx

Pages

2

Uploaded by ChancellorLobster3121

Report
CMSC 204 Huffman Lab 1) Create a Huffman Tree and generate the codes for each character of the following input: create a huffman tree For consistency: 1. If same frequency – put in priority queue alphabetically; put space before other characters of the same frequency 2. Add subtrees to end of group with same priority 3. Lower number has higher priority (goes to front) Char Code Freq Total Bits C 1111111 1 7 R 1010 2 8 E 110 4 12 A 00 3 6 T 100 2 6 H 1111110 1 7 U 1110 1 4 F 1011 2 8 M 111110 1 6 N 11110 1 5 Space 01 3 6 Now encode “create a huffman tree”
2) Based on the following Huffman tree and binary sequence, what is the text 1110 011 101 101 1111 1101 000 1100 010 001 100 100 huffman tree
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help