• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Python & Perl: Assignment 03 Solution
 

Python & Perl: Assignment 03 Solution

on

  • 786 views

 

Statistics

Views

Total Views
786
Views on SlideShare
592
Embed Views
194

Actions

Likes
0
Downloads
0
Comments
0

7 Embeds 194

http://vkedco.blogspot.com 159
http://www.vkedco.blogspot.com 24
http://vkedco.blogspot.in 5
http://www.vkedco.blogspot.in 2
http://vkedco.blogspot.co.uk 2
http://vkedco.blogspot.kr 1
http://vkedco.blogspot.de 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Python & Perl: Assignment 03 Solution Python & Perl: Assignment 03 Solution Presentation Transcript

    • Python & Perl Assignment 03 Solution Huffman Encoding and Decoding Vladimir Kulyukin Department of Computer Science Utah State Universitywww.youtube.com/vkedco www.vkedco.blogspot.com
    • Learning Objectiveswww.youtube.com/vkedco www.vkedco.blogspot.com
    • Learning Objectives ● List Manipulation ● Data Abstraction with Lists ● Huffman Encoding & Decodingwww.youtube.com/vkedco www.vkedco.blogspot.com
    • What To Implement ● Use make_huffman_tree defined in Lecture 05 build the Huffman tree on Slide 14 of Lecture 05 ● Implement two functions: – huffman_encode(symbols, huffman_tree) – huffman_decode(symbols, huffman_tree) ● Sample outputs: >>> huffman_encode([B, A, C], ht) [1, 0, 0, 0, 1, 0, 1, 0] >>> huffman_decode([1, 0, 0, 0, 1, 0, 1, 0], ht) [B, A, C]www.youtube.com/vkedco www.vkedco.blogspot.com
    • A Solutionwww.youtube.com/vkedco www.vkedco.blogspot.com
    • Reading & References ● www.python.org. ● http://en.wikipedia.org/wiki/Pierre_de_Fermat ● http://en.wikipedia.org/wiki/Carmichael_number ● Chptrs 01 and 02, H. Abelson and J. Sussman. “Structure and Interpretation of Computer Programs,” The MIT Press ● Ch. 02, M. L. Hetland. Beginning Python From Novice to nd Professional ,2 Ed., APRESS.www.youtube.com/vkedco www.vkedco.blogspot.com
    • Feedback Errors, bugs, comments to vladimir dot kulyukin at usu dot eduwww.youtube.com/vkedco www.vkedco.blogspot.com