DOC PREVIEW
U-M EECS 281 - Data Structures and Algorithms

This preview shows page 1-2-3-4 out of 12 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

DiscussioThe Uon: October 31, 2007University of Michiganyg1Agendaz Questions on anythingz Basic Debugging Tipsz PA2: Huffman Encodingz Specific questions:2Questions on anything?z Questions?:3Basic Debugging Tipsz xxd (demonstration) z Cout vs. printf− printf: How to use− Common args: d, x, o:4PA2: Huffman Encodingz MinHeapWh t' h ?−What's a heap?− What's a minheap?− Enqueue (example) − Dequeue (example) z Right childz Smallest key swap− How can we use this for:r PA2...?5PA2: Huffman EncodingHappy Halloweenappy a o ee(Candy example(y p:!))6PA2: Huffman Encodingz Okay, so we have minheap with freqz Trie− Putting into tree− Encodinglklfhz Alert: Can make your life easier with− Good style (Markdowns on PA1) Classes−Classesz Triez Minheap:quencies... Now what?hh7PA2: Huffman Encodingz Okay, so now it's in a trie... now wh− Regular code table: <sym, freq, − Compressed code table (use thisz Website:at? code>s one) 8PA2: Huffman Encodingz What goes in the encoded data?:9PA2: Huffman Encodingz Review of what we need to do (reme1.) Create minheap class: can have <k2.) Create trie class3.) Read in input data (M&Ms) 4.) Put input data into minheap “keyed- This means lowest key at root5.) Construct trie (keep pulling off the - Remember: have to put sub-trie b6.) When trie is built, we can create the7.) Create compressed code table8.) For encoded data, just use the code:ember this is ONE way):key,object> paird” by frequencyroot of minheap to get pairs) back onto minheap sometimes!e codes for each symbole table to determine what goes where10Bit operationsz Is anyone having trouble with bit opz If so, let's address it now:perations for anything (rle, etc.)?11Questions?Any


View Full Document

U-M EECS 281 - Data Structures and Algorithms

Download Data Structures and Algorithms
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Data Structures and Algorithms and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Data Structures and Algorithms 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?