cs-2124: finish part two of assignment 3
This commit is contained in:
parent
2c97b86ab2
commit
f001d57f9d
@ -1,4 +1,4 @@
|
||||
* Assignment 2
|
||||
* Assignment 3
|
||||
|
||||
- ABC123: =zfp106=
|
||||
- Name: =Price Hiller=
|
||||
@ -53,3 +53,37 @@ Create a Huffman Encoding Table and Tree for your first or last name
|
||||
b. Variable bit representation
|
||||
c. Highlight which Huffman bit representation requires less bits for encoding i.e. Fixed bit
|
||||
representation or variable bit representation, just like in the lecture slides
|
||||
|
||||
**** Tables
|
||||
|
||||
- Fixed bit representation
|
||||
| Character | Bits | Frequency | Number of Bits Used |
|
||||
|-----------|------|-----------|---------------------|
|
||||
| P | 000 | 1 | 3 |
|
||||
| r | 001 | 1 | 3 |
|
||||
| i | 010 | 1 | 3 |
|
||||
| c | 011 | 1 | 3 |
|
||||
| e | 100 | 1 | 3 |
|
||||
|
||||
Total Number of Bits Used: $15$
|
||||
|
||||
- Variable bit representation
|
||||
| Character | Bits | Frequency | Number of Bits Used |
|
||||
|-----------|------|-----------|---------------------|
|
||||
| P | 00 | 1 | 2 |
|
||||
| r | 01 | 1 | 2 |
|
||||
| i | 110 | 1 | 3 |
|
||||
| c | 111 | 1 | 3 |
|
||||
| e | 10 | 1 | 2 |
|
||||
|
||||
Total Number of Bits Used: /*_~12~_*/
|
||||
|
||||
/*Fewer bits used for variable bit representation!*/
|
||||
|
||||
**** Trees
|
||||
|
||||
- Fixed bit representation
|
||||
[[./assets/PartTwo/fixed-bits-huffman.png]]
|
||||
- Variable bit representation
|
||||
[[./assets/PartTwo/variable-bits-huffman.png]]
|
||||
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 44 KiB |
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
Loading…
Reference in New Issue
Block a user